Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
smicallef committed Jan 24, 2021
2 parents ec507ba + 2f1d7eb commit fc8e0b8
Show file tree
Hide file tree
Showing 229 changed files with 269 additions and 238 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ language: python
python:
- "3.6"
- "3.8"
- "3.9"

cache: pip

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SpiderFoot 3.3-DEV
SpiderFoot 3.3
6 changes: 3 additions & 3 deletions dyn/HEADER.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>SpiderFoot v3.3-DEV</title>
<title>SpiderFoot v3.3</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
Expand Down Expand Up @@ -64,13 +64,13 @@ class="nav-item"><a href="${docroot}/opts" class="nav-link"><i class="glyphicon
<div class="modal-content">

<div class="modal-header">
<h3 class="modal-title">SpiderFoot 3.3-DEV</h3>
<h3 class="modal-title">SpiderFoot 3.3</h3>
</div>

<div class="modal-body">
<p>SpiderFoot is an open source, GPL-licensed footprinting tool, created by <a href='https://twitter.com/binarypool' target=_new>Steve Micallef</a>. It is designed to be easy to use, fast and extensible.</p>
<p>If you have any bugs to report, or requests for enhancements, please contact the support mailing list at <a href=mailto:support@spiderfoot.net>support@spiderfoot.net</a>.
<p>You are running version <b>3.3-DEV</b>.</p>
<p>You are running version <b>3.3</b>.</p>
<p> Visit the project website at <a href='https://www.spiderfoot.net/r.php?u=aHR0cHM6Ly93d3cuc3BpZGVyZm9vdC5uZXQv&s=os_int' target=_new>https://www.spiderfoot.net/</a>.</p>
<p> View the documentation at <a href='https://www.spiderfoot.net/documentation/' target=_new>https://www.spiderfoot.net/documentation/</a>.</p>
<p> Check out the Github repo at <a href='https://github.com/smicallef/spiderfoot' target=_new>https://github.com/smicallef/spiderfoot</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion modules/sfp_archiveorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def handleEvent(self, event):
ret = None

if not ret:
self.sf.error("Unable to process empty response from archive.org: {eventData}")
self.sf.debug("Empty response from archive.org for {eventData}")
continue

if len(ret['archived_snapshots']) < 1:
Expand Down
4 changes: 4 additions & 0 deletions modules/sfp_binaryedge.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ def handleEvent(self, event):

try:
banner = prec['result']['data']['service']['banner']
if '\\r\\n\\r\\n' in banner and "HTTP/" in banner:
# We don't want the content after HTTP banners
banner = banner.split('\\r\\n\\r\\n')[0]
banner = banner.replace("\\r\\n", "\n")
except Exception:
self.sf.debug("No banner information found.")
continue
Expand Down
9 changes: 9 additions & 0 deletions modules/sfp_pageinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ def handleEvent(self, event):
self.sf.debug("Not gathering page info for external site " + eventSource)
return

# Ignore javascript and CSS
if ".css?" in eventSource or eventSource.endswith(".css"):
self.sf.debug("Not attempting to match CSS content.")
return

if ".js?" in eventSource or eventSource.endswith(".js"):
self.sf.debug("Not attempting to match JS content.")
return

if eventSource in self.results:
self.sf.debug("Already checked this page for a page type, skipping.")
return
Expand Down
2 changes: 2 additions & 0 deletions modules/sfp_s3bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ def handleEvent(self, event):
if eventName == "LINKED_URL_EXTERNAL":
if ".amazonaws.com" in eventData:
b = self.sf.urlFQDN(eventData)
if b in self.opts['endpoints']:
b += "/" + eventData.split(b + "/")[1].split("/")[0]
evt = SpiderFootEvent("CLOUD_STORAGE_BUCKET", b, self.__name__, event)
self.notifyListeners(evt)
return None
Expand Down
12 changes: 6 additions & 6 deletions modules/sfp_scylla.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class sfp_scylla(SpiderFootPlugin):
'useCases': ["Footprint", "Investigate", "Passive"],
'categories': ["Leaks, Dumps and Breaches"],
'dataSource': {
'website': "https://scylla.sh/",
'website': "https://scylla.so/",
'model': "FREE_NOAUTH_UNLIMITED",
'references': [
"https://scylla.sh/crowdsource"
"https://scylla.so/crowdsource"
],
'favIcon': "",
'logo': "",
'description': "scylla.sh has two major goals. One is to have a community-oriented database leak community "
'description': "scylla.so has two major goals. One is to have a community-oriented database leak community "
"that is a useful tool for security researchers.\n"
"The other major goal is to undercut those people that are selling databases.",
}
Expand Down Expand Up @@ -76,15 +76,15 @@ def producedEvents(self):
# Query Scylla API
def query(self, qry, per_page=20, start=0):
params = {
'q': 'Email:@' + qry.encode('raw_unicode_escape').decode("ascii", errors='replace'),
'q': 'email:@' + qry.encode('raw_unicode_escape').decode("ascii", errors='replace'),
'size': str(per_page),
'start': str(start)
}

