Skip to content

Commit

Permalink
fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Feb 18, 2018
1 parent 57e0898 commit 8cf1d93
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sniff-probe-req
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class ProbeRequestSniffer:
opened_socket=self.socket,
store=False,
prn=self.new_packet,
stop_filter=self.stop_sniffer.isSet
stop_filter=self.should_stop_sniffer
)
except Exception as e:
self.exception = e
Expand All @@ -189,6 +189,13 @@ class ProbeRequestSniffer:

self.new_packets.put(packet)

def should_stop_sniffer(self, packet):
"""
Returns true if the sniffer should be stopped and false otherwise.
"""

return self.stop_sniffer.isSet()

def get_exception(self):
"""
Returns the raised exception if any, otherwise returns none.
Expand Down

0 comments on commit 8cf1d93

Please sign in to comment.