Skip to content

Tool for capture all packets from one interface and store them in a PCAP file.

License

Notifications You must be signed in to change notification settings

unknown0816/interface-to-pcap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interface to PCAP

This is a simple tool for capturing all packets of an interface and convert everything into a PCAP file.

Information

During the implementation of this tool the lsniffer.c file provided here and here was used and adapted.

After starting, the tool fetches all interfaces of the system and prints them to stdout. Via stdin one interface must be selected to be captured. This interface will be used and all packets will be written into a PCAP file named "log.pcap".

Usage

Building and executing the tool:

make
./interface_to_pcap

Cleaning the repository (the binary and log.pcap will be deleted):

make clean

Further use cases

It is pretty simple to extend this tool with a packet filter or similar to get a more detailed capture.

About

Tool for capture all packets from one interface and store them in a PCAP file.

Resources

License

Stars

Watchers

Forks