Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 686 Bytes

README.md

File metadata and controls

29 lines (23 loc) · 686 Bytes

Packet Sniffer

Packet sniffer with C++ language and pcap

Installation

we use libpcaq library in this project, for installing it you can write this command:

sudo apt-get install libpcap-dev

config files written in json format, we use json-c library to parse them:

sudo apt install libjson-c-dev

for logging, we use spdlog library, download it from git:

git clone https://github.com/gabime/spdlog.git

for compiling C++ program we should add -lpcap and -ljson-c and directory name of spdlog library:

g++ sniffer.cpp -o sniffer.out -lpcap -ljson-c -I "spdlog/include"

and it needs to run with sudo:

sudo ./sniffer.out