A simple network sniffer for Linux and macOS written from scratch without any libraries.
It's a toy tool that I created to learn more about network protocols. It's rudimentary when compared to tcpdump or wireshark.
Layer 2
- ETH
- ARP
Layer 3
- ICMP
- IP
Layer 4
- TCP
- UDP
Layer 7
- DNS (wip on EDNS0)
cmake .
make
The superuser privilege is necessary because Linux and BSD systems require elevated privileges to enable the promiscuous mode in network interfaces.
sudo ./babysniff -f -i eth0 -F arp,icmp,tcp,udp