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
What should I do to make it work?
I don't think setting iface
to "any"
is valid under Windows.
You can check by removing the iface
parameter from your code (or by using a valid interface name).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.