diff --git a/README.md b/README.md index 74c696dd..ce6775b1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ +Forked for bugfixes: +* supports config in /etc/datasploit +* fixes requirements checking. + +In the future: +* improve exception handling for tools which do not have a provided API(i.e. +auto-skip/disable) + [![ToolsWatch Best Tools](https://www.toolswatch.org/badges/toptools/2016.svg)](http://www.toolswatch.org/2017/02/2016-top-security-tools-as-voted-by-toolswatch-org-readers/) [![Arsenal-2017-EU](https://github.com/toolswatch/badges/blob/master/arsenal/europe/2017.svg)](http://www.toolswatch.org/2017/09/black-hat-arsenal-europe-2017-lineup/) diff --git a/config_sample.py b/config_sample.py index a36ef711..77163ba1 100755 --- a/config_sample.py +++ b/config_sample.py @@ -2,6 +2,10 @@ #added to gitignore so will not be syned #Backup in ~/Desktop/config.py_backup +# The location of this file will be checked in order: +# program $PWD, generally /usr/share/datasploit +# /etc/datasploit/ +# ~/.config/datasploit/ shodan_api="" bing_api="" diff --git a/datasploit.py b/datasploit.py index 399d2294..74a1e605 100755 --- a/datasploit.py +++ b/datasploit.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import dep_check dep_check.check_dependency() @@ -43,6 +43,12 @@ def main(argv): ds_dir=os.path.dirname(os.path.realpath(__file__)) config_file_path = os.path.join(ds_dir,"config.py") config_sample_path= os.path.join(ds_dir,"config_sample.py") + # If there is a systemwide config, use that instead + if os.path.isfile('/etc/datasploit/config.py') is True: + config_file_path = '/etc/datasploit/config.py' + elif os.path.isfile(os.getenv('HOME') + '/.config/datasploit/config.py') is True: + config_file_path = os.getenv('HOME') + '/.config/datasploit/config.py' + print os.path.exists(config_file_path) if not os.path.exists(config_file_path): print "[+] Looks like a new setup, setting up the config file." diff --git a/datasploit_config.py b/datasploit_config.py index 4602dbb4..85ea9780 100755 --- a/datasploit_config.py +++ b/datasploit_config.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os, subprocess, tempfile diff --git a/dep_check.py b/dep_check.py index 474251b8..75b8c328 100644 --- a/dep_check.py +++ b/dep_check.py @@ -1,20 +1,29 @@ -import pip +import pkg_resources import sys def check_dependency(): list_deps = [] missing_deps = [] - with open('requirements.txt') as f: - list_deps = f.read().splitlines() + try: + with open('requirements.txt') as f: + list_deps = f.read().splitlines() + except: + print "Cannot read requirements.txt to check for missing modules, exiting..." + sys.exit() - pip_list = sorted([(i.key) for i in pip.get_installed_distributions()]) + # get list of installed python packages + pip_list = [] + for item in pkg_resources.working_set.entry_keys: + pip_list += pkg_resources.working_set.entry_keys[item] for req_dep in list_deps: if req_dep not in pip_list: missing_deps.append(req_dep) if missing_deps: - print "You are missing a module for Datasploit. Please install them using: " - print "pip install -r requirements.txt" + print "You are missing a module for Datasploit:" + for module in missing_deps: + print module + print "Please install them using: pip install -r requirements.txt" sys.exit() diff --git a/docs/Writing_Modules.md b/docs/Writing_Modules.md index de14fb21..fbd016fc 100644 --- a/docs/Writing_Modules.md +++ b/docs/Writing_Modules.md @@ -100,7 +100,7 @@ Each of these folder houses scripts of it's own kind, i.e., scripts working on d To write a new script for a module, there is a `template.py` located in each module directory to help you get started quickly. Following is the contents of the template.py file in the domain module: ```python -#!/usr/bin/env python +#!/usr/bin/env python2 import base import config as cfg @@ -251,4 +251,4 @@ Adding a new module is also pretty straight forward. For example, let's say we w That's all. This configures the new mobile module to either run as a whole using the datasploit.py or mobileOsint.py file or as standalone scripts using the mobile_scriptname.py files inside the mobile folder. -The possibilities of extending dataSploit are endless. New modules and scripts are easily integrable as mentioned above. We look forward to seeing contribution from the community to help increase the capabilites of dataSploit. \ No newline at end of file +The possibilities of extending dataSploit are endless. New modules and scripts are easily integrable as mentioned above. We look forward to seeing contribution from the community to help increase the capabilites of dataSploit. diff --git a/domain/domain_GooglePDF.py b/domain/domain_GooglePDF.py index 27271ab0..c6047b18 100755 --- a/domain/domain_GooglePDF.py +++ b/domain/domain_GooglePDF.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/domain/domain_censys.py b/domain/domain_censys.py index b57a5ac4..1963d7f6 100755 --- a/domain/domain_censys.py +++ b/domain/domain_censys.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import re, sys, json, time, requests import vault diff --git a/domain/domain_checkpunkspider.py b/domain/domain_checkpunkspider.py index 8bf09b22..4901c56f 100755 --- a/domain/domain_checkpunkspider.py +++ b/domain/domain_checkpunkspider.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import requests diff --git a/domain/domain_dnsrecords.py b/domain/domain_dnsrecords.py index 88b5407d..1d055457 100755 --- a/domain/domain_dnsrecords.py +++ b/domain/domain_dnsrecords.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/domain/domain_emailhunter.py b/domain/domain_emailhunter.py index ab255fe5..560c9e8d 100755 --- a/domain/domain_emailhunter.py +++ b/domain/domain_emailhunter.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/domain/domain_forumsearch.py b/domain/domain_forumsearch.py index f2107ff6..b826f290 100755 --- a/domain/domain_forumsearch.py +++ b/domain/domain_forumsearch.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import requests diff --git a/domain/domain_github.py b/domain/domain_github.py index 8852e387..a8c660a4 100755 --- a/domain/domain_github.py +++ b/domain/domain_github.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/domain/domain_googletracking.py b/domain/domain_googletracking.py index 79dc3821..c7fadee5 100755 --- a/domain/domain_googletracking.py +++ b/domain/domain_googletracking.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/domain/domain_history.py b/domain/domain_history.py index ff8fe69c..de4cdd9a 100755 --- a/domain/domain_history.py +++ b/domain/domain_history.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/domain/domain_pagelinks.py b/domain/domain_pagelinks.py index 62632935..1f5ca1bd 100755 --- a/domain/domain_pagelinks.py +++ b/domain/domain_pagelinks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/domain/domain_pastes.py b/domain/domain_pastes.py index cbf24e5c..1a865815 100755 --- a/domain/domain_pastes.py +++ b/domain/domain_pastes.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/domain/domain_shodan.py b/domain/domain_shodan.py index 86b5d9d4..7deff472 100755 --- a/domain/domain_shodan.py +++ b/domain/domain_shodan.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/domain/domain_subdomains.py b/domain/domain_subdomains.py index 4cf9363e..dae1afa7 100755 --- a/domain/domain_subdomains.py +++ b/domain/domain_subdomains.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/domain/domain_urlscanio.py b/domain/domain_urlscanio.py index 42110c17..613203bf 100755 --- a/domain/domain_urlscanio.py +++ b/domain/domain_urlscanio.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import json diff --git a/domain/domain_wappalyzer.py b/domain/domain_wappalyzer.py index 2f8faf6d..43b57c01 100755 --- a/domain/domain_wappalyzer.py +++ b/domain/domain_wappalyzer.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base from Wappalyzer import Wappalyzer, WebPage diff --git a/domain/domain_whois.py b/domain/domain_whois.py index 2dd8a5e7..b696c2d8 100755 --- a/domain/domain_whois.py +++ b/domain/domain_whois.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/domain/domain_wikileaks.py b/domain/domain_wikileaks.py index 51501978..a097bca9 100755 --- a/domain/domain_wikileaks.py +++ b/domain/domain_wikileaks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import requests diff --git a/domain/domain_zoomeye.py b/domain/domain_zoomeye.py index 75878ee1..781e307a 100755 --- a/domain/domain_zoomeye.py +++ b/domain/domain_zoomeye.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import requests diff --git a/domain/template.py b/domain/template.py index 09830303..cd4bdd6a 100755 --- a/domain/template.py +++ b/domain/template.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/domainOsint.py b/domainOsint.py index 403d87bc..c5ab1002 100755 --- a/domainOsint.py +++ b/domainOsint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import osint_runner diff --git a/emailOsint.py b/emailOsint.py index 943b4ab2..dcc4e8ed 100755 --- a/emailOsint.py +++ b/emailOsint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import osint_runner diff --git a/emails/email_basic_checks.py b/emails/email_basic_checks.py index 6c8f5ff5..8e36e177 100755 --- a/emails/email_basic_checks.py +++ b/emails/email_basic_checks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/emails/email_clearbit.py b/emails/email_clearbit.py index 665e99b9..fc767e4d 100755 --- a/emails/email_clearbit.py +++ b/emails/email_clearbit.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/emails/email_fullcontact.py b/emails/email_fullcontact.py index 6d698809..1f49a6b0 100755 --- a/emails/email_fullcontact.py +++ b/emails/email_fullcontact.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import requests diff --git a/emails/email_hacked_emails.py b/emails/email_hacked_emails.py index 5aac36c5..ce5db1b3 100644 --- a/emails/email_hacked_emails.py +++ b/emails/email_hacked_emails.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/emails/email_haveibeenpwned.py b/emails/email_haveibeenpwned.py index 592b0b26..ebf2af8d 100755 --- a/emails/email_haveibeenpwned.py +++ b/emails/email_haveibeenpwned.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/emails/email_pastes.py b/emails/email_pastes.py index e521b9bb..3a4112ca 100755 --- a/emails/email_pastes.py +++ b/emails/email_pastes.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/emails/email_scribd.py b/emails/email_scribd.py index 08d0ea7b..a94b27ec 100755 --- a/emails/email_scribd.py +++ b/emails/email_scribd.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import re diff --git a/emails/email_slideshare.py b/emails/email_slideshare.py index 6bfb715b..81b51ff1 100755 --- a/emails/email_slideshare.py +++ b/emails/email_slideshare.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/emails/email_whoismind.py b/emails/email_whoismind.py index a28a6269..12fc38b2 100755 --- a/emails/email_whoismind.py +++ b/emails/email_whoismind.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/emails/template.py b/emails/template.py index b2e4e42d..c3360554 100755 --- a/emails/template.py +++ b/emails/template.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/ip/ip_shodan.py b/ip/ip_shodan.py index 98fbe5cc..a73239fd 100755 --- a/ip/ip_shodan.py +++ b/ip/ip_shodan.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/ip/ip_virustotal.py b/ip/ip_virustotal.py index 4cea3e76..7dce60e3 100644 --- a/ip/ip_virustotal.py +++ b/ip/ip_virustotal.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/ip/ip_whois.py b/ip/ip_whois.py index 3d9826c6..d2eb778e 100755 --- a/ip/ip_whois.py +++ b/ip/ip_whois.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 from ipwhois import IPWhois import sys diff --git a/ip/template.py b/ip/template.py index 52b57340..0a6cdcc1 100755 --- a/ip/template.py +++ b/ip/template.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/ipOsint.py b/ipOsint.py index e71024ab..12cf8978 100755 --- a/ipOsint.py +++ b/ipOsint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import osint_runner diff --git a/username/template.py b/username/template.py index 0427ea0a..10061473 100755 --- a/username/template.py +++ b/username/template.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/username/username_gitemails.py b/username/username_gitemails.py index 704ffb52..738fbc84 100755 --- a/username/username_gitemails.py +++ b/username/username_gitemails.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/username/username_gitlabdetails.py b/username/username_gitlabdetails.py index 4564e347..83cdb852 100644 --- a/username/username_gitlabdetails.py +++ b/username/username_gitlabdetails.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys from termcolor import colored diff --git a/username/username_gitscrape.py b/username/username_gitscrape.py index 7b3431d6..50d0d773 100755 --- a/username/username_gitscrape.py +++ b/username/username_gitscrape.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/username/username_gituserdetails.py b/username/username_gituserdetails.py index 1d44553a..9352fc6b 100755 --- a/username/username_gituserdetails.py +++ b/username/username_gituserdetails.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/username/username_keybase.py b/username/username_keybase.py index 0bdeb47e..6e13c6b7 100644 --- a/username/username_keybase.py +++ b/username/username_keybase.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/username/username_profilepic.py b/username/username_profilepic.py index 62b91761..71768cab 100755 --- a/username/username_profilepic.py +++ b/username/username_profilepic.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import os diff --git a/username/username_redditdetails.py b/username/username_redditdetails.py index c0194ec8..ebb48183 100644 --- a/username/username_redditdetails.py +++ b/username/username_redditdetails.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import json diff --git a/username/username_tinder.py b/username/username_tinder.py index 0c6dc2b8..c1ff312e 100755 --- a/username/username_tinder.py +++ b/username/username_tinder.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import os diff --git a/username/username_traviscidetails.py b/username/username_traviscidetails.py index 95555860..cfe75445 100644 --- a/username/username_traviscidetails.py +++ b/username/username_traviscidetails.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Credits: https://github.com/int0x80/tcispy diff --git a/username/username_twitterdetails.py b/username/username_twitterdetails.py index f81d6d57..2c5b7d7b 100755 --- a/username/username_twitterdetails.py +++ b/username/username_twitterdetails.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/username/username_usernamesearch.py b/username/username_usernamesearch.py index 438a21ea..e9edec43 100755 --- a/username/username_usernamesearch.py +++ b/username/username_usernamesearch.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import sys diff --git a/username/username_youtubedetails.py b/username/username_youtubedetails.py index 595b1ff2..19337fa8 100644 --- a/username/username_youtubedetails.py +++ b/username/username_youtubedetails.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import base import vault diff --git a/usernameOsint.py b/usernameOsint.py index de6281ac..c743712e 100755 --- a/usernameOsint.py +++ b/usernameOsint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import osint_runner