SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Respect throttling.
Steve91cc7e606855
diff --git a/modules/sfp_pwned.py b/modules/sfp_pwned.pyindex 7f5e3945..2c8e2658 100644--- a/modules/sfp_pwned.py+++ b/modules/sfp_pwned.py@@ -11,6 +11,7 @@import sysimport json+import timefrom sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_pwned(SpiderFootPlugin):@@ -66,12 +67,18 @@ class sfp_pwned(SpiderFootPlugin):url = "https://haveibeenpwned.com/api/v2/breachedaccount/" + qryhdrs = { "Accept": "application/vnd.haveibeenpwned.v2+json" }+ # https://haveibeenpwned.com/API/v2#RateLimiting+ time.sleep(1.5)res = self.sf.fetchUrl(url, timeout=self.opts['_fetchtimeout'],useragent="SpiderFoot", headers=hdrs)- if res['code'] == 404:+ if res['code'] in [ 404, "404" ]:return None+ if res['code'] in [ 429, "429" ]:+ # Back off a little further+ time.sleep(2)+try:ret = json.loads(res['content'])except Exception as e: