hkm / whoishere.py

WIFI Client Detection - Identify people by assigning a name to a device performing a wireless probe request.
225 stars 52 forks source link

TypeError: ord() expected a character, but string of length 0 found #9

Open greaterthanstar opened 4 years ago

greaterthanstar commented 4 years ago

Traceback (most recent call last): File "whoishere.py", line 155, in sniff(iface=interface, prn = PacketHandler, store=0) File "/usr/local/lib/python2.7/dist-packages/scapy/sendrecv.py", line 972, in sniff sniffer._run(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/scapy/sendrecv.py", line 925, in _run session.on_packet_received(p) File "/usr/local/lib/python2.7/dist-packages/scapy/sessions.py", line 47, in on_packet_received result = self.prn(pkt) File "whoishere.py", line 133, in PacketHandler PrintInfo(pkt) File "whoishere.py", line 107, in PrintInfo db = -(256-ord(pkt.notdecoded[-4:-3])) TypeError: ord() expected a character, but string of length 0 found

greaterthanstar commented 4 years ago

This is right upon starting it and after it displays the conf info

loviuz commented 4 years ago

You can change:

db = -(256-ord(pkt.notdecoded[-4:-3]))

with:

db = pkt.dBm_AntSignal

It should work.