Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Gracefully rescue ImportError if module no longer exists - Fix #188

bcoles2acf33d74171
diff --git a/sfscan.py b/sfscan.py
index 6fd97318..bc010248 100644
--- a/sfscan.py
+++ b/sfscan.py
@@ -194,8 +194,13 @@ class SpiderFootScanner(threading.Thread):
if modName == '':
continue
- module = __import__('modules.' + modName, globals(), locals(),
- [modName])
+ try:
+ module = __import__('modules.' + modName, globals(), locals(),
+ [modName])
+ except ImportError:
+ self.ts.sf.error("Failed to load module: " + modName, False)
+ continue
+
mod = getattr(module, modName)()
mod.__name__ = modName