SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Fixes/improvements.
Steve66354d9efeba
diff --git a/modules/sfp_onioncity.py b/modules/sfp_onioncity.pyindex d53e7ad6..038b4b56 100644--- a/modules/sfp_onioncity.py+++ b/modules/sfp_onioncity.py@@ -15,7 +15,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventimport reclass sfp_onioncity(SpiderFootPlugin):- """Onion.city:Footprint,Investigate:Search Engines::Search Tor 'Onion City' search engine for mentions of the target domain."""+ """Onion.link:Footprint,Investigate:Search Engines::Search Tor 'Onion City' search engine for mentions of the target domain."""# Default options@@ -63,7 +63,7 @@ class sfp_onioncity(SpiderFootPlugin):self.results.append(eventData)# Sites hosted on the domain- pages = self.sf.googleIterate("site:onion.city+" + eventData,+ pages = self.sf.googleIterate("site:onion.link+" + eventData,dict(limit=self.opts['pages'], useragent=self.opts['_useragent'],timeout=self.opts['_fetchtimeout']))if pages is None:@@ -95,10 +95,10 @@ class sfp_onioncity(SpiderFootPlugin):else:self.results.append(link)self.sf.debug("Found a darknet mention: " + link)- if self.sf.urlFQDN(link).endswith(".onion.city"):+ if self.sf.urlFQDN(link).endswith(".onion.link"):if self.checkForStop():return None- torlink = link.replace(".onion.city", ".onion")+ torlink = link.replace(".onion.link", ".onion")if self.opts['fetchlinks']:res = self.sf.fetchUrl(torlink, timeout=self.opts['_fetchtimeout'],useragent=self.opts['_useragent'])diff --git a/modules/sfp_tldsearch.py b/modules/sfp_tldsearch.pyindex 31ae8701..58a5b4c0 100644--- a/modules/sfp_tldsearch.py+++ b/modules/sfp_tldsearch.py@@ -21,7 +21,6 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_tldsearch(SpiderFootPlugin):"""TLD Search:Footprint:DNS:slow:Search all Internet TLDs for domains with the same name as the target (this can be very slow.)"""-# Default optionsopts = {'activeonly': True, # Only report domains that have content (try to fetch the page)@@ -60,7 +59,9 @@ class sfp_tldsearch(SpiderFootPlugin):def producedEvents(self):return ["SIMILARDOMAIN"]- def tryTld(self, target):+ def tryTld(self, target, tld):+ if self.opts['skipwildcards'] and self.sf.checkDnsWildcard(tld):+ return Nonetry:addrs = socket.gethostbyname_ex(target)self.tldResults[target] = True@@ -75,9 +76,10 @@ class sfp_tldsearch(SpiderFootPlugin):# Spawn threads for scanningself.sf.info("Spawning threads to check TLDs: " + str(tldList))- for tld in tldList:+ for pair in tldList:+ (domain, tld) = pairtn = 'sfp_tldsearch_' + str(random.randint(0, 999999999))- t.append(threading.Thread(name=tn, target=self.tryTld, args=(tld,)))+ t.append(threading.Thread(name=tn, target=self.tryTld, args=(domain, tld,)))t[i].start()i += 1@@ -91,7 +93,7 @@ class sfp_tldsearch(SpiderFootPlugin):if not found:running = False- time.sleep(2)+ time.sleep(1)for res in self.tldResults.keys():if self.tldResults[res] and res not in self.results:@@ -152,16 +154,13 @@ class sfp_tldsearch(SpiderFootPlugin):if tld.endswith(".arpa"):continue- if self.opts['skipwildcards'] and self.sf.checkDnsWildcard(tld):- continue-tryDomain = keyword + "." + tldif self.checkForStop():return Noneif len(targetList) <= self.opts['maxthreads']:- targetList.append(tryDomain)+ targetList.append([tryDomain, tld])else:self.tryTldWrapper(targetList, event)targetList = list()