MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / _event_postcheck

Method _event_postcheck

bbot/modules/base.py:858–872  ·  view source on GitHub ↗

A simple wrapper for dup tracking

(self, event)

Source from the content-addressed store, hash-verified

856 return True, "precheck succeeded"
857
858 async def _event_postcheck(self, event):
859 """
860 A simple wrapper for dup tracking
861 """
862 # special exception for "FINISHED" event
863 if event.type in ("FINISHED",):
864 return True, ""
865 acceptable, reason = await self._event_postcheck_inner(event)
866 if acceptable:
867 # check duplicates
868 is_incoming_duplicate, reason = self.is_incoming_duplicate(event, add=True)
869 if is_incoming_duplicate and not self.accept_dupes:
870 return False, "module has already seen it" + (f" ({reason})" if reason else "")
871
872 return acceptable, reason
873
874 async def _event_postcheck_inner(self, event):
875 """

Callers 5

_events_waitingMethod · 0.95
_workerMethod · 0.95

Calls 2

is_incoming_duplicateMethod · 0.95

Tested by 3