Skip to content

Commit

Permalink
only emit ORG_STUB for registered domains
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Dec 15, 2023
1 parent d54f681 commit 3261e94
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bbot/modules/internal/speculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,12 @@ async def handle_event(self, event):
# ORG_STUB from TLD, SOCIAL, AZURE_TENANT
org_stubs = set()
if event.type == "DNS_NAME" and event.scope_distance == 0:
tld_stub = getattr(self.helpers.tldextract(event.data), "domain", "")
if tld_stub:
org_stubs.add(tld_stub)
tldextracted = self.helpers.tldextract(event.data)
registered_domain = getattr(tldextracted, "registered_domain", "")
if registered_domain:
tld_stub = getattr(tldextracted, "domain", "")
if tld_stub:
org_stubs.add(tld_stub)
elif event.type == "SOCIAL":
stub = event.data.get("stub", "")
if stub:
Expand Down

0 comments on commit 3261e94

Please sign in to comment.