import pcapy
import struct
+import pyiw
+import threading
+
iface = 'wlan0'
+wlan = pyiw.WirelessInterface(iface)
import time
frame_subtype = name
break
else :
- print "ERROR : unknown CTL subtype %s" % ( frame_ctl & 0xf0 , )
- return
+ if frame_ctl & 0xf0 == 144 :
+ frame_subtype = "CF_END_ACK"
+ elif frame_ctl & 0xf0 == 128 :
+ frame_subtype = "UNKNOWN_1"
+ else :
+ print "ERROR : unknown CTL subtype %s" % ( frame_ctl & 0xf0 , )
+ return
elif frame_type == "DATA" :
_subtype = []
sequence = ( -1 , -1 )
- if frame_type == "DATA" :
+ if frame_type == "DATA" and pcktlen > 6 :
maclist.append( mac_fmt % struct.unpack( mac_str , payload[pointer:pointer+6] ) )
pointer += 6
pcktlen -= 6
except CaptureEnd , ex :
print "FINISED : %s" % ex
except Exception , ex :
+ channel_hop[0] = 0
print "ERROR : %s" % ex
logfile.close()