This is a network analyzer that can be used to analyze the network traffic of a computer. It is written in C and uses the libpcap library to capture the packets. You need to have the libpcap library installed on your computer to compile the program :
sudo apt install libpcap-devTo execute the program, you must first compile it using the command make. This will create an executable file called sniffer in the bin folder.
You can also use the command make test to compile the program and test it whith the files in the test folder.
To use the programm, you must run the executable file sniffer with the following arguments:
-ifollowed by the name of the interface to capture the packets from.-ofollowed by the file name to sniffer the packets from.(not implemented yet)-ffollowed by the filter to apply to the packets.-vfollowed by0or1or2to display more infos in the terminal.-hto display the help.
./sniffer -i eth0: Capture the packets from the interfaceeth0.- Note: You must run the program with
sudoif you want to capture the packets from an interface.
- Note: You must run the program with
./sniffer -o capture.pcap: Capture the packets from the filecapture.pcap../sniffer -i eth0 -v 1: Capture the packets from the interfaceeth0and display more infos in the terminal.