scapy 是一个强大的交互式数据包处理库。
easy_install scapy ubuntu下可以使用这个命令:apt-get install scapy
输入命令scapy即可进入 >>> send(IP(dst='surenpi.com', ttl=1)/ICMP()) . Sent 1 packets. >>> sendp(Ether()/IP(dst='surenpi.com', ttl=1)/ICMP()) . Sent 1 packets. >>> p=sr(IP(dst='surenpi.com', ttl=1)/ICMP()) .Begin emission: .Finished to send 1 packets. .......................................................................................................................^C Received 121 packets, got 0 answers, remaining 1 packets >>> p (<Results: TCP:0 UDP:0 ICMP:0 Other:0>, <Unanswered: TCP:0 UDP:0 ICMP:1 Other:0>) >>> p[0] <Results: TCP:0 UDP:0 ICMP:0 Other:0> >>> sendp(Ether()/IP(dst='surenpi.com', ttl=(1,4))/ICMP()) .... Sent 4 packets.