max@ubuntu:~$ sudo tcpdump -i ens32 icmp -w packet
-i指定要抓封包的介面
icmp只抓icmp的封包
-w 寫入檔案
Ctrl + C
max@ubuntu:~$ sudo tcpdump -nnXr packet|less
13:57:17.027643 IP 192.168.39.33 > 192.168.88.45: ICMP echo request, id 1, seq 320, length 40
0x0000: 4500 003c 4a56 0000 7f01 f0cb c0a8 2721 E..<JV........'!
0x0010: c0a8 582d 0800 4c1b 0001 0140 6162 6364 ..X-..L....@abcd
0x0020: 6566 6768 696a 6b6c 6d6e 6f70 7172 7374 efghijklmnopqrst
0x0030: 7576 7761 6263 6465 6667 6869 uvwabcdefghi
13:57:17.027694 IP 192.168.88.45 > 192.168.39.33: ICMP echo reply, id 1, seq 320, length 40
0x0000: 4500 003c ed9d 0000 4001 8c84 c0a8 582d E..<....@.....X-
0x0010: c0a8 2721 0000 541b 0001 0140 6162 6364 ..'!..T....@abcd
0x0020: 6566 6768 696a 6b6c 6d6e 6f70 7172 7374 efghijklmnopqrst
0x0030: 7576 7761 6263 6465 6667 6869 uvwabcdefghi
13:57:18.029860 IP 192.168.39.33 > 192.168.88.45: ICMP echo request, id 1, seq 321, length 40
0x0000: 4500 003c 4a57 0000 7f01 f0ca c0a8 2721 E..<JW........'!
0x0010: c0a8 582d 0800 4c1a 0001 0141 6162 6364 ..X-..L....Aabcd
0x0020: 6566 6768 696a 6b6c 6d6e 6f70 7172 7374 efghijklmnopqrst
0x0030: 7576 7761 6263 6465 6667 6869 uvwabcdefghi
13:57:18.029888 IP 192.168.88.45 > 192.168.39.33: ICMP echo reply, id 1, seq 321, length 40
0x0000: 4500 003c ee91 0000 4001 8b90 c0a8 582d E..<....@.....X-
0x0010: c0a8 2721 0000 541a 0001 0141 6162 6364 ..'!..T....Aabcd
0x0020: 6566 6768 696a 6b6c 6d6e 6f70 7172 7374 efghijklmnopqrst
0x0030: 7576 7761 6263 6465 6667 6869 uvwabcdefghi
沒有留言:
張貼留言