SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Use of netaddr, startup dependency check.
smicalleff709c8988dec
diff --git a/README b/READMEindex c0f617de..ee31d3ed 100644--- a/README+++ b/README@@ -19,15 +19,16 @@ https://github.com/smicallef/spiderfootINSTALLING AND RUNNING ON *NIX===============================-SpiderFoot is written in Python (2.6-2.7), so to run on Linux/Solaris/etc. you need Python 2.6 or 2.7 installed, in addition to the M2Crypto, CherryPy and Mako modules. Support for Python 3 will come in the near future.+SpiderFoot is written in Python (2.6-2.7), so to run on Linux/Solaris/etc. you need Python 2.6 or 2.7 installed, in addition to the netaddr, M2Crypto, CherryPy and Mako modules.To install the dependencies using PIP (https://pypi.python.org/pypi/pip), do the following:+$ pip install netaddr$ pip install M2Crypto$ pip install cherrypy$ pip install mako-SpiderFoot was developed against M2Crypto 0.20.2, CherryPy 3.2.2 and Mako 0.7.2. If you run into any issues on newer versions, please let me know.+SpiderFoot was developed against netaddr 0.7.10, M2Crypto 0.20.2, CherryPy 3.2.2 and Mako 0.7.2. If you run into any issues on newer versions, please let me know.DNSPython (http://www.dnspython.org) is also a dependency but is included in the package under the dns directory, so does *not* need to be installed.diff --git a/sf.py b/sf.pyindex 07de7647..13224126 100755--- a/sf.py+++ b/sf.py@@ -9,8 +9,30 @@# Licence: GPL#--------------------------------------------------------------------------------import impimport sys++deps = [ 'M2Crypto', 'netaddr', 'dns', 'cherrypy', 'mako']+for mod in deps:+ try:+ __import__(mod)+ except ImportError as e:+ print ""+ print "Critical Start-up Failure: " + str(e)+ print "================================="+ print "It appears you are missing a module required for SpiderFoot"+ print "to function. Please refer to the README file to get a list of"+ print "the dependencies and install them."+ print ""+ print "Python modules required are: "+ for mod in deps:+ print " - " + mod+ print ""+ print "If you are running on Windows and getting this error, please"+ print "report this as a bug to [email protected]."+ print ""+ sys.exit(-1)++import impimport timeimport cherrypyimport os