diff --git a/bbot/modules/censys_ip.py b/bbot/modules/censys_ip.py index fa82dc33c7..21d6e65037 100644 --- a/bbot/modules/censys_ip.py +++ b/bbot/modules/censys_ip.py @@ -79,7 +79,7 @@ async def handle_event(self, event): for service in result.get("services", []): port = service.get("port") transport = service.get("transport_protocol", "TCP").upper() - + labels = service.get("labels", []) # Emit OPEN_TCP_PORT or OPEN_UDP_PORT for services with a port # QUIC uses UDP as transport, so treat it as UDP if port and (port, transport) not in seen: @@ -114,6 +114,7 @@ async def handle_event(self, event): "PROTOCOL", parent=event, context="{module} found {event.type}: {event.data[protocol]} on {event.parent.data}", + tags=labels, ) # Extract URLs from HTTP services @@ -152,6 +153,7 @@ async def handle_event(self, event): "TECHNOLOGY", parent=event, context="{module} found {event.type}: {event.data[technology]} on {event.parent.data}", + tags=labels, ) # Extract dns.names (limit to configured max) @@ -167,6 +169,7 @@ async def _emit_host(self, host, event, seen, source): validated = self.helpers.validators.validate_host(host) except ValueError as e: self.debug(f"Error validating host {host} in {source}: {e}") + return if validated and validated not in seen: seen.add(validated) await self.emit_event(