-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
38 lines (28 loc) · 1.11 KB
/
README
File metadata and controls
38 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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.
========================================================