scapy

该工具可以改包

使用ARP().display()

###[ ARP ]###
hwtype= 0x1
ptype= IPv4
hwlen= None
plen= None
op= who-has
hwsrc= 00:0c:29:b5:d7:1e
psrc= 192.168.3.24
hwdst= 00:00:00:00:00:00
pdst= 0.0.0.0

sr1(ARP(pdst="192.168.3.1"))

IP()和ICMP()可以生成ping包

sr1(IP(dst="192.168.3.1",src="192.168.3.26")/ICMP(),timeout=1)

tcp包

###[ TCP ]###
sport= ftp_data
dport= http
seq= 0
ack= 0
dataofs= None
reserved= 0
flags= S #表示SYN
window= 8192
chksum= None
urgptr= 0
options= []