SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
sfp_tool_whatweb: Enforce a timeout to prevent being blocked.
smicallef6517c50da8da
diff --git a/modules/sfp_tool_whatweb.py b/modules/sfp_tool_whatweb.pyindex 91b8779c..a226c095 100644--- a/modules/sfp_tool_whatweb.py+++ b/modules/sfp_tool_whatweb.py@@ -13,7 +13,7 @@import jsonimport os.path-from subprocess import PIPE, Popen+from subprocess import PIPE, Popen, TimeoutExpiredfrom spiderfoot import SpiderFootEvent, SpiderFootPlugin, SpiderFootHelpers@@ -128,8 +128,13 @@ class sfp_tool_whatweb(SpiderFootPlugin):eventData]try:- p = Popen(args, stdout=PIPE, stderr=PIPE)+ p = Popen(args, stdout=PIPE, stderr=PIPE, timeout=300)stdout, stderr = p.communicate(input=None)+ except TimeoutExpired:+ p.kill()+ stdout, stderr = p.communicate()+ self.debug(f"Timed out waiting for WhatWeb to finish against {eventData}")+ returnexcept Exception as e:self.error(f"Unable to run WhatWeb: {e}")return