headers = {
'Accept': 'application/json'
}
res = self.sf.fetchUrl('https://scylla.sh/search?' + urllib.parse.urlencode(params),
res = self.sf.fetchUrl('https://scylla.so/search?' + urllib.parse.urlencode(params),
headers=headers,
timeout=15,
useragent=self.opts['_useragent'],
Expand All @@ -99,7 +99,7 @@ def query(self, qry, per_page=20, start=0):
return None

if res['content'] is None:
self.sf.debug('No response from Scylla.sh')
self.sf.debug('No response from Scylla.so')
return None

try:
Expand Down
21 changes: 18 additions & 3 deletions modules/sfp_shodan.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ def query(self, qry):
return None

try:
return json.loads(res['content'])
r = json.loads(res['content'])
if "error" in r:
self.sf.error("Error returned form SHODAN: {r['error']}")
return None
return r
except Exception as e:
self.sf.error(f"Error processing JSON response from SHODAN: {e}")
return None
Expand All @@ -115,7 +119,11 @@ def searchHosts(self, qry):
return None

try:
return json.loads(res['content'])
r = json.loads(res['content'])
if "error" in r:
self.sf.error("Error returned form SHODAN: {r['error']}")
return None
return r
except Exception as e:
self.sf.error(f"Error processing JSON response from SHODAN: {e}")
return None
Expand All @@ -136,7 +144,14 @@ def searchHtml(self, qry):
return None

try:
return json.loads(res['content'])
r = json.loads(res['content'])
if "error" in r:
self.sf.error("Error returned form SHODAN: {r['error']}")
return None
if r.get('total', 0) == 0:
self.sf.info("No SHODAN info found for {qry}")
return None
return r
except Exception as e:
self.sf.error(f"Error processing JSON response from SHODAN: {e}")
return None
Expand Down
8 changes: 4 additions & 4 deletions modules/sfp_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def processUrl(self, url):
self.getTarget().getNames())

if not links:
self.sf.info(f"No links found at {url}")
self.sf.debug(f"No links found at {url}")
return None

# Notify modules about the links found
Expand Down Expand Up @@ -301,7 +301,7 @@ def handleEvent(self, event):
if spiderTarget is None:
return None

self.sf.info("Initiating spider of " + spiderTarget + " from " + srcModuleName)
self.sf.debug("Initiating spider of " + spiderTarget + " from " + srcModuleName)

# Link the spidered URL to the event that triggered it
self.urlEvents[spiderTarget] = event
Expand Down Expand Up @@ -368,7 +368,7 @@ def spiderFrom(self, startingPoint):
break

nextLinks = self.cleanLinks(links)
self.sf.info(f"Found links: {nextLinks}")
self.sf.debug(f"Found links: {nextLinks}")

# We've scanned through another layer of the site
levelsTraversed += 1
Expand All @@ -379,7 +379,7 @@ def spiderFrom(self, startingPoint):

# We've reached the end of our journey..
if len(nextLinks) == 0:
self.sf.info("No more links found to spider, finishing..")
self.sf.debug("No more links found to spider, finishing..")
keepSpidering = False

# We've been asked to stop scanning
Expand Down
4 changes: 2 additions & 2 deletions sf.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main():
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.db',
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down Expand Up @@ -115,7 +115,7 @@ def main():

# Legacy way to run the server
args = None
p = argparse.ArgumentParser(description='SpiderFoot 3.3-DEV: Open Source Intelligence Automation.')
p = argparse.ArgumentParser(description='SpiderFoot 3.3: Open Source Intelligence Automation.')
p.add_argument("-d", "--debug", action='store_true', help="Enable debug output.")
p.add_argument("-l", metavar="IP:port", help="IP and port to listen on.")
p.add_argument("-m", metavar="mod1,mod2,...", type=str, help="Modules to enable.")
Expand Down
2 changes: 1 addition & 1 deletion sfcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class bcolors:


class SpiderFootCli(cmd.Cmd):
version = "3.3-DEV"
version = "3.3"
pipecmd = None
output = None
modules = []
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_sfwebui.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setup_server():
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp__stor_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModule_stor_db(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp__stor_stdout.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModule_stor_stdout(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_abusech.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModuleabusech(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_abuseipdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModuleabuseipdb(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModuleaccounts(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_adblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModuleadblock(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_ahmia.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModuleahmia(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_alienvault.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModulealienvault(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_alienvaultiprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModulealienvaultiprep(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_apility.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModuleapility(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/modules/test_sfp_apple_itunes.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestModuleAppleItunes(unittest.TestCase):
'_internettlds': 'https://publicsuffix.org/list/effective_tld_names.dat',
'_internettlds_cache': 72,
'_genericusers': "abuse,admin,billing,compliance,devnull,dns,ftp,hostmaster,inoc,ispfeedback,ispsupport,list-request,list,maildaemon,marketing,noc,no-reply,noreply,null,peering,peering-notify,peering-request,phish,phishing,postmaster,privacy,registrar,registry,root,routing-registry,rr,sales,security,spam,support,sysadmin,tech,undisclosed-recipients,unsubscribe,usenet,uucp,webmaster,www",
'__version__': '3.3-DEV',
'__version__': '3.3',
'__database': 'spiderfoot.test.db', # note: test database file
'__modules__': None, # List of modules. Will be set after start-up.
'_socks1type': '',
Expand Down
Loading

0 comments on commit fc8e0b8

Please sign in to comment.