whoishere.py icon indicating copy to clipboard operation
whoishere.py copied to clipboard

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

Open greaterthanstar opened this issue 4 years ago • 2 comments

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 avatar Dec 07 '19 19:12 greaterthanstar

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

greaterthanstar avatar Dec 07 '19 19:12 greaterthanstar

You can change:

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

with:

db = pkt.dBm_AntSignal

It should work.

loviuz avatar Aug 14 '20 15:08 loviuz