Scapy 工具介绍

发送第一个包
在服务器(10192.168.137.2)开启 tcpdump 抓包

node1:/root#tcpdump -S -i eth1  '((host 192.168.137.2) and (port 8080))'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes

在客户端(192.168.137.3)启动sudo scapy输入下面的指令

send(IP(dst="192.168.137.2")/ICMP())
.
Sent 1 packets.


node1:/root#tcpdump -S -i eth1  '(icmp and (host 192.168.137.3) )'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes


02:47:05.678768 IP node2 > node1: ICMP echo request, id 0, seq 0, length 8
02:47:05.678788 IP node1 > node2: ICMP echo reply, id 0, seq 0, length 8
原文地址:https://www.cnblogs.com/hzcya1995/p/13348468.html