0
WARNING: No route found for IPv6 destination :: (no default route?)
Traceback (most recent call last):
File "wifi_founder.py", line 9, in <module>
   sniff(iface="mon0", prn=PacketHandler)                
File "/usr/lib/python2.7/dist-packages/scapy/sendrecv.py", line 561, in sniff                
   s = L2socket(type=ETH_P_ALL, *arg, **karg)
File "/usr/lib/python2.7/dist-packages/scapy/arch/linux.py", line 455, in __init__
   self.ins.bind((iface, type))
File "/home/etai/PycharmProjects/wifi_founder/socket.py", line 228, in meth
   return getattr(self._sock,name)(*args)
socket.error: [Errno 19] No such device

when i was trying to debug this code using scapy,i got the error above, i simply don't no what to for resolving it. the code was written in python:

from scapy.all import *
ap_list = []
def PacketHandler(pkt):
   if pkt.haslayer(Dot11):
      if pkt.type == 0 and pkt.subtype == 8:
          if pkt.addr2 not in ap_list:
             ap_list.append(pkt.addr2)
             print "AP MAC: %s with SSID: %s" % (pkt.addr2, pkt.info)
sniff(iface="mon0", prn=PacketHandler)                
1
  • It seems like your computer doesn't hold a network interface named mon0. What network interfaces are defined in your computer?
    – Yoel
    Apr 22, 2017 at 11:11

1 Answer 1

1

If you cannot use 'mon0', you may consider using:

sniff(iface=conf.iface, prn=PacketHandler)

Instead, as it will auto-select the best interface (the default one)

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.