Skip to content

Instantly share code, notes, and snippets.

@li-ch
Created July 22, 2016 23:17
Show Gist options
  • Save li-ch/2537ce2307684f9a97de25d1d2db3a88 to your computer and use it in GitHub Desktop.
Save li-ch/2537ce2307684f9a97de25d1d2db3a88 to your computer and use it in GitHub Desktop.

list all tcpdump process:

pgrep tcpdump

kill all tcpdump process:

pkill tcpdump
tcpdump -ttttt -w temp.pcap -i eth2 -s 100 dst 192.168.16.1

Generate random file of given size:

tr -dc A-Za-z0-9 </dev/urandom | head -c 92160 > 90KB.txt
scp server-20-eth2-ds.pcap li@192.168.1.254:/home/li/new-ds-1.pcap
tshark -r router.pcap -R "tcp.analysis.ack_rtt and ip.dst==192.168.1.255/24" -e tcp.analysis.ack_rtt -T fields -E separator=, -E quote=d > rtt.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment