From 5a5c728cf2c5259e18e71e6e070aafb9ce856803 Mon Sep 17 00:00:00 2001 From: Control-Punk-Delete Date: Thu, 26 Mar 2026 08:15:21 +0000 Subject: [PATCH 1/2] Fix module censys_ip --- bbot/modules/censys_ip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bbot/modules/censys_ip.py b/bbot/modules/censys_ip.py index fa82dc33c7..42ce645f71 100644 --- a/bbot/modules/censys_ip.py +++ b/bbot/modules/censys_ip.py @@ -166,7 +166,7 @@ async def _emit_host(self, host, event, seen, source): try: validated = self.helpers.validators.validate_host(host) except ValueError as e: - self.debug(f"Error validating host {host} in {source}: {e}") + return self.debug(f"Error validating host {host} in {source}: {e}") if validated and validated not in seen: seen.add(validated) await self.emit_event( From 7f68880b9f797543e4bc7391c30779b80858e5f3 Mon Sep 17 00:00:00 2001 From: Control-Punk-Delete Date: Thu, 26 Mar 2026 10:15:47 +0000 Subject: [PATCH 2/2] Fix _emit_host function in module censys_ip. Add new tags source (extracting from labels) in module censys_ip --- bbot/modules/censys_ip.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bbot/modules/censys_ip.py b/bbot/modules/censys_ip.py index 42ce645f71..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) @@ -166,7 +168,8 @@ async def _emit_host(self, host, event, seen, source): try: validated = self.helpers.validators.validate_host(host) except ValueError as e: - return self.debug(f"Error validating host {host} in {source}: {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(