-
Notifications
You must be signed in to change notification settings - Fork 0
Home
0-harshit-0 edited this page Jul 20, 2022
·
6 revisions
You can use these commands to operate packet-capture tool.
- Help Message:
py main.py -h
- Start capturing:
py main.py -n 2 rem by default it will run 9999999999999999999 times.
- 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 (above filters can also apply here):
py main.py -n 2 -d rem the file will be created in same directory as "dump.pcap" by default
- Open the dump packet file (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"