首页 > 代码库 > tcpdump

tcpdump

 $tcpdump -i eth0 -s 0 -c 100

-s表示每个包特定长度, -s 0表示整个包(65535B)

-c表示多少个包

-A Print each packet (minus its link level header) in ASCII. Handy
for capturing web pages.

-X When parsing and printing, in addition to printing the headers
of each packet, print the data of each packet (minus its link
level header) in hex and ASCII. This is very handy for
analysing new protocols.

tcpdump