Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python如何在不进行欺骗的情况下发送ICMP数据包?_Python_Scapy_Packet_Icmp - Fatal编程技术网

Python如何在不进行欺骗的情况下发送ICMP数据包?

Python如何在不进行欺骗的情况下发送ICMP数据包?,python,scapy,packet,icmp,Python,Scapy,Packet,Icmp,我正试图使用我的Debian VPS使用scapy在python中发送ICMP数据包,但我并没有试图欺骗IP或任何东西,但由于我的服务器没有欺骗,所以它不会以任何方式发送,但我无法找到任何其他方法来创建ICMP数据包并发送它。我如何才能做到这一点?构建IP和ICMP层,如下所示: from scapy.layers.inet import IP, ICMP DESTINATION = "192.168.111.4" packet = IP(dst=DESTINATION, ttl=20) / I

我正试图使用我的Debian VPS使用scapy在python中发送ICMP数据包,但我并没有试图欺骗IP或任何东西,但由于我的服务器没有欺骗,所以它不会以任何方式发送,但我无法找到任何其他方法来创建ICMP数据包并发送它。我如何才能做到这一点?

构建IP和ICMP层,如下所示:

from scapy.layers.inet import IP, ICMP
DESTINATION = "192.168.111.4"
packet = IP(dst=DESTINATION, ttl=20) / ICMP()
# print(packet)

这需要一个欺骗服务器吗?你通常需要是制作任何类型数据包的root用户。