Skip to content
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bbot/modules/censys_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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(
Expand Down