Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
greaterthanstar opened this issue Dec 7, 2019 · 2 comments

Comments

@greaterthanstar
Copy link

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
Copy link
Author

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

@loviuz
Copy link
Contributor

loviuz commented Aug 14, 2020

You can change:

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

with:

db = pkt.dBm_AntSignal

It should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants