ioeric/Sniffer
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Sniffer.c V1.0.0 by Eric Liu (eric.alluse@gmail.com) If you find any bug, please let me know :) I would appeciate it! Based on libpcap Environment: Linux To use this sniffer, please make sure you have libpcap installed in your system!!! If you do not have libpcap: sudo yum install pcap or apt-get install pcap Usage: gcc sniffer.c -o sniffer -lpcap sudo ./sniffer interface_name bridge_name (filter_file_name) (In sniffer.c, I direct all output to Log. You can specify the Log file name by changing the macro "Log". By default, #define Log stdout) ======================================================= cat filter -------------------------- tcp and not src 123.125.114.144 -------------------------- Example: sudo ./sniffer wlan0 br0 filter Comment: Sniffe all packets through interface wlan0 and write them into net bridge br0. Syntax in filter is the same as tcpdump. In this filter, we only sniff TCP packet and exclude packets from 123.125.114.144 You can use tcpdump or wireshark to check whether packets have been written to bridge or not. ========================================================