Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Mar 6, 2019
2 parents c3a8621 + 2c3efbf commit 3f8e867
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions probequest/probe_request_sniffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class ProbeRequestSniffer:

def __init__(self, interface, **kwargs):
self.interface = interface
self.essid_filters = kwargs.get("essid_filters", None)
self.essid_regex = kwargs.get("essid_regex", None)
self.essid_filters = kwargs.get("essid", None)
self.essid_regex = kwargs.get("regex", None)
self.ignore_case = kwargs.get("ignore_case", None)
self.mac_exclusions = kwargs.get("mac_exclusions", None)
self.mac_filters = kwargs.get("mac_filters", None)
self.mac_exclusions = kwargs.get("exclude", None)
self.mac_filters = kwargs.get("station", None)
self.display_func = kwargs.get("display_func", lambda p: None)
self.storage_func = kwargs.get("storage_func", lambda p: None)
self.fake = kwargs.get("fake", False)
Expand Down Expand Up @@ -371,11 +371,15 @@ def parse(packet):
Parses the raw packet and returns a probe request object.
"""

if packet.haslayer(Dot11ProbeReq):
timestamp = packet.getlayer(RadioTap).time
s_mac = packet.getlayer(RadioTap).addr2
essid = packet.getlayer(Dot11ProbeReq).info.decode("utf-8")
try:
if packet.haslayer(Dot11ProbeReq):
timestamp = packet.getlayer(RadioTap).time
s_mac = packet.getlayer(RadioTap).addr2
essid = packet.getlayer(Dot11ProbeReq).info.decode("utf-8")

return ProbeRequest(timestamp, s_mac, essid)
else:
return ProbeRequest(timestamp, s_mac, essid)
else:
return None
except UnicodeDecodeError:
# The ESSID is not a valid UTF-8 string.
return None
2 changes: 1 addition & 1 deletion probequest/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.7.0"
VERSION = "0.7.1"

0 comments on commit 3f8e867

Please sign in to comment.