diff --git a/bbot/modules/chaos.py b/bbot/modules/chaos.py index 9c4255e542..0feb42d64d 100644 --- a/bbot/modules/chaos.py +++ b/bbot/modules/chaos.py @@ -34,6 +34,10 @@ async def parse_results(self, r, query): domain = j.get("domain", "") if domain: subdomains = j.get("subdomains", []) + if len(subdomains) > 10000: + # In extremely rare cases, Chaos API returns a gigaton of subdomains. + # If that happens, we simply treat the domain as a wildcard. + subdomains = ["*"] for s in subdomains: s = s.lower().strip(".*") subdomains_set.add(s)