Skip to content

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

Bug fixes.

root44b00013e902
diff --git a/Dockerfile b/Dockerfile
index 9d59ee35..ac5fb314 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,7 +15,7 @@
# Pull the base image.
FROM alpine:latest
-ENV SPIDERFOOT_VERSION 2.12.0
+ENV SPIDERFOOT_VERSION 3.0.0
COPY requirements.txt .
# Run everything as one command so that only one layer is created
diff --git a/modules/sfp_github.py b/modules/sfp_github.py
index 8572c838..d098507e 100644
--- a/modules/sfp_github.py
+++ b/modules/sfp_github.py
@@ -217,7 +217,7 @@ class sfp_github(SpiderFootPlugin):
for item in repret:
if type(item) != dict:
- self.sf.error("Encountered an unexpected response from Github.", False)
+ self.sf.debug("Encountered an unexpected or empty response from Github.")
continue
repo_info = self.buildRepoInfo(item)
diff --git a/modules/sfp_opencorporates.py b/modules/sfp_opencorporates.py
index 33f4db26..296963a7 100644
--- a/modules/sfp_opencorporates.py
+++ b/modules/sfp_opencorporates.py
@@ -52,6 +52,8 @@ class sfp_opencorporates(SpiderFootPlugin):
# Search for company name
# https://api.opencorporates.com/documentation/API-Reference
def searchCompany(self, qry):
+ if type(qry) != unicode:
+ qry = qry.encode("utf-8", errors="replace")
params = {
'q': qry,
'format': 'json',
diff --git a/modules/sfp_pgp.py b/modules/sfp_pgp.py
index 4042373b..52bd519c 100644
--- a/modules/sfp_pgp.py
+++ b/modules/sfp_pgp.py
@@ -19,30 +19,29 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
class sfp_pgp(SpiderFootPlugin):
"""PGP Key Look-up:Footprint,Investigate,Passive:Public Registries::Look up e-mail addresses in PGP public key servers."""
-
- results = list()
+ results = dict()
# Default options
opts = {
# options specific to this module
- 'keyserver1_search': "http://pgp.mit.edu/pks/lookup?op=index&search=",
- 'keyserver1_fetch': "http://pgp.mit.edu/pks/lookup?op=get&search=",
- 'keyserver2_search': "https://hkps.pool.sks-keyservers.net/pks/lookup?op=vindex&search=",
- 'keyserver2_fetch': "https://hkps.pool.sks-keyservers.net/pks/lookup?op=get&search="
+ 'keyserver_search1': "https://pgp.key-server.io/pks/lookup?fingerprint=on&op=vindex&search=",
+ 'keyserver_fetch1': "https://pgp.key-server.io/pks/lookup?op=get&search=",
+ 'keyserver_search2': "http://the.earth.li:11371/pks/lookup?op=index&search=",
+ 'keyserver_fetch2': "http://the.earth.li:11371/pks/lookup?op=get&search="
}
# Option descriptions
optdescs = {
- 'keyserver1_search': "PGP public key server URL to find e-mail addresses on a domain. Domain will get appended.",
- 'keyserver1_fetch': "PGP public key server URL to find the public key for an e-mail address. Email address will get appended.",
- 'keyserver2_search': "Backup PGP public key server URL to find e-mail addresses on a domain. Domain will get appended.",
- 'keyserver2_fetch': "Backup PGP public key server URL to find the public key for an e-mail address. Email address will get appended."
+ 'keyserver_search1': "PGP public key server URL to find e-mail addresses on a domain. Domain will get appended.",
+ 'keyserver_fetch1': "PGP public key server URL to find the public key for an e-mail address. Email address will get appended.",
+ 'keyserver_search2': "Backup PGP public key server URL to find e-mail addresses on a domain. Domain will get appended.",
+ 'keyserver_fetch2': "Backup PGP public key server URL to find the public key for an e-mail address. Email address will get appended."
}
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
self.__dataSource__ = "PGP Key Servers"
- self.results = list()
+ self.results = dict()
for opt in userOpts.keys():
self.opts[opt] = userOpts[opt]
@@ -66,18 +65,18 @@ class sfp_pgp(SpiderFootPlugin):
if eventData in self.results:
return None
else:
- self.results.append(eventData)
+ self.results[eventData] = True
self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)
# Get e-mail addresses on this domain
if eventName == "DOMAIN_NAME":
- res = self.sf.fetchUrl(self.opts['keyserver1_search'] + eventData,
+ res = self.sf.fetchUrl(self.opts['keyserver_search1'] + eventData,
timeout=self.opts['_fetchtimeout'],
useragent=self.opts['_useragent'])
if res['content'] is None:
- res = self.sf.fetchUrl(self.opts['keyserver2_search'] + eventData,
+ res = self.sf.fetchUrl(self.opts['keyserver_search2'] + eventData,
timeout=self.opts['_fetchtimeout'],
useragent=self.opts['_useragent'])
@@ -100,12 +99,12 @@ class sfp_pgp(SpiderFootPlugin):
self.notifyListeners(evt)
if eventName == "EMAILADDR":
- res = self.sf.fetchUrl(self.opts['keyserver1_fetch'] + eventData,
+ res = self.sf.fetchUrl(self.opts['keyserver_fetch1'] + eventData,
timeout=self.opts['_fetchtimeout'],
useragent=self.opts['_useragent'])
if res['content'] is None:
- res = self.sf.fetchUrl(self.opts['keyserver2_fetch'] + eventData,
+ res = self.sf.fetchUrl(self.opts['keyserver_fetch2'] + eventData,
timeout=self.opts['_fetchtimeout'],
useragent=self.opts['_useragent'])