python 2.7 - Scapy for collecting RSSI -
i using following python script collect rssi on monitor mode. rssi values stored in csv file.
from scapy.all import * import csv outputf = open("script1.csv","wb") writer = csv.writer(outputf) writer.writerow(("rssi","address","info")) packet_count = 0 def packethandler(pkt) : global packet_count packet_count+=1 if pkt.haslayer(dot11) : if pkt.type == 0 , pkt.subtype == 8 : if pkt.haslayer(dot11beacon) or pkt.haslayer(dot11proberesp): try: = pkt.notdecoded rssi = -(256-ord(extra[-4:-3])) except: rssi = -100 print packet_count, ": wifi signal strength:", rssi, "dbm of", pkt.addr2, pkt.info writer.writerow((rssi,pkt.addr2,pkt.info)) sniff(iface = "mon0", prn = packethandler, count = 12) print packet_count outputf.close()
i rssi values info field packets blank (while gives ap identifiers others). tell me sends packets ?
Comments
Post a Comment