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
2019年11月14日 星期四
Linux command egrep
max@ubuntu:~$ ifconfig |egrep "HWadd|inet"
ens32 Link encap:Ethernet HWaddr 00:0c:29:b8:26:8e
inet addr:192.168.88.45 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feb8:268e/64 Scope:Link
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
max@ubuntu:~$ route |egrep "Dest|168.88"
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.88.1 0.0.0.0 UG 0 0 0 ens32
192.168.88.0 * 255.255.255.0 U 0 0 0 ens32
ens32 Link encap:Ethernet HWaddr 00:0c:29:b8:26:8e
inet addr:192.168.88.45 Bcast:192.168.88.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feb8:268e/64 Scope:Link
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
max@ubuntu:~$ route |egrep "Dest|168.88"
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.88.1 0.0.0.0 UG 0 0 0 ens32
192.168.88.0 * 255.255.255.0 U 0 0 0 ens32
訂閱:
文章 (Atom)
check_systemv1.1
check_systemv1.1.bat 可用於電腦資產盤點 @echo off REM 後續命令使用的是:UTF-8編碼 chcp 65001 echo ***Thanks for your cooperation*** echo ***感謝你的合作*** timeout 1...
-
https://serverfault.com/questions/548888/connecting-to-a-remote-server-through-a-vpn-when-the-local-network-subnet-addres/835400#835400 ...
-
Refer http://windows.update.error.code.84b20002.errorfix012.com/ PROBLEM: This error is usually caused by misconfigured system files th...