Useful shortcuts for vi editor

Showing posts with label tcpdump. Show all posts
Showing posts with label tcpdump. Show all posts

Thursday, 7 April 2016

tcpdump examples

tcpdump -D
-> Display all available interfaces for tcpdump

$ tcpdump -i 1 | more
-> Listen (interface 1) with more command

$ tcpdump -i any
-> Listen all actived interfaces

$ tcpdump -i eth1
-> Listen eth1 interface

$ tcpdump -i eth0 port 22
-> Listen eth0 interface on port 22

$ tcpdump -i eth2 port 23 -w example.pcap
-> Listen eth2 interface on port 23 and save as desired file name

Saturday, 2 April 2016

How to capture packages with adb shell?

e.g. 
CMD> adb shell 
# tcpdump -vv -i any -s 0 -w /data/01.pcap
(-v; verbose, -i; interface, -s 0;capture all bytes of data within the packet)

to take the pcap file from the phone;
CMD> adb pull /data/01.pcap