LosKeeper / network-analyzer

A Sniffer like TCPDUMP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Network Analyzer

version compiler license author

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-dev

Table of Contents

  1. Compilation
  2. Usage
  3. Examples

Compilation

To 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.

Usage

To use the programm, you must run the executable file sniffer with the following arguments:

  • -i followed by the name of the interface to capture the packets from.
  • -o followed by the file name to sniffer the packets from.
  • -f followed by the filter to apply to the packets. (not implemented yet)
  • -v followed by 0 or 1 or 2 to display more infos in the terminal.
  • -h to display the help.

Examples

  • ./sniffer -i eth0: Capture the packets from the interface eth0.
    • Note: You must run the program with sudo if you want to capture the packets from an interface.
  • ./sniffer -o capture.pcap: Capture the packets from the file capture.pcap.
  • ./sniffer -i eth0 -v 1: Capture the packets from the interface eth0 and display more infos in the terminal.

About

A Sniffer like TCPDUMP

License:GNU General Public License v3.0


Languages

Language:C 95.2%Language:Makefile 4.8%