Scapy - 函数“sr1()"不返回响应包 [英] Scapy - Function 'sr1()' doesn't Return Response-Packet

查看:93
本文介绍了Scapy - 函数“sr1()"不返回响应包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我在 Windows 10 上的 Python 3 中遇到了 Scapy 问题.我尝试向我的默认网关发送 Ping (ICMP) 请求.这是数据包命令:

Hello guys I have a problem with Scapy in Python 3 on Windows 10. I tried to send a Ping (ICMP) request to my default-gateway. This is the packet command:

p = IP(dst='10.0.0.138')/ICMP(type='echo-request')/Raw('Hello')

但是在我写完 r = sr1(ping) 之后,程序卡在这个输出上:

But after I write r = sr1(ping) the program is stuck on this output:

Begin emission:
Finished sending 1 packets.

我使用 Wireshark 检查数据包,我看到了两个数据包:请求和响应.我做错了什么?直到现在,这一直对我有用.

I used Wireshark to check the packets and I saw the both packets: Request and response. What do I do wrong? This has been working for me for whole life until now.

我现在正在使用 Scapy-Shell.

I am using the Scapy-Shell right now.

推荐答案

问题解决了,我只需要给 Python Interpreter 网络权限.感谢您的帮助.

the problem is solved, I just needed to give networks privileges to the Python Interpreter. Thanks for all your help.

这篇关于Scapy - 函数“sr1()"不返回响应包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