-
Notifications
You must be signed in to change notification settings - Fork 0
Home
0-harshit-0 edited this page Aug 3, 2022
·
6 revisions
You can use these commands to operate the packet-capture tool.
- Help Message:
py main.py -h
- Start capturing:
py main.py -n 2 rem by default it will run 9999999999999999999 times.
- Capture ARP instead of IPv4:
py main.py -t arp rem by default it will capture IPv4.
- Filter protocol and capture:
py main.py -n 2 -proto tcp rem protocol to filter. In this case, it will only return TCP(6) and only capture 2 packets.
- Filter IP(included in destination or source) and capture:
py main.py -n 2 -ip 10.1.1.4
- Filter Destination IP(included in destination only) and capture:
py main.py -n 2 -dip 10.1.1.4
- Filter Source IP(included in source only) and capture:
py main.py -n 2 -sip 10.1.1.4
- Dump the captured packet instead of showing (the above filters can also apply here):
py main.py -n 2 -d rem the file will be created in the same directory as "dump.pcap" by default
- Open the dump packet file (the above filters can also apply here):
py main.py -n 2 -od a.pcap rem it will open file named "a.pcap", default is "dump.pcap"
py main.py -t arp -od a.pcap rem to open arp dump, by default it will only display IPv4 logs.