Skip to content

Commit

Permalink
serious debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed May 11, 2024
1 parent c69afd9 commit 96f18d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bbot/scanner/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,20 @@ def is_incoming_duplicate(self, event, add=False):
"""
try:
event_hash = event.module._outgoing_dedup_hash(event)
log.critical(f"{event} native hash == {event_hash}")
except AttributeError:
module_name = str(getattr(event, "module", ""))
event_hash = hash((event, module_name))
log.critical(f"{event} fallback hash == {event_hash}")
is_dup = event_hash in self.incoming_dup_tracker
if add:
self.incoming_dup_tracker.add(event_hash)
suppress_dupes = getattr(event.module, "suppress_dupes", True)
log.critical(f"event module {event.module} suppress dupes == {suppress_dupes} and is_dup={is_dup}")
if suppress_dupes and is_dup:
log.critical(f"{event} is dup!!!")
return True
log.critical(f"{event} is NOT dup!#@#@")
return False


Expand Down

0 comments on commit 96f18d3

Please sign in to comment.