[英]Scapy sniffing on Windows
I run this code as administrator: 我以管理员身份运行此代码:
from scapy.all import *
def poison(packet):
packet[TCP].flags='R'
sendp(packet)
sniff(prn=poison,filter='tcp',iface='any')
And I have error:AttributeError None Type object has no attribute encode 我有错误:AttributeError无类型对象没有属性编码
What should I do to make it work? 我应该怎么做才能使其正常工作?
I don't think setting iface
to "any"
is valid under Windows. 我认为在Windows下将
iface
设置为"any"
是无效的。
You can check by removing the iface
parameter from your code (or by using a valid interface name). 您可以通过从代码中删除
iface
参数(或使用有效的接口名称)进行检查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.