├── _config.yml ├── contributors.txt ├── Presentations └── bh_USA_Arsenal_2016.pptx ├── mkdocs.yml ├── check_urls.txt ├── generate_passwords.py ├── requirements.txt ├── roadmap.txt ├── domain_whois.py ├── domain_pagelinks.py ├── config_sample.py ├── ipOsint.py ├── domain_shodan.py ├── domain_emailhunter.py ├── domain_forumsearch.py ├── docs ├── Usage.md ├── contiributors.md ├── setupGuide.md ├── home.md ├── index.md └── apiGeneration.md ├── domain_history.py ├── domain_github.py ├── domain_wikileaks.py ├── active_default_file_check.py ├── .gitignore ├── domain_wappalyzer.py ├── domain_checkpunkspider.py ├── domain_dnsrecords.py ├── domain_GooglePDF.py ├── domain_zoomeye.py ├── README.md ├── username_gitscrape.py ├── datasploit.py ├── email_basic_checks.py ├── ip_whois.py ├── email_fullcontact.py ├── domain_censys.py ├── email_pastes.py ├── domain_pastes.py ├── ip_shodan.py ├── emailOsint.py ├── usernameOsint.py ├── domain_subdomains.py ├── domainOsint.py └── License.txt /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /contributors.txt: -------------------------------------------------------------------------------- 1 | upgoingstar 2 | nutanpanda 3 | sudhanshu_c 4 | -------------------------------------------------------------------------------- /Presentations/bh_USA_Arsenal_2016.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0xbharath/datasploit/HEAD/Presentations/bh_USA_Arsenal_2016.pptx -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: DataSploit 2 | pages: 3 | - 'Overview': 'index.md' 4 | - 'Setting up the Environment': 'setupGuide.md' 5 | - 'How to Generate Api Keys': 'apiGeneration.md' 6 | - Usage: 'Usage.md' 7 | - Contributors: 'contiributors.md' 8 | 9 | -------------------------------------------------------------------------------- /check_urls.txt: -------------------------------------------------------------------------------- 1 | web.config 2 | robots.txt 3 | htaccess.txt 4 | trace.axd 5 | readme.html 6 | admin.php 7 | admin 8 | phpinfo.php 9 | sitemap.xml 10 | config.xml 11 | crossdomain.xml 12 | Joomla.xml 13 | readme.txt 14 | .git 15 | admin/ 16 | wp-login.php 17 | -------------------------------------------------------------------------------- /generate_passwords.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | 5 | combination = ["123@%s", "%s@123", "123%s", "%s123"] 6 | email = sys.argv[1] 7 | 8 | user = email.split("@")[0] 9 | print 10 | 11 | for x in combination: 12 | print x % (user) 13 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | anyjson==0.3.3 2 | BeautifulSoup==3.2.1 3 | beautifulsoup4==4.4.1 4 | billiard==3.3.0.23 5 | bs4==0.0.1 6 | clearbit==0.1.4 7 | config==0.3.9 8 | dnspython==1.14.0 9 | future==0.15.2 10 | idna==2.1 11 | json2html==1.0.1 12 | lxml==3.6.0 13 | piplapis-python==5.1.0 14 | pymongo==3.3.0 15 | python-Wappalyzer==0.2.2 16 | python-whois==0.6.2 17 | pytz==2016.6.1 18 | requests==2.10.0 19 | requests-file==1.4 20 | simplejson==3.8.2 21 | tldextract==2.0.1 22 | tqdm==4.7.6 23 | termcolor 24 | -------------------------------------------------------------------------------- /roadmap.txt: -------------------------------------------------------------------------------- 1 | # Dump parent dictionary in Db. 2 | # Make web UI. Fetch from Db. 3 | # Old search? Get details from DB. New one, make a new search, ask user to wait for 5 minutes. 4 | # Seperate tile for each result set. 5 | # Result set data should be linkable to respective module. Ex. Clicking on username should call usernameosint.py 6 | 7 | # Design pluggable APIs structure so the tool works as a framework. 8 | # Option to configure Alerting and monitoring on all result set specific to an entity. Based on hash mismatch, send alerts. -------------------------------------------------------------------------------- /domain_whois.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import whois 5 | from termcolor import colored 6 | import time 7 | 8 | class style: 9 | BOLD = '\033[1m' 10 | END = '\033[0m' 11 | 12 | 13 | def whoisnew(domain): 14 | print colored(style.BOLD + '---> Finding Whois Information.' + style.END, 'blue') 15 | time.sleep(0.3) 16 | whoisdict = {} 17 | w = whois.whois(domain) 18 | return w 19 | 20 | 21 | def main(): 22 | domain = sys.argv[1] 23 | print whoisnew(domain) 24 | print "\n-----------------------------\n" 25 | 26 | 27 | if __name__ == "__main__": 28 | main() 29 | -------------------------------------------------------------------------------- /domain_pagelinks.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import requests 5 | from termcolor import colored 6 | import time 7 | 8 | class style: 9 | BOLD = '\033[1m' 10 | END = '\033[0m' 11 | 12 | 13 | def pagelinks(domain): 14 | print colored(style.BOLD + '\n---> Finding Pagelinks:\n' + style.END, 'blue') 15 | time.sleep(0.3) 16 | try: 17 | req = requests.get('http://api.hackertarget.com/pagelinks/?q=%s'%(domain)) 18 | page_links = req.content.split("\n") 19 | return page_links 20 | except: 21 | print 'Connection time out.' 22 | return [] 23 | 24 | def main(): 25 | domain = sys.argv[1] 26 | #domain pagelinks 27 | 28 | links=pagelinks(domain) 29 | for x in links: 30 | print x 31 | print "\n-----------------------------\n" 32 | 33 | 34 | if __name__ == "__main__": 35 | main() 36 | -------------------------------------------------------------------------------- /config_sample.py: -------------------------------------------------------------------------------- 1 | #Store all your config's here. 2 | #added to gitignore so will not be syned 3 | shodan_api="" 4 | bing_api="" 5 | github_access_token="" 6 | builtwith_api="" 7 | censysio_id="" 8 | censysio_secret="" 9 | facebook_access_token = "" 10 | google_cse_key="" 11 | google_cse_cx = "" 12 | flickr_api="" 13 | google_api="" 14 | google_cse="" 15 | hashes_api="" 16 | instagram_api="" 17 | instagram_secret="" 18 | ipinfodb_api="" 19 | jigsaw_api="" 20 | jigsaw_password="" 21 | jigsaw_username="" 22 | linkedin_api="" 23 | linkedin_secret="" 24 | twitter_consumer_key="" 25 | twitter_consumer_secret="" 26 | twitter_access_token = "" 27 | twiter_access_token_secret = "" 28 | zoomeyeuser = "" 29 | zoomeyepass = "" 30 | clearbit_apikey = "" 31 | emailhunter="" 32 | jsonwhois="" 33 | fullcontact_api = "" 34 | mailboxlayer_api = "" 35 | -------------------------------------------------------------------------------- /ipOsint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | import sys 5 | import config as cfg 6 | import clearbit 7 | import json 8 | import time 9 | import hashlib 10 | from bs4 import BeautifulSoup 11 | import re 12 | from termcolor import colored 13 | from ip_whois import ip_whois 14 | from ip_shodan import domaintoip,shodansearch 15 | 16 | 17 | class style: 18 | BOLD = '\033[1m' 19 | END = '\033[0m' 20 | 21 | 22 | ip_addr = sys.argv[1] 23 | 24 | 25 | def print_iposint(ip_addr): 26 | ip_whois(ip_addr) 27 | #print res_from_shodan 28 | print colored(style.BOLD + '-----------------------------------------' + style.END, 'blue') 29 | 30 | shodansearch(ip_addr) 31 | #print res_from_shodan 32 | print colored(style.BOLD + '-----------------------------------' + style.END, 'blue') 33 | 34 | 35 | def main(): 36 | print_iposint(ip_addr) 37 | 38 | if __name__ == "__main__": 39 | main() 40 | 41 | -------------------------------------------------------------------------------- /domain_shodan.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import config as cfg 4 | import requests 5 | import json 6 | import sys 7 | import socket 8 | from termcolor import colored 9 | import time 10 | 11 | 12 | class style: 13 | BOLD = '\033[1m' 14 | END = '\033[0m' 15 | 16 | def shodandomainsearch(domain): 17 | print colored(style.BOLD + '\n---> Searching in Shodan:\n' + style.END, 'blue') 18 | time.sleep(0.3) 19 | endpoint = "https://api.shodan.io/shodan/host/search?key=%s&query=hostname:%s&facets={facets}" % (cfg.shodan_api, domain) 20 | req = requests.get(endpoint) 21 | return req.content 22 | 23 | 24 | def main(): 25 | domain = sys.argv[1] 26 | res_from_shodan = json.loads(shodandomainsearch(domain)) 27 | if 'matches' in res_from_shodan.keys(): 28 | for x in res_from_shodan['matches']: 29 | print "IP: %s\nHosts: %s\nDomain: %s\nPort: %s\nData: %s\nLocation: %s\n" % (x['ip_str'], x['hostnames'], x['domains'], x['port'], x['data'].replace("\n",""), x['location']) 30 | print "-----------------------------\n" 31 | 32 | if __name__ == "__main__": 33 | main() 34 | -------------------------------------------------------------------------------- /domain_emailhunter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import config as cfg 4 | import requests 5 | import json 6 | import sys 7 | import time 8 | 9 | from termcolor import colored 10 | class style: 11 | BOLD = '\033[1m' 12 | END = '\033[0m' 13 | 14 | collected_emails = [] 15 | 16 | def emailhunter(domain): 17 | print colored(style.BOLD + '\n---> Harvesting Email Addresses:.\n' + style.END, 'blue') 18 | time.sleep(0.3) 19 | url="https://api.emailhunter.co/v1/search?api_key=%s&domain=%s" % (cfg.emailhunter, domain) 20 | res=requests.get(url) 21 | try: 22 | parsed=json.loads(res.text) 23 | if 'emails' in parsed.keys(): 24 | for email in parsed['emails']: 25 | collected_emails.append(email['value']) 26 | except: 27 | print 'CAPTCHA has been implemented, skipping this for now.' 28 | 29 | def main(): 30 | domain = sys.argv[1] 31 | if cfg.emailhunter != "" and cfg.emailhunter != "": 32 | emailhunter(domain) 33 | for x in collected_emails: 34 | print str(x) 35 | print "\n\n-----------------------------\n" 36 | 37 | 38 | if __name__ == "__main__": 39 | main() 40 | 41 | -------------------------------------------------------------------------------- /domain_forumsearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | import json 5 | from bs4 import BeautifulSoup 6 | import sys 7 | import re 8 | from termcolor import colored 9 | import time 10 | 11 | class style: 12 | BOLD = '\033[1m' 13 | END = '\033[0m' 14 | 15 | def boardsearch_forumsearch(domain): 16 | print colored(style.BOLD + '\n---> Gathering links from Forums:\n' + style.END, 'blue') 17 | time.sleep(0.3) 18 | req = requests.get('http://boardreader.com/index.php?a=l&q=%s&d=0&extended_search=1&q1=%s<ype=all&p=50'%(domain,domain)) 19 | soup=BeautifulSoup(req.content, "lxml") 20 | text=soup.findAll('bdo',{"dir":"ltr"}) 21 | links={} 22 | for lk in text: 23 | links[lk.text]=re.search("'(.+?)'", lk.parent['onmouseover']).group(1) 24 | return links 25 | 26 | 27 | def main(): 28 | domain = sys.argv[1] 29 | print "\t\t\t[+] Associated Forum Links\n" 30 | links=boardsearch_forumsearch(domain) 31 | for tl,lnk in links.items(): 32 | print "%s (%s)" % (lnk, tl) 33 | print "\n-----------------------------\n" 34 | 35 | 36 | if __name__ == "__main__": 37 | main() 38 | -------------------------------------------------------------------------------- /docs/Usage.md: -------------------------------------------------------------------------------- 1 | Datasploit allows you to perform OSINT on a domain_name, email_id, username and phoneNumber. In order to launch any script, lets first understand the nomenclature of these scripts: 2 | 3 | * All the scripts meant to perform osint on domain starts with the keyword ***'domain_'***. Eg. domain_subdomains, domain_whois, etc. In similar manner, scripts for osint on email_id starts with ***'email_'***, eg. email_fullcontact. 4 | * Scripts with an *underscore* are standalone scripts and collects data of one specific kind. 5 | * Scripts without an underscore are the ones used for automated collection of data using standalone scripts. Eg. domainOsint.py 6 | 7 | In order to run any script, pass the respective argument. For example, domainOsint and domain_subdomains.py will expect a domain name to be passed. 8 | ``` 9 | python domainOsint.py example.com 10 | python domain_subdomains.py example.com 11 | ``` 12 | While, domainOsint will call all other domain_* scripts and list down data as well as dump the same in mongoDb, domain_subdomains and other such scripts will just list down data specific to their function. 13 | 14 | Please note that, standalone scripts do not dump data into the database. 15 | 16 | -------------------------------------------------------------------------------- /domain_history.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import json 5 | import requests 6 | from bs4 import BeautifulSoup 7 | import re 8 | from termcolor import colored 9 | import time 10 | 11 | class style: 12 | BOLD = '\033[1m' 13 | END = '\033[0m' 14 | 15 | 16 | def netcraft_domain_history(domain): 17 | ip_history_dict= {} 18 | print colored(style.BOLD + '\n---> Searching Domain history in Netcraft\n' + style.END, 'blue') 19 | time.sleep(0.3) 20 | endpoint = "http://toolbar.netcraft.com/site_report?url=%s" % (domain) 21 | req = requests.get(endpoint) 22 | 23 | soup = BeautifulSoup(req.content, 'html.parser') 24 | urls_parsed = soup.findAll('a', href = re.compile(r'.*netblock\?q.*')) 25 | for url in urls_parsed: 26 | if (urls_parsed.index(url) != 0): 27 | ip_history_dict[str(url).split('=')[2].split(">")[1].split("<")[0]] = str(url.parent.findNext('td')).strip("").strip("") 28 | return ip_history_dict 29 | 30 | 31 | def main(): 32 | domain = sys.argv[1] 33 | dns_history = netcraft_domain_history(domain) 34 | for x in dns_history.keys(): 35 | print "%s: %s" % (dns_history[x], x) 36 | print "\n-----------------------------\n" 37 | 38 | if __name__ == "__main__": 39 | main() 40 | -------------------------------------------------------------------------------- /domain_github.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import requests 5 | from bs4 import BeautifulSoup 6 | import json 7 | from termcolor import colored 8 | import time 9 | 10 | class style: 11 | BOLD = '\033[1m' 12 | END = '\033[0m' 13 | 14 | 15 | def github_search(query, code): 16 | print colored(style.BOLD + '\n---> Searching Github for domain results\n' + style.END, 'blue') 17 | time.sleep(0.3) 18 | endpoint_git = "https://github.com/search?q=\"" + query + "\"&type=" + code 19 | req = requests.get(endpoint_git) 20 | soup = BeautifulSoup(req.content, 'html.parser') 21 | mydivs = soup.findAll("span", { "class" : "counter" }) 22 | if mydivs and len(mydivs) >= 1: 23 | return "%s Results found in github Codes. \nExplore results manually: %s" % (str(mydivs[0]).split(">")[1].split("<")[0], endpoint_git) 24 | else: 25 | return None 26 | 27 | 28 | def main(): 29 | domain = sys.argv[1] 30 | #make Search github code for the given domain. 31 | git_results = github_search(domain, 'Code') 32 | if git_results is not None: 33 | print git_results 34 | else: 35 | print colored("Sad! Nothing found on github", 'red') 36 | print "\n-----------------------------\n" 37 | 38 | if __name__ == "__main__": 39 | main() 40 | 41 | 42 | -------------------------------------------------------------------------------- /domain_wikileaks.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | from bs4 import BeautifulSoup 5 | import sys 6 | import json 7 | from termcolor import colored 8 | import time 9 | 10 | 11 | class style: 12 | BOLD = '\033[1m' 13 | END = '\033[0m' 14 | 15 | 16 | def wikileaks(domain): 17 | print colored(style.BOLD + '\n---> Searching through WikiLeaks\n' + style.END, 'blue') 18 | time.sleep(0.3) 19 | req = requests.get('https://search.wikileaks.org/?query=&exact_phrase=%s&include_external_sources=True&order_by=newest_document_date'%(domain)) 20 | soup=BeautifulSoup(req.content, "lxml") 21 | count=soup.findAll('div',{"class":"total-count"}) 22 | print "Total "+count[0].text 23 | divtag=soup.findAll('div',{'class':'result'}) 24 | links={} 25 | for a in divtag: 26 | links[a.a.text.encode('utf-8')]=a.a['href'] 27 | return links 28 | 29 | 30 | def main(): 31 | domain = sys.argv[1] 32 | #wikileaks 33 | leaklinks=wikileaks(domain) 34 | for tl,lnk in leaklinks.items(): 35 | print "%s (%s)" % (lnk, tl) 36 | print "For all results, visit: "+ 'https://search.wikileaks.org/?query=&exact_phrase=%s&include_external_sources=True&order_by=newest_document_date'%(domain) 37 | print "\n-----------------------------\n" 38 | 39 | 40 | 41 | if __name__ == "__main__": 42 | main() 43 | -------------------------------------------------------------------------------- /docs/contiributors.md: -------------------------------------------------------------------------------- 1 | Well, lets accept the fact that nothing goes well without contributors. Here is the list of people who have helped ([@datasploit](https://twitter.com/datasploit)) grow in its first phase. 2 | 3 | ##### Core Contributors: 4 | Folks who took out time from busy schedule and got their hands dirty with the code. 5 | * Shubham Mittal ([@upgoingstar](https://twitter.com/upgoingstar)) 6 | * Sudhanshu Chauhan ([@upgoingstar](https://twitter.com/sudhanshu_c)) 7 | * Kunal Aggarwal ([@KunalAggarwal92](https://twitter.com/KunalAggarwal92)) 8 | * Nutan Kumar Panda ([@nutankumarpanda](https://twitter.com/nutankumarpanda)) 9 | 10 | ##### Mentors: 11 | Chaps who were generous enough to give feedback and suggest changes. Kudos to you guys. 12 | * Anant Srivastata ([@anantshri](https://twitter.com/anantshri)) 13 | * Prashant Mahajan ([@prashant3535](https://twitter.com/prashant3535)) 14 | * Shadab Siddiqui ([@sh4ds1dd](https://twitter.com/sh4ds1dd)) 15 | * Chandrapal ([@bnchandrapal](https://twitter.com/bnchandrapal)) 16 | 17 | ##### Testers 18 | Below people helped us by quickly adopting the tool and raised few naive issues we missed out. Kudos to you guys too. 19 | * Sagar Belure ([@sagarbelure](https://twitter.com/sagarbelure)) 20 | * Chandrapal ([@bnchandrapal](https://twitter.com/bnchandrapal)) -------------------------------------------------------------------------------- /active_default_file_check.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import re 3 | import sys 4 | 5 | list_urls = open("check_urls.txt") 6 | existing_urls = [] 7 | host = sys.argv[1] 8 | base_url = "http://" + host + "/" 9 | print base_url 10 | 11 | def check_page(url): 12 | req = requests.get(url) 13 | return req 14 | 15 | #Checking non existig page 16 | base_req = requests.get(base_url + "rejgwterlbjwfnvierwebjrwfebelivajr") 17 | print "Setting base request code for non_existing page as " + str(base_req.status_code) 18 | base_statuscode = base_req.status_code 19 | 20 | 21 | #Check for any random non-existing-page 22 | for read_from_file in list_urls: 23 | pagetohit = read_from_file.strip("\n") 24 | print "Checking %s" % (pagetohit) 25 | if (check_page(base_url + pagetohit).status_code != base_statuscode): 26 | existing_urls.append(base_url + pagetohit) 27 | else: 28 | pass 29 | 30 | if (len(existing_urls) != 0): 31 | print "\n[+] Testing done, following URLs are existing." 32 | for foundpages in existing_urls: 33 | print foundpages 34 | print "\n" 35 | print "Note: Different status_code were returned which means file exist. \nIn certain cases, application might be restricting file access by returning \n403 forbidden / Rate limiting which verifies that file exist.\n" 36 | else: 37 | "[-] No luck buddy..:(" 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | config.py 7 | /config.py 8 | facebook_user_details.py 9 | generate_passwords.py 10 | git_searcher.py 11 | 12 | instaUsernameOsint.py 13 | ip_to_neighboursites.py 14 | test.py 15 | test_domainOsint.py 16 | testhtml.html 17 | testreg.py 18 | username_reddit.py 19 | active_default_file_check.py 20 | 21 | core/ui/migrations/* 22 | *.swp 23 | db.sqlite3 24 | 25 | # C extensions 26 | *.so 27 | 28 | # Distribution / packaging 29 | .Python 30 | env/ 31 | build/ 32 | develop-eggs/ 33 | dist/ 34 | downloads/ 35 | eggs/ 36 | .eggs/ 37 | lib/ 38 | lib64/ 39 | parts/ 40 | sdist/ 41 | var/ 42 | *.egg-info/ 43 | .installed.cfg 44 | *.egg 45 | 46 | # PyInstaller 47 | # Usually these files are written by a python script from a template 48 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 49 | *.manifest 50 | *.spec 51 | 52 | # Installer logs 53 | pip-log.txt 54 | pip-delete-this-directory.txt 55 | 56 | # Unit test / coverage reports 57 | htmlcov/ 58 | .tox/ 59 | .coverage 60 | .coverage.* 61 | .cache 62 | nosetests.xml 63 | coverage.xml 64 | *,cover 65 | .hypothesis/ 66 | 67 | # Translations 68 | *.mo 69 | *.pot 70 | 71 | # Django stuff: 72 | *.log 73 | 74 | # Sphinx documentation 75 | docs/_build/ 76 | 77 | # PyBuilder 78 | target/ 79 | 80 | #Ipython Notebook 81 | .ipynb_checkpoints 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /domain_wappalyzer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import json 4 | import requests 5 | from Wappalyzer import Wappalyzer, WebPage 6 | import sys 7 | import time 8 | from termcolor import colored 9 | 10 | class style: 11 | BOLD = '\033[1m' 12 | END = '\033[0m' 13 | 14 | def wappalyzeit(domain): 15 | temp_list = [] 16 | time.sleep(0.3) 17 | wappalyzer = Wappalyzer.latest() 18 | webpage = WebPage.new_from_url(domain) 19 | set1 = wappalyzer.analyze(webpage) 20 | if set1: 21 | print "[+] Third party libraries in Use:" 22 | for s in set1: 23 | temp_list.append("\t%s" % s) 24 | print "\t%s" % s 25 | return temp_list 26 | else: 27 | print "\t\t\t[-] Nothing found. Make sure domain name is passed properly" 28 | return temp_list 29 | 30 | 31 | 32 | def main(): 33 | domain = sys.argv[1] 34 | print colored(style.BOLD + '\n---> Wapplyzing web page of base domain:\n' + style.END, 'blue') 35 | 36 | #make proper URL with domain. Check on ssl as well as 80. 37 | print "Hitting HTTP:\n", 38 | try: 39 | targeturl = "http://" + domain 40 | wappalyzeit(targeturl) 41 | except: 42 | print "[-] HTTP connection was unavailable" 43 | print "\nHitting HTTPS:\n", 44 | try: 45 | targeturl = "https://" + domain 46 | wappalyzeit(targeturl) 47 | except: 48 | print "[-] HTTPS connection was unavailable" 49 | print "\n-----------------------------\n" 50 | 51 | 52 | 53 | if __name__ == "__main__": 54 | main() 55 | -------------------------------------------------------------------------------- /domain_checkpunkspider.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | import sys 5 | import json 6 | import warnings 7 | from termcolor import colored 8 | import time 9 | class style: 10 | BOLD = '\033[1m' 11 | END = '\033[0m' 12 | 13 | warnings.filterwarnings("ignore") 14 | 15 | def checkpunkspider(reversed_domain): 16 | print colored(style.BOLD + '\n---> Trying luck with PunkSpider\n' + style.END, 'blue') 17 | time.sleep(0.5) 18 | req= requests.post("http://www.punkspider.org/service/search/detail/" + reversed_domain, verify=False) 19 | try: 20 | return json.loads(req.content) 21 | except: 22 | return {} 23 | 24 | 25 | 26 | def main(): 27 | domain = sys.argv[1] 28 | #convert domain to reverse_domain for passing to checkpunkspider() 29 | reversed_domain = "" 30 | for x in reversed(domain.split(".")): 31 | reversed_domain = reversed_domain + "." + x 32 | reversed_domain = reversed_domain[1:] 33 | res = checkpunkspider(reversed_domain) 34 | if res is not None: 35 | if 'data' in res.keys() and len(res['data']) >= 1: 36 | print colored("Few vulnerabilities found at Punkspider", 'green') 37 | for x in res['data']: 38 | print "==> ", x['bugType'] 39 | print "Method:", x['verb'].upper() 40 | print "URL:\n" + x['vulnerabilityUrl'] 41 | print "Param:", x['parameter'] 42 | else: 43 | print colored("[-] No Vulnerabilities found on PunkSpider", 'red') 44 | 45 | if __name__ == "__main__": 46 | main() 47 | -------------------------------------------------------------------------------- /domain_dnsrecords.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import dns.resolver 5 | from termcolor import colored 6 | class style: 7 | BOLD = '\033[1m' 8 | END = '\033[0m' 9 | 10 | def fetch_dns_records(domain,rec_type): 11 | try: 12 | answers = dns.resolver.query(domain, rec_type) 13 | rec_list = [] 14 | for rdata in answers: 15 | rec_list.append(rdata) 16 | return rec_list 17 | except: 18 | return colored("No Records Found", 'red') 19 | 20 | 21 | def parse_dns_records(domain): 22 | print colored(style.BOLD + '---> Finding DNS Records.\n' + style.END, 'blue') 23 | dict_dns_record = {} 24 | dict_dns_record['SOA Records'] = fetch_dns_records(domain,"SOA") 25 | dict_dns_record['MX Records'] = fetch_dns_records(domain,"MX") 26 | dict_dns_record['TXT Records'] = fetch_dns_records(domain,"TXT") 27 | dict_dns_record['A Records'] = fetch_dns_records(domain,"A") 28 | dict_dns_record['Name Server Records'] = fetch_dns_records(domain,"NS") 29 | dict_dns_record['CNAME Records'] = fetch_dns_records(domain,"CNAME") 30 | dict_dns_record['AAAA Records'] = fetch_dns_records(domain,"AAAA") 31 | return dict_dns_record 32 | 33 | 34 | def main(): 35 | domain = sys.argv[1] 36 | dns_records = parse_dns_records(domain) 37 | for x in dns_records.keys(): 38 | print x 39 | if "No" in dns_records[x] and "Found" in dns_records[x]: 40 | print "\t%s" % (dns_records[x]) 41 | else: 42 | for y in dns_records[x]: 43 | print "\t%s" % (y) 44 | #print type(dns_records[x]) 45 | print "\n-----------------------------\n" 46 | 47 | if __name__ == "__main__": 48 | main() 49 | -------------------------------------------------------------------------------- /domain_GooglePDF.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from bs4 import BeautifulSoup 4 | import sys 5 | import urllib2 6 | import re 7 | import string 8 | 9 | ''' 10 | This code is a bit messed up. Lists files from first page only. Needs a lot of modification. 11 | 12 | ''' 13 | 14 | def googlesearch(query, ext): 15 | print query 16 | google="https://www.google.co.in/search?filter=0&q=site:" 17 | getrequrl="https://www.google.co.in/search?filter=0&num=100&q=%s&start=" % (query) 18 | hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', 19 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 20 | 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 21 | 'Accept-Encoding': 'none', 22 | 'Accept-Language': 'en-US,en;q=0.8', 23 | 'Connection': 'keep-alive'} 24 | req=urllib2.Request(getrequrl, headers=hdr) 25 | response=urllib2.urlopen(req) 26 | data = response.read() 27 | data=re.sub('','',data) 28 | for e in ('>','=','<','\\','(',')','"','http',':','//'): 29 | data = string.replace(data,e,' ') 30 | 31 | r1 = re.compile('[-_.a-zA-Z0-9.-_]*'+'\.'+ ext) 32 | res = r1.findall(data) 33 | if res==[]: 34 | print "No results were found" 35 | else: 36 | return res 37 | 38 | domain=sys.argv[1] 39 | print "\t\t\t[+] PDF Files\n" 40 | 41 | list_ext = ["pdf", "xls", "docx"] 42 | for x in list_ext: 43 | query = "site:%s+filetype:%s" % (domain, x) 44 | results = googlesearch(query, x) 45 | if results: 46 | results=set(results) 47 | for x in results: 48 | x= re.sub('
  • ','',x) 49 | x= re.sub('
  • ','',x) 50 | print x 51 | print "\n" 52 | print "====================\n" 53 | -------------------------------------------------------------------------------- /domain_zoomeye.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | import json 5 | import sys 6 | import config as cfg 7 | from termcolor import colored 8 | import time 9 | 10 | class style: 11 | BOLD = '\033[1m' 12 | END = '\033[0m' 13 | 14 | def get_accesstoken_zoomeye(domain): 15 | username = cfg.zoomeyeuser 16 | password = cfg.zoomeyepass 17 | datalogin = '{"username": "%s","password": "%s"}' % (username, password) 18 | s = requests.post("https://api.zoomeye.org/user/login", data=datalogin) 19 | responsedata = json.loads(s.text) 20 | access_token1 = responsedata['access_token'] 21 | return access_token1 22 | 23 | 24 | def search_zoomeye(domain): 25 | print colored(style.BOLD + '\n---> Finding hosts from ZoomEye\n' + style.END, 'blue') 26 | time.sleep(0.3) 27 | zoomeye_token = get_accesstoken_zoomeye(domain) 28 | authData = {"Authorization": "JWT " + str(zoomeye_token)} 29 | req = requests.get('http://api.zoomeye.org/web/search/?query=site:%s&page=1' % domain, headers=authData) 30 | return req.text 31 | 32 | 33 | def main(): 34 | domain = sys.argv[1] 35 | #checks results from zoomeye 36 | #filters need to be applied 37 | zoomeye_results = search_zoomeye(domain) 38 | dict_zoomeye_results = json.loads(zoomeye_results) 39 | if 'matches' in dict_zoomeye_results.keys(): 40 | print len(dict_zoomeye_results['matches']) 41 | for x in dict_zoomeye_results['matches']: 42 | if x['site'].split('.')[-2] == domain.split('.')[-2]: 43 | if 'title' in x.keys(): 44 | print "IP: %s\nSite: %s\nTitle: %s\nHeaders: %s\nLocation: %s\n" % (x['ip'], x['site'], x['title'], x['headers'].replace("\n\n",""), x['geoinfo']) 45 | else: 46 | for val in x.keys(): 47 | print "%s: %s" % (val, x[val]) 48 | print "\n-----------------------------\n" 49 | 50 | if __name__ == "__main__": 51 | main() 52 | -------------------------------------------------------------------------------- /docs/setupGuide.md: -------------------------------------------------------------------------------- 1 | This page holds the setup guide you will need before kicking off the datasploit in your system. Please note that all the documentation is as per *nix machines, and the tool has not been thoroughly tested on Windows platform. If you would like to volunteer for the same, give us a shout at helpme@datasploit.info. Following are the quick steps to get you going: 2 | 3 | If you want to work with web gui, follow the steps till 7. Otherwise, follow till 5th and you should be good to go. 4 | 5 | ### Step 1 - Download DataSploit to your system. 6 | 7 | You can either use the git command line tools using the following command: 8 | ``` 9 | git clone https://github.com/upgoingstar/datasploit.git 10 | ``` 11 | , or you can simply download the zip file *([link](https://github.com/upgoingstar/datasploit/archive/master.zip))* and extract the same using unzip. 12 | ``` 13 | unzip master.zip 14 | ``` 15 | 16 | ### Step 2: Install python dependencies 17 | 18 | Go into the tool directory and install all the python libraries using the requirements.txt file. In case you encounter 'Permission Denied' error, use sudo. 19 | ``` 20 | cd master 21 | pip install -r requirements.txt 22 | ``` 23 | ### Step 3: Rename config_sample.py to config.py 24 | 25 | Please make sure that config.py is added in your gitIgnore file so that this is not commited in any case. We care for your data too, and hence this tip. :) 26 | ``` 27 | mv config_sample.py config.py 28 | ``` 29 | ### Step 4: Generate API Keys and paste inside config.py 30 | 31 | Generate API keys using the *api Key Generation* guide at 32 | > http://datasploit.readthedocs.io/en/latest/apiGeneration/ 33 | 34 | and enter the respective values in config.py file. Leave all other key value pairs blank. 35 | 36 | Congratulations, you are now good to go. Lets go ahead and run our automated script for OSINT on a domain. 37 | ``` 38 | python domainOsint.py 39 | ``` 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![ToolsWatch Best Tools](https://www.toolswatch.org/badges/toptools/2016.svg)](https://www.toolswatch.org/2013/12/2013-top-security-tools-as-voted-by-toolswatch-org-readers/) 2 | 3 | [![Black Hat Arsenal](https://www.toolswatch.org/badges/arsenal/2016.svg)](https://www.blackhat.com/us-16/arsenal.html#datasploit) US 4 | 5 | [![Black Hat Arsenal](https://www.toolswatch.org/badges/arsenal/2016.svg)](https://www.blackhat.com/us-16/arsenal.html#datasploit) EU 6 | 7 | 8 | 9 | 10 | # Overview of the tool: 11 | * Performs OSINT on a domain / email / username / phone and find out information from different sources. 12 | * Correlates and collaborate the results, show them in a consolidated manner. 13 | * Tries to find out credentials, api-keys, tokens, subdomains, domain history, legacy portals, etc. related to the target. 14 | * Use specific script / launch automated OSINT for consolidated data. 15 | * Available in both GUI and Console. 16 | 17 | ## Basic Usage: 18 | ``` 19 | 20 | ____/ /____ _ / /_ ____ _ _____ ____ / /____ (_)/ /_ 21 | / __ // __ `// __// __ `// ___// __ \ / // __ \ / // __/ 22 | / /_/ // /_/ // /_ / /_/ /(__ )/ /_/ // // /_/ // // /_ 23 | \__,_/ \__,_/ \__/ \__,_//____// .___//_/ \____//_/ \__/ 24 | /_/ 25 | 26 | Open Source Assistant for #OSINT 27 | website: www.datasploit.info 28 | 29 | Usage: domainOsint.py [options] 30 | 31 | Options: 32 | -h, --help show this help message and exit 33 | -d DOMAIN, --domain=DOMAIN Domain name against which automated Osint 34 | is to be performed. 35 | 36 | ``` 37 | 38 | # Required Setup: 39 | * Bunch of python libraries (use requirements.txt) 40 | * MongoDb, Django, Celery and RabbitMq (Refer to setup guide). 41 | 42 | 43 | ## Detailed Tool Documentation: 44 | > [http://datasploit.readthedocs.io/en/latest/](http://datasploit.readthedocs.io/en/latest/) 45 | 46 | 47 | -------------------------------------------------------------------------------- /username_gitscrape.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | import sys 5 | import config as cfg 6 | import json 7 | import time 8 | 9 | ''' 10 | Code is not working as of now, need some modifications. 11 | 12 | ''' 13 | 14 | print '\n[-] Incomplete code. Work in Progress\n' 15 | 16 | username = sys.argv[1] 17 | access_token = cfg.github_access_token 18 | print username 19 | 20 | def find_repos(username): 21 | print "\t\t\t[+]Finding repos for %s" % (username) 22 | list_repos = [] 23 | url = "https://api.github.com/users/%s/repos?access_token=%s" % (username, access_token) 24 | req = requests.get(url) 25 | if 'API rate limit exceeded' not in req.text: 26 | for repos in json.loads(req.content): 27 | repos['full_name'] 28 | if repos['fork'] == False: 29 | list_repos.append(repos['full_name']) 30 | return list_repos 31 | else: 32 | return [] 33 | 34 | def find_commits(repo_name): 35 | print "\t\t\t[+]Finding commits for %s..." % (repo_name) 36 | list_commits = [] 37 | for x in xrange(1,10): 38 | url = "https://api.github.com/repos/%s/commits?page=%s&access_token=%s" % (repo_name, x, access_token) 39 | req = requests.get(url) 40 | data = json.loads(req.content) 41 | for commits in data: 42 | try: 43 | list_commits.append(commits['sha']) 44 | except: 45 | print "Empty Repo" 46 | if (len(data) != 30): 47 | return list_commits 48 | else: 49 | print "[+]..Heading to next page..." 50 | return list_commits 51 | print "Too many commits, search manually." 52 | 53 | master_dict = {} 54 | list_repos = find_repos(username) 55 | if list_repos != []: 56 | print "Following repos found :" 57 | count = 0 58 | for x in list_repos: 59 | count = count + 1 60 | print '%s. %s' % (count, x) 61 | print "\n-----------------------------\n" 62 | 63 | for repo_name in list_repos: 64 | master_dict[repo_name] = find_commits(repo_name) 65 | print "\n-----------------------------\n" 66 | print "Done. Printing master list. {Repo:[commit1,commit2]}.." 67 | #finding commits from list 68 | 69 | print master_dict 70 | 71 | for abc in master_dict.keys(): 72 | print "Commits for %s:" % (abc) 73 | for xyz in master_dict[abc]: 74 | print xyz 75 | print "\n" 76 | else: 77 | print 'Rate limiting Exceeded.' 78 | 79 | 80 | -------------------------------------------------------------------------------- /datasploit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | import re 4 | import os 5 | 6 | 7 | import optparse 8 | parser = optparse.OptionParser() 9 | parser.add_option('-a', '--active', action="store", dest="domain", help="Launches Active Scans (work in progress)", default="spam") 10 | options, args = parser.parse_args() 11 | 12 | 13 | def printart(): 14 | print "\n\t ____/ /____ _ / /_ ____ _ _____ ____ / /____ (_)/ /_" 15 | print "\t / __ // __ `// __// __ `// ___// __ \ / // __ \ / // __/" 16 | print "\t / /_/ // /_/ // /_ / /_/ /(__ )/ /_/ // // /_/ // // /_ " 17 | print "\t \__,_/ \__,_/ \__/ \__,_//____// .___//_/ \____//_/ \__/ " 18 | print "\t /_/ " 19 | print "\t\t\t\t\t\t" 20 | print " Open Source Assistant for #OSINT " 21 | print " website: www.datasploit.info " 22 | print "\t" 23 | 24 | 25 | def main(): 26 | 27 | printart() 28 | print "User Input: "+ sys.argv[1] 29 | 30 | if re.match('[^@]+@[^@]+\.[^@]+', sys.argv[1]): 31 | print "Looks like an EMAIL, running Email_OSINT...\n" 32 | command='./emailOsint.py '+sys.argv[1] 33 | # insecure way used-os.command**************. Do not expose to web interface 34 | os.system(command) 35 | #http://stackoverflow.com/questions/8022530/python-check-for-valid-email-address 36 | elif re.match('^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$', sys.argv[1]): 37 | print "Looks like an IP, running IP_OSINT...\n" 38 | command='./ipOsint.py '+sys.argv[1] 39 | os.system(command) 40 | #http://stackoverflow.com/questions/10086572/ip-address-validation-in-python-using-regex 41 | elif re.match('^[a-zA-Z\d-]{,63}(\.[a-zA-Z\d-]{,63}).$', sys.argv[1]): 42 | print "Looks like a DOMAIN, running Domain_OSINT...\n" 43 | command='./domainOsint.py -d'+sys.argv[1] 44 | os.system(command) 45 | #http://stackoverflow.com/questions/8467647/python-domain-name-check-using-regex 46 | else: 47 | print "Looks like a Username, running Username_OSINT...\n" 48 | command='./usernameOsint.py '+sys.argv[1] 49 | os.system(command) 50 | 51 | 52 | 53 | if __name__ == "__main__": 54 | main() 55 | -------------------------------------------------------------------------------- /email_basic_checks.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import config as cfg 4 | import requests 5 | import json 6 | import sys 7 | import time 8 | import re 9 | from termcolor import colored 10 | class style: 11 | BOLD = '\033[1m' 12 | END = '\033[0m' 13 | 14 | 15 | 16 | def basic_checks(email): 17 | if re.match('[^@]+@[^@]+\.[^@]+', email): 18 | print colored(style.BOLD + '\n---> Basic Email Check(s)..\n' + style.END, 'blue') 19 | if cfg.mailboxlayer_api != "" and cfg.mailboxlayer_api != "XYZ" and cfg.mailboxlayer_api != "" and cfg.mailboxlayer_api != "XYZ": 20 | url = "http://apilayer.net/api/check?access_key=%s&email=%s&smtp=1&format=1" % (cfg.mailboxlayer_api, email) 21 | req = requests.get(url) 22 | resp = json.loads(req.text) 23 | print "Is it a free Email Address?:", 24 | if resp['free'] == False: 25 | print "No" 26 | else: 27 | print "Yes" 28 | print "Email ID Exist?: ", 29 | if resp['smtp_check'] == True: 30 | print "Yes" 31 | else: 32 | print "No" 33 | print "Can this domain recieve emails?: ", 34 | if resp['mx_found'] == True: 35 | print "Yes" 36 | else: 37 | print "No" 38 | print "Is it a Disposable email?: ", 39 | if resp['disposable'] == True: 40 | print "Yes" 41 | else: 42 | print "No" 43 | print "\n" 44 | else: 45 | print colored(style.BOLD + '\n[-] Please pass a valid email ID.\n' + style.END, 'red') 46 | 47 | def main(): 48 | email = sys.argv[1] 49 | basic_checks(email) 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | ''' 59 | print colored(style.BOLD + '\n---> Basic Email Check(s)..\n' + style.END, 'blue') 60 | if cfg.mailboxlayer_api != "" and cfg.mailboxlayer_api != "XYZ" and cfg.mailboxlayer_api != "" and cfg.mailboxlayer_api != "XYZ": 61 | total_results = google_search(email, 1) 62 | if (total_results != 0 and total_results > 10): 63 | more_iters = (total_results / 10) 64 | if more_iters >= 10: 65 | print colored(style.BOLD + '\n---> Too many results, Daily API limit might exceed\n' + style.END, 'red') 66 | for x in xrange(1,more_iters + 1): 67 | google_search(email, (x*10)+1) 68 | print "\n\n-----------------------------\n" 69 | else: 70 | print colored(style.BOLD + '\n[-] google_cse_key and google_cse_cx not configured. Skipping paste(s) search.\nPlease refer to http://datasploit.readthedocs.io/en/latest/apiGeneration/.\n' + style.END, 'red') 71 | ''' 72 | 73 | 74 | if __name__ == "__main__": 75 | main() 76 | 77 | -------------------------------------------------------------------------------- /ip_whois.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from ipwhois import IPWhois 3 | import config as cfg 4 | import requests 5 | import json 6 | import sys 7 | import socket 8 | from termcolor import colored 9 | class style: 10 | BOLD = '\033[1m' 11 | END = '\033[0m' 12 | 13 | 14 | 15 | 16 | def ip_whois(ip): 17 | obj = IPWhois(ip) 18 | try: 19 | results = obj.lookup_rdap(depth=1) 20 | except: 21 | results = 'notfound' 22 | print 'ASN Registry Lookup Failed' 23 | if results != 'notfound': 24 | print colored(style.BOLD + '\nWhoIS Report for IP: %s\n' + style.END, 'green') % str(ip) 25 | print colored(style.BOLD + '--------------- Basic Info ---------------' + style.END, 'blue') 26 | print 'ASN ID: %s' % results['asn'] 27 | if 'network' in results.keys(): 28 | print 'Org. Name: %s' % results['network']['name'] 29 | print 'CIDR Range: %s' % results['network']['cidr'] 30 | print 'Start Address: %s' % results['network']['start_address'] 31 | print 'Parent Handle: %s' % results['network']['parent_handle'] 32 | print 'Country: %s' % results['network']['country'] 33 | if 'objects' and 'entities' in results.keys(): 34 | print colored(style.BOLD + '\n----------- Per Handle Results -----------' + style.END, 'blue') 35 | for x in results['entities']: 36 | print 'Handle: %s' % x 37 | if 'contact' in results['objects'][x].keys(): 38 | print '\tKind: %s' % results['objects'][x]['contact']['kind'] 39 | if results['objects'][x]['contact']['phone'] is not None: 40 | for y in results['objects'][x]['contact']['phone']: 41 | print '\tPhone: %s' % y['value'] 42 | if results['objects'][x]['contact']['title'] is not None: 43 | print results['objects'][x]['contact']['title'] 44 | if results['objects'][x]['contact']['role'] is not None: 45 | print results['objects'][x]['contact']['role'] 46 | if results['objects'][x]['contact']['address'] is not None: 47 | for y in results['objects'][x]['contact']['address']: 48 | print '\tAddress: %s' % y['value'].replace('\n',',') 49 | if results['objects'][x]['contact']['email'] is not None: 50 | for y in results['objects'][x]['contact']['email']: 51 | print '\tEmail: %s' % y['value'] 52 | 53 | 54 | def main(): 55 | ip_addr = sys.argv[1] 56 | ip_whois(ip_addr) 57 | #print res_from_shodan 58 | print colored(style.BOLD + '-----------------------------------------' + style.END, 'blue') 59 | 60 | if __name__ == "__main__": 61 | main() 62 | -------------------------------------------------------------------------------- /docs/home.md: -------------------------------------------------------------------------------- 1 | # Overview of the tool: 2 | * Performs OSINT on a domain / email / username / phone and find out information from different sources. 3 | * Correlates and collaborate the results, show them in a consolidated manner. 4 | * Tries to find out credentials, api-keys, tokens, subdomains, domain history, legacy portals, etc. related to the target. 5 | * Use specific script / launch automated OSINT for consolidated data. 6 | * Available in both GUI and Console. 7 | 8 | Following API configs are mandatory for proper results in domainOsint.py: 9 | * shodan_api 10 | * censysio_id 11 | * censysio_secret 12 | * zoomeyeuser 13 | * zoomeyepass 14 | * clearbit_apikey 15 | * emailhunter 16 | 17 | Other modules: 18 | * github_access_token 19 | * instagram_token 20 | * instagram_client_id 21 | * instagram_client_secret 22 | * jsonwhois 23 | 24 | 25 | ## Before running the program, please make sure that you have: 26 | * Changed the name of the file 'config_sample.py' to config.py 27 | * Entered all the required APIs in config.py file, as mentioned above. 28 | * Installed MongoDb and the mongodb is running. [Refer to documentation](https://docs.mongodb.com/manual/installation/): 29 | 30 | 31 | ## Usage 32 | To launch an automated OSINT on domain, shoot following query: 33 | 34 | ``` 35 | python domainOsint.py 36 | ``` 37 | You can also run an standalone script, e.g.you might want to only run the subdomain finding script and avoid all other modules. In such case, use below mentioned command. *All the files starting with domain_ requires a domain name to be passed as first argument. Same follows for email, ip, etc.* 38 | 39 | ``` 40 | python domain_subdomain.py 41 | ``` 42 | 43 | To launch an automated OSINT on domain, shoot following query: 44 | 45 | ``` 46 | python domainOsint.py 47 | ``` 48 | 49 | ## SETUP and Contribution 50 | * Change config_sample.py to config.py 51 | ``` 52 | mv config_sample.py config.py 53 | ``` 54 | * Configure respective API keys. Documentation for generating these keys will be shared very shortly. Believe us, we are working hard to get things in place. 55 | * Sources for which API keys are missing, will be simply skipped for the search. 56 | 57 | ### Config files 58 | 59 | 60 | ### Python dependencies 61 | 62 | ``` 63 | pip install -r requirements.txt 64 | ``` 65 | 66 | If you have updated the code and want to push the pip dependencies in the requirements.txt 67 | 68 | ``` 69 | pip freeze > requirements.txt 70 | ``` 71 | 72 | -------------------------------------------------------------------------------- /email_fullcontact.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | import sys 5 | import config as cfg 6 | import clearbit 7 | import json 8 | import time 9 | import hashlib 10 | from bs4 import BeautifulSoup 11 | import re 12 | 13 | 14 | 15 | def fullcontact(email): 16 | req = requests.get("https://api.fullcontact.com/v2/person.json?email=%s&apiKey=%s" % (email, cfg.fullcontact_api)) 17 | data = json.loads(req.content) 18 | return data 19 | 20 | 21 | def main(): 22 | email = sys.argv[1] 23 | data = fullcontact(email) 24 | if data.get("status","") == 200: 25 | if data.get("contactInfo","") != "": 26 | print "Name: %s" % data.get("contactInfo","").get('fullName', '') 27 | print "\nOrganizations:" 28 | for x in data.get("organizations",""): 29 | if x.get('isPrimary', '') == True: 30 | primarycheck = " - Primary" 31 | else: 32 | primarycheck = "" 33 | if x.get('endDate','') == '': 34 | print "\t%s at %s - (From %s to Unknown Date)%s" % (x.get('title', ''), x.get('name',''), x.get('startDate',''), primarycheck) 35 | else: 36 | print "\t%s - (From %s to %s)%s" % (x.get('name',''), x.get('startDate',''), x.get('endDate',''), primarycheck) 37 | if data.get("contactInfo","") != "": 38 | if data.get("contactInfo","").get('websites', '') != "": 39 | print "\nWebsite(s):" 40 | for x in data.get("contactInfo","").get('websites', ''): 41 | print "\t%s" % x.get('url', '') 42 | if data.get("contactInfo","").get('chats', '') != "": 43 | print '\nChat Accounts' 44 | for x in data.get("contactInfo","").get('chats', ''): 45 | print "\t%s on %s" % (x.get('handle', ''), x.get('client', '')) 46 | 47 | print "\nSocial Profiles:" 48 | for x in data.get("socialProfiles",""): 49 | print "\t%s:" % x.get('type','').upper() 50 | for y in x.keys(): 51 | if y != 'type' and y != 'typeName' and y != 'typeId': 52 | print '\t%s: %s' % (y, x.get(y,'')) 53 | print '' 54 | 55 | print "Other Details:" 56 | if data.get("demographics","") != "": 57 | print "\tGender: %s" % data.get("demographics","").get('gender', '') 58 | print "\tCountry: %s" % data.get("demographics","").get('country', '') 59 | print "\tTentative City: %s" % data.get("demographics","").get('locationGeneral', '') 60 | 61 | print "Photos:" 62 | for x in data.get("photos",""): 63 | print "\t%s: %s" % (x.get('typeName', ''), x.get('url', '')) 64 | 65 | else: 66 | print 'Error Occured - Encountered Status Code: %s. Please check if Email_id exist or not?' % data.get("status","") 67 | 68 | 69 | if __name__ == "__main__": 70 | main() 71 | 72 | -------------------------------------------------------------------------------- /domain_censys.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import re 5 | import requests 6 | import json 7 | import config as cfg 8 | import time 9 | 10 | 11 | def censys_search(domain): 12 | pages = float('inf') 13 | page = 1 14 | 15 | while page <= pages: 16 | print "Parsed and collected results from page %s" % (str(page)) 17 | time.sleep(0.5) 18 | params = {'query' : domain, 'page' : page} 19 | res = requests.post("https://www.censys.io/api/v1/search/ipv4", json = params, auth = (cfg.censysio_id, cfg.censysio_secret)) 20 | payload = res.json() 21 | 22 | if 'error' not in payload.keys(): 23 | if 'results' in payload.keys(): 24 | for r in payload['results']: 25 | temp_dict = {} 26 | ip = r["ip"] 27 | proto = r["protocols"] 28 | proto = [p.split("/")[0] for p in proto] 29 | proto.sort(key=float) 30 | protoList = ','.join(map(str, proto)) 31 | 32 | temp_dict["ip"] = ip 33 | temp_dict["protocols"] = protoList 34 | 35 | #print '[%s] IP: %s - aaProtocols: %s' % (colored('*', 'red'), ip, protoList) 36 | 37 | if '80' in protoList: 38 | new_dict = view(ip, temp_dict) 39 | censys_list.append(new_dict) 40 | else: 41 | censys_list.append(temp_dict) 42 | 43 | pages = payload['metadata']['pages'] 44 | page += 1 45 | else: 46 | print "X" 47 | return None 48 | break 49 | 50 | def view(server, temp_dict): 51 | res = requests.get("https://www.censys.io/api/v1/view/ipv4/%s" % (server), auth = (cfg.censysio_id, cfg.censysio_secret)) 52 | payload = res.json() 53 | 54 | try: 55 | if 'title' in payload['80']['http']['get'].keys(): 56 | #print "[+] Title: %s" % payload['80']['http']['get']['title'] 57 | title = payload['80']['http']['get']['title'] 58 | temp_dict['title'] = title 59 | if 'server' in payload['80']['http']['get']['headers'].keys(): 60 | header = "[+] Server: %s" % payload['80']['http']['get']['headers']['server'] 61 | temp_dict["server_header"] = payload['80']['http']['get']['headers']['server'] 62 | return temp_dict 63 | 64 | except Exception as error: 65 | print error 66 | 67 | 68 | 69 | censys_list = [] 70 | 71 | def main(): 72 | domain = sys.argv[1] 73 | censys_search(domain) 74 | for x in censys_list: 75 | print x 76 | 77 | 78 | if __name__ == "__main__": 79 | main() 80 | -------------------------------------------------------------------------------- /email_pastes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import config as cfg 4 | import requests 5 | import json 6 | import sys 7 | import time 8 | import re 9 | from termcolor import colored 10 | class style: 11 | BOLD = '\033[1m' 12 | END = '\033[0m' 13 | 14 | 15 | def colorize(string): 16 | colourFormat = '\033[{0}m' 17 | colourStr = colourFormat.format(32) 18 | resetStr = colourFormat.format(0) 19 | lastMatch = 0 20 | formattedText = '' 21 | for match in re.finditer(r'([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+(\.[a-zA-Z]{2,4})|/(?:http:\/\/)?(?:([^.]+)\.)?nokia\.com/|/(?:http:\/\/)?(?:([^.]+)\.)?(?:([^.]+)\.)?nokia\.com/)', string): 22 | start, end = match.span() 23 | formattedText += string[lastMatch: start] 24 | formattedText += colourStr 25 | formattedText += string[start: end] 26 | formattedText += resetStr 27 | lastMatch = end 28 | formattedText += string[lastMatch:] 29 | return formattedText 30 | 31 | def google_search(domain,start_index): 32 | time.sleep(0.3) 33 | url="https://www.googleapis.com/customsearch/v1?key=%s&cx=%s&q=\"%s\"&start=%s" % (cfg.google_cse_key, cfg.google_cse_cx, domain, start_index) 34 | res=requests.get(url) 35 | results = json.loads(res.text) 36 | if 'items' in results.keys(): 37 | if start_index == 1: 38 | print "[+] %s results found\n" % int(results['searchInformation']['totalResults']) 39 | for x in results['items']: 40 | print "Title: %s\nURL: %s\nSnippet: %s\n" % (x['title'], colorize(x['link']), colorize(x['snippet'])) 41 | start_index = +1 42 | return int(results['searchInformation']['totalResults']) 43 | elif results['searchInformation']['totalResults'] == "0": 44 | print '0 Results found' 45 | return 0 46 | elif results['error']['code'] == 403: 47 | print 'Rate limit Exceeded' 48 | return 0 49 | else: 50 | return 0 51 | #return json.loads(res.text) 52 | 53 | 54 | def main(): 55 | email = sys.argv[1] 56 | print colored(style.BOLD + '\n---> Finding Paste(s)..\n' + style.END, 'blue') 57 | if cfg.google_cse_key != "" and cfg.google_cse_key != "XYZ" and cfg.google_cse_cx != "" and cfg.google_cse_cx != "XYZ": 58 | total_results = google_search(email, 1) 59 | if (total_results != 0 and total_results > 10): 60 | more_iters = (total_results / 10) 61 | if more_iters >= 10: 62 | print colored(style.BOLD + '\n---> Too many results, Daily API limit might exceed\n' + style.END, 'red') 63 | for x in xrange(1,more_iters + 1): 64 | google_search(email, (x*10)+1) 65 | print "\n\n-----------------------------\n" 66 | else: 67 | print colored(style.BOLD + '\n[-] google_cse_key and google_cse_cx not configured. Skipping paste(s) search.\nPlease refer to http://datasploit.readthedocs.io/en/latest/apiGeneration/.\n' + style.END, 'red') 68 | 69 | if __name__ == "__main__": 70 | main() 71 | 72 | -------------------------------------------------------------------------------- /domain_pastes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import config as cfg 4 | import requests 5 | import json 6 | import sys 7 | import time 8 | import re 9 | from termcolor import colored 10 | class style: 11 | BOLD = '\033[1m' 12 | END = '\033[0m' 13 | 14 | 15 | def colorize(string): 16 | colourFormat = '\033[{0}m' 17 | colourStr = colourFormat.format(32) 18 | resetStr = colourFormat.format(0) 19 | lastMatch = 0 20 | formattedText = '' 21 | for match in re.finditer(r'([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+(\.[a-zA-Z]{2,4})|/(?:http:\/\/)?(?:([^.]+)\.)?datasploit\.info/|/(?:http:\/\/)?(?:([^.]+)\.)?(?:([^.]+)\.)?datasploit\.info/)', string): 22 | start, end = match.span() 23 | formattedText += string[lastMatch: start] 24 | formattedText += colourStr 25 | formattedText += string[start: end] 26 | formattedText += resetStr 27 | lastMatch = end 28 | formattedText += string[lastMatch:] 29 | return formattedText 30 | 31 | def google_search(domain,start_index): 32 | time.sleep(0.3) 33 | url="https://www.googleapis.com/customsearch/v1?key=%s&cx=%s&q=\"%s\"&start=%s" % (cfg.google_cse_key, cfg.google_cse_cx, domain, start_index) 34 | res=requests.get(url) 35 | results = json.loads(res.text) 36 | if 'items' in results.keys(): 37 | if start_index == 1: 38 | print "[+] %s results found\n" % int(results['searchInformation']['totalResults']) 39 | for x in results['items']: 40 | print "Title: %s\nURL: %s\nSnippet: %s\n" % (x['title'], colorize(x['link']), colorize(x['snippet'])) 41 | start_index = +1 42 | return int(results['searchInformation']['totalResults']) 43 | elif results['searchInformation']['totalResults'] == "0": 44 | print '0 Results found' 45 | return 0 46 | elif results['error']['code'] == 403: 47 | print 'Rate limit Exceeded' 48 | return 0 49 | else: 50 | return 0 51 | #return json.loads(res.text) 52 | 53 | 54 | def main(): 55 | domain = sys.argv[1] 56 | print colored(style.BOLD + '\n---> Finding Paste(s)..\n' + style.END, 'blue') 57 | if cfg.google_cse_key != "" and cfg.google_cse_key != "XYZ" and cfg.google_cse_cx != "" and cfg.google_cse_cx != "XYZ": 58 | total_results = google_search(domain, 1) 59 | if (total_results != 0 and total_results > 10): 60 | more_iters = (total_results / 10) 61 | if more_iters >= 10: 62 | print colored(style.BOLD + '\n---> Too many results, Daily API limit might exceed\n' + style.END, 'red') 63 | for x in xrange(1,more_iters + 1): 64 | google_search(domain, (x*10)+1) 65 | print "\n\n-----------------------------------------n" 66 | else: 67 | print colored(style.BOLD + '\n[-] google_cse_key and google_cse_cx not configured. Skipping paste(s) search.\nPlease refer to http://datasploit.readthedocs.io/en/latest/apiGeneration/.\n' + style.END, 'red') 68 | 69 | if __name__ == "__main__": 70 | main() 71 | 72 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # Welcome to the DataSploit Documentation!!! 2 | ## Overview 3 | 4 | * Performs automated OSINT on a domain / email / username / phone and find out relevant information from different sources. 5 | * Useful for Pen-testers, Cyber Investigators, Product companies, defensive security professionals, etc. 6 | * Correlates and collaborate the results, show them in a consolidated manner. 7 | * Tries to find out credentials, api-keys, tokens, subdomains, domain history, legacy portals, etc. related to the target. 8 | * Available as single consolidating tool as well as standalone scripts. 9 | * Available in both GUI and Console. 10 | 11 | ## Why DataSploit??? 12 | 13 | Irrespective of whether you are attacking a target or defending one, you need to have a clear picture of the threat landscape before you get in. This is where DataSploit comes into the picture. Utilizing various Open Source Intelligence (OSINT) tools and techniques that we have found to be effective, DataSploit brings them all into one place, correlates the raw data captured and gives the user, all the relevant information about the domain / email / phone number / person, etc. It allows you to collect relevant information about a target which can expand your attack/defence surface very quickly. Sometimes it might even pluck the low hanging fruits for you without even touching the target and give you quick wins. Of course, a user can pick a single small job (which do not correlates obviously), or can pick up the parent search which will launch a bunch of queries, call other required scripts recursively, correlate the data and give you all juicy information in one go. 14 | 15 | ## Tool Background 16 | 17 | Created using our beloved Python, DataSploit simply requires the bare minimum data (such as domain name, email ID, person name, etc.) before it goes out on a mining spree. Once the data is collected, firstly the noise is removed, after which data is correlated and after multiple iterations it is stored locally in a database which could be easily visualised on the UI provided. The sources that have been integrated are all hand picked and are known to be providing reliable information. We have used them previously during different offensive as well as defensive engagements and found them helpful. 18 | 19 | ## Setup 20 | 21 | Worried about setup? Well, there are two major requirements here: 22 | 23 | * Setting up the db, django, libraries, etc. We will soon have a script which will automate this for you, so can just go ahead and shoot the OSINT job. 24 | * Feeding specific API keys for few specific sources. We are going to have a knowledge base where step by step instructions to generate these API keys will be documented. Sweet deal? 25 | * [Click here to check step by step setup guide](http://datasploit.readthedocs.io/en/latest/setupGuide/) 26 | 27 | ## Roadmap 28 | 29 | Apart from this, in order to make it more useful in daily life of a pen-tester, we are working to make the tool as an extension of the other tools that pen-testers commonly use such as Burp Suite, Maltego etc. so that you can feel at home during the usage. 30 | -------------------------------------------------------------------------------- /ip_shodan.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import config as cfg 4 | import requests 5 | import json 6 | import sys 7 | import socket 8 | from termcolor import colored 9 | class style: 10 | BOLD = '\033[1m' 11 | END = '\033[0m' 12 | 13 | 14 | 15 | 16 | def shodansearch(ip): 17 | print colored(style.BOLD + '[+] Searching in Shodan' + style.END) 18 | endpoint = "https://api.shodan.io/shodan/host/" + str(ip) + "?key=" + cfg.shodan_api 19 | req = requests.get(endpoint) 20 | parsed_res = json.loads(req.content) 21 | if 'error' in parsed_res.keys(): 22 | print 'No information available for that IP.' 23 | else: 24 | asn = '' 25 | print colored(style.BOLD + 'Report for IP: %s' + style.END, 'blue') % str(ip) 26 | print colored(style.BOLD + '\n----------- Per Port Results -----------' + style.END) 27 | if 'data' in parsed_res.keys(): 28 | for x in parsed_res['data']: 29 | print colored(style.BOLD + '\nResponse from Open Port: %s' + style.END, 'green') % (x['port']) 30 | '''if 'title' in x.keys(): 31 | print colored(style.BOLD + '[+] Title:\t\t' + style.END, 'green') + str(x['title'])''' 32 | if 'title' in x.keys(): 33 | print colored(style.BOLD + '[+] HTML Content:\t' + style.END, 'green') + str('Yes (Please inspect Manually on this port)') 34 | if 'http' in x.keys(): 35 | print colored(style.BOLD + '[+] HTTP port present:\t' + style.END, 'green') 36 | print '\tTitle: %s' % x['http']['title'] 37 | print '\tRobots: %s' % x['http']['robots'] 38 | print '\tServer: %s' % x['http']['server'] 39 | print '\tComponents: %s' % x['http']['components'] 40 | print '\tSitemap: %s' % x['http']['sitemap'] 41 | if 'ssh' in x.keys(): 42 | print colored(style.BOLD + '[+] HTTP port present:\t' + style.END, 'green') 43 | print '\tType: %s' % x['ssh']['type'] 44 | print '\tCipher: %s' % x['ssh']['cipher'] 45 | print '\tFingerprint: %s' % x['ssh']['fingerprint'] 46 | print '\tMac: %s' % x['ssh']['mac'] 47 | print '\tKey: %s' % x['ssh']['key'] 48 | if 'ssl' in x.keys(): 49 | print '\tSSL Versions: %s' % x['ssl']['versions'] 50 | if 'asn' in x.keys(): 51 | asn = parsed_res['asn'] 52 | if 'vulns' in x['opts']: 53 | for y in x['opts'].keys(): 54 | print x['opts'][y] 55 | if 'product' in x.keys(): 56 | print 'Product: %s' % x['product'] 57 | if 'version' in x.keys(): 58 | print 'Version: %s' % x['version'] 59 | print colored(style.BOLD + '\n----------- Basic Info -----------' + style.END, 'blue') 60 | print 'Open Ports: %s' % parsed_res['ports'] 61 | print 'Latitude: %s' % parsed_res['latitude'] 62 | print 'Hostnames: %s' % parsed_res['hostnames'] 63 | print 'Postal Code: %s' % parsed_res['postal_code'] 64 | print 'Country Code: %s' % parsed_res['country_code'] 65 | print 'Organization: %s' % parsed_res['org'] 66 | if asn != '': 67 | print 'ASN: %s' % asn 68 | if 'vulns' in parsed_res.keys(): 69 | print colored(style.BOLD + 'Vulnerabilties: %s' + style.END, 'red') % parsed_res['vulns'] 70 | 71 | 72 | def domaintoip(domain): 73 | return socket.gethostbyname(domain) 74 | 75 | def main(): 76 | ip_addr = sys.argv[1] 77 | shodansearch(ip_addr) 78 | #print res_from_shodan 79 | print colored(style.BOLD + '-----------------------------------------' + style.END, 'blue') 80 | 81 | if __name__ == "__main__": 82 | main() 83 | -------------------------------------------------------------------------------- /docs/apiGeneration.md: -------------------------------------------------------------------------------- 1 | We need following API keys to run this tool efficiently. 2 | - shodan_api 3 | - censysio_id 4 | - censysio_secret 5 | - zoomeyeuser 6 | - zoomeyepass 7 | - clearbit_apikey 8 | - emailhunter 9 | - fullcontact 10 | - google_cse_key 11 | - google_cse_cx 12 | 13 | ## Shodan_api 14 | * [Register](https://account.shodan.io/register) an account in shodan. 15 | * Visit your registered email id and activate the account. 16 | * [Login](https://account.shodan.io/login) to your account and you will find the API keys under profile overview tab. 17 | * Copy the API key and this is the value for *shodan_api* field in the config.py file. 18 | 19 | ## Censysio ID and Secret 20 | * [Register](https://www.censys.io/register) an account in censysio. 21 | * Visit your registered email id and activate the account. 22 | * [Login](https://www.censys.io/login) to your account. 23 | * Visit [Account](https://www.censys.io/account) tab to get API ID and Secret. 24 | * Your API key is the value for *censysio_id* field and API Secret is the value for *censysio_secret* field in config.py file. 25 | 26 | ## Clearbit API 27 | * [Register](https://dashboard.clearbit.com/signup) an account in clearbit. 28 | * It will auto redirect to the account. 29 | * Visit [API keys](https://dashboard.clearbit.com/keys) tab to get API key. 30 | * Copy the API key and this is the value for *clearbit_apikey* field in the config.py file. 31 | 32 | ## Emailhunter API 33 | * [Register](https://emailhunter.co/users/sign_up) an account in emailhunter. 34 | * Click on activation link send to your registered email address and it will auto redirect to the account. 35 | * Visit [API keys](https://emailhunter.co/api_keys) tab to get API key. 36 | * Copy the API key and this is the value for *emailhunter* field in the config.py file. 37 | 38 | ## Fullcontact API 39 | * [Register](https://portal.fullcontact.com/signup) an account in fullcontact. 40 | * [Login](https://portal.fullcontact.com/signin/). 41 | * It will ask for mobile number verification, complete that. 42 | * You will be redirected to the page where you can get the API key. 43 | * Additionally you will also get one email in the registered email id with API details. 44 | * Copy the API key and this is the value for *fullcontact_api* field in the config.py file. 45 | 46 | 47 | ## Google Custom Search Engine API key and CX id 48 | * Go to https://console.developers.google.com/ > Credentials 49 | * Click on 'Create Credentials' and select API key. 50 | * Click on restrict key. 51 | * Select HTTP Headers (Websites) radio button. 52 | * Add **.datasploit.info/\** in restrictions. This is done in order to stop unintentional usage of your api key. 53 | * Copy the API key and click on save button. This is the value for *google_cse_key* field in the config.py file. 54 | * Go to https://cse.google.com/cse/all, Click on Add button. 55 | * In sites to search box, enter "pastebin.com" and "pastie.org" 56 | * Give any name to your search engine and click on Create button. 57 | * Go to https://cse.google.com/cse/all again and click on the search engine you just created. 58 | * Click on the 'Search engine id' button and copy your search engine id. This is the value for *google_cse_cx* field in config.py file. 59 | 60 | 61 | ## Zoomeye Username and Password 62 | * [Register](https://www.zoomeye.org/accounts/register) an user with zoomeye and use the credentials for this tool. (Don't worry if you are redirected to sso.telnet404.com. *This is how it works.)* 63 | * Name of fields in the signup form - *1. email, 2. username, 3. nickname, 4. password, 5. confirm_password, 6. captcha* 64 | * Once you fill out the details it will redirect you to the account page. 65 | * There you will found something: *(Status: Inactive. Activate Now)* 66 | * Click on activate now and two fileds will be populated. 67 | * The first field will be captcha and the second one will be email id. 68 | * Once you fill the email id in the second text box, click on send activation code. 69 | * Check the activation code your email account. 70 | * Put this activation code in the email id text box and click on determine. 71 | * Now your account is activated and use those credentials in the tool. 72 | * Email ID which you have used to sign up is your username and is the value for *zoomeyeuser* field in config.py 73 | * Your account password is the value for *zoomeyepass* field in the config.py 74 | -------------------------------------------------------------------------------- /emailOsint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import requests 4 | import sys 5 | import config as cfg 6 | import clearbit 7 | import json 8 | import time 9 | import hashlib 10 | from bs4 import BeautifulSoup 11 | import re 12 | from email_fullcontact import fullcontact 13 | from termcolor import colored 14 | from email_pastes import google_search,colorize 15 | from email_basic_checks import basic_checks 16 | 17 | 18 | 19 | class style: 20 | BOLD = '\033[1m' 21 | END = '\033[0m' 22 | 23 | 24 | email = sys.argv[1] 25 | username_list = [] 26 | 27 | def check_and_append_username(username): 28 | if username not in username_list: 29 | username_list.append(username) 30 | 31 | def clearbit(email): 32 | header = {"Authorization" : "Bearer %s" % (cfg.clearbit_apikey)} 33 | req = requests.get("https://person.clearbit.com/v1/people/email/%s" % (email), headers = header) 34 | person_details = json.loads(req.content) 35 | if ("error" in req.content and "queued" in req.content): 36 | print "This might take some more time, Please run this script again, after 5 minutes." 37 | time.sleep(20) 38 | else: 39 | return person_details 40 | 41 | def haveIbeenpwned(email): 42 | print colored(style.BOLD + '\n---> Checking breach status in HIBP (@troyhunt)\n' + style.END, 'blue') 43 | time.sleep(0.3) 44 | req = requests.get("https://haveibeenpwned.com/api/v2/breachedaccount/%s" % (email)) 45 | if 'Attention Required! | CloudFlare' in req.content: 46 | print "CloudFlare detected" 47 | return {} 48 | if req.content != "": 49 | return json.loads(req.content) 50 | else: 51 | return {} 52 | 53 | 54 | def gravatar(email): 55 | gravatar_url = "http://www.gravatar.com/avatar/" + hashlib.md5(email.lower()).hexdigest() 56 | return gravatar_url 57 | 58 | def emaildom(email): 59 | req = requests.get('http://www.whoismind.com/email/%s.html'%(email)) 60 | soup=BeautifulSoup(req.content, "lxml") 61 | atag=soup.findAll('a') 62 | domains=[] 63 | for at in atag: 64 | if at.text in at['href']: 65 | domains.append(at.text) 66 | domains=set(domains) 67 | return domains 68 | 69 | def emailslides(email): 70 | req = requests.get('http://www.slideshare.net/search/slideshow?q=%s'%(email)) 71 | soup=BeautifulSoup(req.content, "lxml") 72 | atag=soup.findAll('a',{'class':'title title-link antialiased j-slideshow-title'}) 73 | slides={} 74 | for at in atag: 75 | slides[at.text]=at['href'] 76 | return slides 77 | 78 | def emailscribddocs(email): 79 | req = requests.get('https://www.scribd.com/search?page=1&content_type=documents&query=%s'%(email)) 80 | soup=BeautifulSoup(req.content, "lxml") 81 | m = re.findall('(?<=https://www.scribd.com/doc/)\w+', req.text.encode('UTF-8')) 82 | m = set(m) 83 | m = list(m) 84 | links=[] 85 | length=len(m) 86 | for lt in range(0,length-1): 87 | links.append("https://www.scribd.com/doc/"+m[lt]) 88 | return links 89 | 90 | 91 | def list_down_usernames(): 92 | if len(username_list) != 0: 93 | print colored(style.BOLD + '\n---> Enumerated Usernames\n' + style.END, 'blue') 94 | for x in username_list: 95 | print x 96 | print "\n" 97 | 98 | 99 | def print_emailosint(email): 100 | 101 | ''' 102 | hbp = haveIbeenpwned(email) 103 | if len(hbp) != 0: 104 | print colored("Pwned at %s Instances\n", 'green') % len(hbp) 105 | for x in hbp: 106 | print "Title:%s\nBreachDate%s\nPwnCount%s\nDescription%s\nDataClasses%s\n" % (x.get('Title', ''), x.get('BreachDate', ''), x.get('PwnCount', ''), x.get('Description', ''),x.get('DataClasses', '')) 107 | else: 108 | print colored("[-] No breach status found.", 'red') 109 | ''' 110 | 111 | basic_checks(email) 112 | 113 | print colored(style.BOLD + '\n---> Finding User Information\n' + style.END, 'blue') 114 | time.sleep(0.3) 115 | data = fullcontact(email) 116 | if data.get("status","") == 200: 117 | if data.get("contactInfo","") != "": 118 | print "Name: %s" % data.get("contactInfo","").get('fullName', '') 119 | print colored(style.BOLD + '\n Organizations / Work History\n' + style.END, 'green') 120 | for x in data.get("organizations",""): 121 | if x.get('isPrimary', '') == True: 122 | primarycheck = " - Primary" 123 | else: 124 | primarycheck = "" 125 | if x.get('endDate','') == '': 126 | print "\t%s at %s - (From %s to Unknown Date)%s" % (x.get('title', ''), x.get('name',''), x.get('startDate',''), primarycheck) 127 | else: 128 | print "\t%s - (From %s to %s)%s" % (x.get('name',''), x.get('startDate',''), x.get('endDate',''), primarycheck) 129 | if data.get("contactInfo","") != "": 130 | if data.get("contactInfo","").get('websites', '') != "": 131 | print "\nWebsite(s):" 132 | for x in data.get("contactInfo","").get('websites', ''): 133 | print "\t%s" % x.get('url', '') 134 | if data.get("contactInfo","").get('chats', '') != "": 135 | print '\nChat Accounts' 136 | for x in data.get("contactInfo","").get('chats', ''): 137 | print "\t%s on %s" % (x.get('handle', ''), x.get('client', '')) 138 | 139 | print colored(style.BOLD + '\n Social Profiles\n' + style.END, 'green') 140 | for x in data.get("socialProfiles",""): 141 | head = "\t%s:" % x.get('type','').upper() 142 | print colored(style.BOLD + str(head) + style.END) 143 | for y in x.keys(): 144 | if y != 'type' and y != 'typeName' and y != 'typeId': 145 | print '\t%s: %s' % (y, x.get(y,'')) 146 | if x.get('username', '') != "": 147 | check_and_append_username(x.get('username', '')) 148 | 149 | print '' 150 | 151 | print colored(style.BOLD + '\n Other Details\n' + style.END, 'green') 152 | if data.get("demographics","") != "": 153 | print "\tGender: %s" % data.get("demographics","").get('gender', '') 154 | print "\tCountry: %s" % data.get("demographics","").get('country', '') 155 | print "\tTentative City: %s" % data.get("demographics","").get('locationGeneral', '') 156 | 157 | print "Photos:" 158 | for x in data.get("photos",""): 159 | print "\t%s: %s" % (x.get('typeName', ''), x.get('url', '')) 160 | 161 | else: 162 | print colored('[-] Error Occured - Encountered Status Code: %s. Please check if Email_id exist or not?', 'red') % data.get("status","") 163 | 164 | 165 | 166 | '''clb_data = clearbit(email) 167 | for x in clb_data.keys(): 168 | print '%s details:' % x 169 | if type(clb_data[x]) == dict: 170 | for y in clb_data[x].keys(): 171 | if clb_data[x][y] is not None: 172 | print "%s: %s, " % (y, clb_data[x][y]) 173 | elif clb_data[x] is not None: 174 | print "\n%s: %s" % (x, clb_data[x]) 175 | 176 | print "\n-----------------------------\n" 177 | 178 | print "\t\t\t[+] Gravatar Link\n" 179 | print gravatar(email) 180 | print "\n-----------------------------\n" 181 | 182 | print "\t\t\t[+] Associated Domains\n" 183 | for doms in emaildom(email): 184 | print doms 185 | ''' 186 | 187 | 188 | print colored(style.BOLD + '\n---> Finding Paste(s)..\n' + style.END, 'blue') 189 | if cfg.google_cse_key != "" and cfg.google_cse_key != "XYZ" and cfg.google_cse_cx != "" and cfg.google_cse_cx != "XYZ": 190 | total_results = google_search(email, 1) 191 | if (total_results != 0 and total_results > 10): 192 | more_iters = (total_results / 10) 193 | if more_iters >= 10: 194 | print colored(style.BOLD + '\n---> Too many results, Daily API limit might exceed\n' + style.END, 'red') 195 | for x in xrange(1,more_iters + 1): 196 | google_search(email, (x*10)+1) 197 | print "\n\n-----------------------------\n" 198 | else: 199 | print colored(style.BOLD + '\n[-] google_cse_key and google_cse_cx not configured. Skipping paste(s) search.\nPlease refer to http://datasploit.readthedocs.io/en/latest/apiGeneration/.\n' + style.END, 'red') 200 | 201 | 202 | 203 | slds=emailslides(email) 204 | if len(slds) != 0: 205 | print colored(style.BOLD + '\n---> Slides Published:' + style.END, 'blue') 206 | time.sleep(0.3) 207 | for tl,lnk in slds.items(): 208 | print tl+"http://www.slideshare.net"+lnk 209 | else: 210 | print colored('[-] No Associated Slides found.', 'red') 211 | 212 | 213 | scdlinks=emailscribddocs(email) 214 | if len(scdlinks) != 0: 215 | print colored(style.BOLD + '\n---> Associated SCRIBD documents:\n' + style.END, 'blue') 216 | time.sleep(0.5) 217 | for sl in scdlinks: 218 | print sl 219 | print "" 220 | print colored(style.BOLD + 'More results might be available:' + style.END) 221 | print "https://www.scribd.com/search?page=1&content_type=documents&query="+email 222 | else: 223 | print colored('[-] No Associated Scribd Documents found.', 'red') 224 | 225 | 226 | 227 | 228 | def main(): 229 | print_emailosint(email) 230 | list_down_usernames() 231 | 232 | if __name__ == "__main__": 233 | main() 234 | 235 | -------------------------------------------------------------------------------- /usernameOsint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import tweepy 4 | import re 5 | from collections import Counter 6 | 7 | import requests 8 | import sys 9 | import config as cfg 10 | import clearbit 11 | import json 12 | import time 13 | import hashlib 14 | from bs4 import BeautifulSoup 15 | 16 | import os 17 | import urllib 18 | 19 | twitterex=0 #counter for identifying if twitter account is found 20 | 21 | def git_user_details(username): 22 | req = requests.get("https://api.github.com/users/%s" % (username)) 23 | return json.loads(req.content) 24 | 25 | def usernamesearch(username): 26 | data = {"username":username} 27 | req = requests.post('https://usersearch.org/results_normal.php',data=data, verify=False) 28 | soup=BeautifulSoup(req.content, "lxml") 29 | atag=soup.findAll('a',{'class':'pretty-button results-button'}) 30 | profiles=[] 31 | for at in atag: 32 | if at.text=="View Profile": 33 | profiles.append(at['href']) 34 | return profiles 35 | 36 | imglinks=[] 37 | def extracting(prourl,tag,attribute,value,finattrib,profile): 38 | res=requests.get(prourl) 39 | soup=BeautifulSoup(res.content,"lxml") 40 | img=soup.find(tag,{attribute:value}) 41 | if profile=="ask.fm": 42 | img[finattrib]="http:"+img[finattrib] 43 | imglinks.append(img[finattrib]) 44 | path=username+"/"+profile+".jpg" 45 | urllib.urlretrieve(img[finattrib], path) 46 | else: 47 | imglinks.append(img[finattrib]) 48 | path=username+"/"+profile+".jpg" 49 | urllib.urlretrieve(img[finattrib], path) 50 | 51 | def profilepic(urls): 52 | 53 | 54 | if len(urls) or git_data['avatar_url']: 55 | if not os.path.exists(username): 56 | os.makedirs(username) 57 | if git_data.get("avatar_url", "") != "": 58 | path=username+"/github.jpg" 59 | urllib.urlretrieve(git_data['avatar_url'], path) 60 | for url in urls: 61 | if 'etsy' in url: 62 | try: 63 | tg='meta' 64 | att='property' 65 | val='og:image' 66 | valx='content' 67 | pro="etsy" 68 | extracting(url,tg,att,val,valx,pro) 69 | continue 70 | except KeyError: 71 | pass 72 | elif 'gravatar' in url: 73 | try: 74 | tg='a' 75 | att='class' 76 | val='photo-0' 77 | valx='href' 78 | pro="gravatar" 79 | extracting(url,tg,att,val,valx,pro) 80 | continue 81 | except KeyError: 82 | pass 83 | elif 'youtube' in url: 84 | try: 85 | tg='link' 86 | att='itemprop' 87 | val='thumbnailUrl' 88 | valx='href' 89 | pro="youtube" 90 | extracting(url,tg,att,val,valx,pro) 91 | continue 92 | except KeyError: 93 | pass 94 | elif 'twitter' in url: 95 | try: 96 | tg='img' 97 | att='class' 98 | val='ProfileAvatar-image' 99 | valx='src' 100 | pro="twitter" 101 | extracting(url,tg,att,val,valx,pro) 102 | global twitterex 103 | twitterex=1 104 | continue 105 | except KeyError: 106 | pass 107 | elif 'photobucket' in url: 108 | try: 109 | tg='img' 110 | att='class' 111 | val='avatar smallProfile' 112 | valx='src' 113 | pro="photobucket" 114 | extracting(url,tg,att,val,valx,pro) 115 | continue 116 | except KeyError: 117 | pass 118 | elif 'pinterest' in url: 119 | try: 120 | tg='meta' 121 | att='property' 122 | val='og:image' 123 | valx='content' 124 | pro="pinterest" 125 | extracting(url,tg,att,val,valx,pro) 126 | continue 127 | except KeyError: 128 | pass 129 | elif 'ebay' in url: 130 | try: 131 | tg='img' 132 | att='class' 133 | val='prof_img img' 134 | valx='src' 135 | pro="ebay" 136 | extracting(url,tg,att,val,valx,pro) 137 | continue 138 | except KeyError: 139 | pass 140 | elif 'steam' in url: 141 | try: 142 | tg='link' 143 | att='rel' 144 | val='image_src' 145 | valx='href' 146 | pro="steam" 147 | extracting(url,tg,att,val,valx,pro) 148 | continue 149 | except KeyError: 150 | pass 151 | elif 'deviantart' in url: 152 | try: 153 | tg='img' 154 | att='class' 155 | val='avatar float-left' 156 | valx='src' 157 | pro="deviantart" 158 | extracting(url,tg,att,val,valx,pro) 159 | continue 160 | except KeyError: 161 | pass 162 | elif 'last.fm' in url: 163 | try: 164 | tg='img' 165 | att='class' 166 | val='avatar' 167 | valx='src' 168 | pro="last.fm" 169 | extracting(url,tg,att,val,valx,pro) 170 | continue 171 | except KeyError: 172 | pass 173 | elif 'vimeo' in url: 174 | try: 175 | tg='meta' 176 | att='property' 177 | val='og:image' 178 | valx='content' 179 | pro="vimeo" 180 | extracting(url,tg,att,val,valx,pro) 181 | continue 182 | except KeyError: 183 | pass 184 | elif 'vimeo' in url: 185 | try: 186 | tg='meta' 187 | att='property' 188 | val='og:image' 189 | valx='content' 190 | pro="vimeo" 191 | extracting(url,tg,att,val,valx,pro) 192 | continue 193 | except KeyError: 194 | pass 195 | elif 'ask.fm' in url: 196 | try: 197 | tg='meta' 198 | att='property' 199 | val='og:image' 200 | valx='content' 201 | pro="ask.fm" 202 | extracting(url,tg,att,val,valx,pro) 203 | continue 204 | except KeyError: 205 | pass 206 | elif 'tripadvisor' in url: 207 | try: 208 | tg='img' 209 | att='class' 210 | val='avatarUrl' 211 | valx='src' 212 | pro="tripadvisor" 213 | extracting(url,tg,att,val,valx,pro) 214 | continue 215 | except KeyError: 216 | pass 217 | elif 'tumblr' in url: 218 | try: 219 | tg='link' 220 | att='rel' 221 | val='icon' 222 | valx='href' 223 | pro="tumblr" 224 | extracting(url,tg,att,val,valx,pro) 225 | continue 226 | except KeyError: 227 | pass 228 | print "Profile pics will be saved in %s" % username 229 | return imglinks 230 | 231 | 232 | def twitterdetails(username): 233 | auth = tweepy.OAuthHandler(cfg.twitter_consumer_key, cfg.twitter_consumer_secret) 234 | auth.set_access_token(cfg.twitter_access_token, cfg.twiter_access_token_secret) 235 | 236 | #preparing auth 237 | api = tweepy.API(auth) 238 | 239 | 240 | f = open("temptweets.txt","w+") 241 | #writing tweets to temp file- last 1000 242 | for tweet in tweepy.Cursor(api.user_timeline, id=username).items(1000): 243 | f.write(tweet.text.encode("utf-8")) 244 | f.write("\n") 245 | 246 | 247 | 248 | #extracting hashtags 249 | f = open('temptweets.txt', 'r') 250 | q=f.read() 251 | strings = re.findall(r'(?:\#+[\w_]+[\w\'_\-]*[\w_]+)', q) #Regex(s) Source: https://marcobonzanini.com/2015/03/09/mining-twitter-data-with-python-part-2/ 252 | #extracting users 253 | tusers = re.findall(r'(?:@[\w_]+)', q) 254 | f.close() 255 | 256 | hashlist=[] 257 | userlist=[] 258 | for item in strings: 259 | item=item.strip( '#' ) 260 | item=item.lower() 261 | hashlist.append(item) 262 | 263 | hashlist=hashlist[:10] 264 | for itm in tusers: 265 | itm=itm.strip( '@' ) 266 | itm=itm.lower() 267 | userlist.append(itm) 268 | 269 | userlist=userlist[:10] 270 | 271 | return hashlist,userlist 272 | 273 | username = sys.argv[1] 274 | 275 | 276 | print "\t\t\t[+] Checking git user details\n" 277 | try: 278 | git_data = git_user_details(username) 279 | print "Login: %s" % git_data['login'] 280 | print "avatar_url: %s" % git_data['avatar_url'] 281 | print "id: %s" % git_data['id'] 282 | print "Repos: %s" % git_data['repos_url'] 283 | print "Name: %s" % git_data['name'] 284 | print "Company: %s" % git_data['company'] 285 | print "Blog: %s" % git_data['blog'] 286 | print "Location: %s" % git_data['location'] 287 | print "Hireable: %s" % git_data['hireable'] 288 | print "Bio: %s" % git_data['bio'] 289 | print "On GitHub: %s" % git_data['created_at'] 290 | print "Last Activity: %s" % git_data['updated_at'] 291 | print "\n-----------------------------\n" 292 | except: 293 | print 'Git account do not exist on this username.' 294 | 295 | 296 | 297 | 298 | print "\n\t\t\t[+] Username found on:\n" 299 | links=usernamesearch(username) 300 | for lnk in links: 301 | print lnk 302 | print "\n-----------------------------\n" 303 | 304 | imagelinks=profilepic(links) 305 | imagelinks.append(git_data.get("avatar_url", "")) 306 | print "\t\t\t[+] Finding Profile Pics\n" 307 | for x in imagelinks: 308 | print x 309 | print "\n\n-----------------------------\n" 310 | 311 | 312 | if (twitterex==1): 313 | #counting hashtag occurrence 314 | hashlist,userlist=twitterdetails(username) 315 | count= Counter(hashlist).most_common() 316 | print "Top Hashtag Occurrence for user "+username+" based on last 1000 tweets" 317 | for hash,cnt in count: 318 | print "#"+hash+" : "+str(cnt) 319 | print "\n" 320 | 321 | #counting user occurrence 322 | countu= Counter(userlist).most_common() 323 | print "Top User Occurrence for user "+username+" based on last 1000 tweets" 324 | for usr,cnt in countu: 325 | print "@"+usr+" : "+str(cnt) 326 | -------------------------------------------------------------------------------- /domain_subdomains.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import json 5 | import requests 6 | from bs4 import BeautifulSoup 7 | import re 8 | from domain_pagelinks import pagelinks 9 | import config as cfg 10 | import hashlib 11 | from urlparse import urlparse 12 | import urllib 13 | from termcolor import colored 14 | import time 15 | 16 | 17 | class style: 18 | BOLD = '\033[1m' 19 | END = '\033[0m' 20 | 21 | subdomain_list = [] 22 | 23 | 24 | def check_and_append_subdomains(subdomain): 25 | if subdomain not in subdomain_list: 26 | subdomain_list.append(subdomain) 27 | 28 | 29 | def subdomains(domain): 30 | r = requests.get("https://dnsdumpster.com/") 31 | cookies = {} 32 | if 'csrftoken' in r.cookies.keys(): 33 | cookies['csrftoken'] = r.cookies['csrftoken'] 34 | data = {} 35 | data['csrfmiddlewaretoken'] = cookies['csrftoken'] 36 | data['targetip'] = domain 37 | headers = {} 38 | headers['Referer'] = "https://dnsdumpster.com/" 39 | req = requests.post("https://dnsdumpster.com/", data = data, cookies = cookies, headers = headers) 40 | #print req.content 41 | soup = BeautifulSoup(req.content, 'lxml') 42 | 43 | subdomains=soup.findAll('td',{"class":"col-md-4"}) 44 | for subd in subdomains: 45 | if domain in subd.text: 46 | #print subd.text.split()[0] 47 | check_and_append_subdomains(subd.text.split()[0]) 48 | else: 49 | pass 50 | 51 | 52 | def find_subdomains_from_wolfram(domain): 53 | 54 | ''' 55 | Code is not working as of now, need some modifications. 56 | 57 | ''' 58 | req = requests.get("http://www.wolframalpha.com/input/api/v1/code?ts=%s" % (str(time.time()).split(".")[0])) 59 | code = json.loads(req.content)['code'] 60 | 61 | 62 | proxies = { 63 | 'http': 'http://127.0.0.1:8080', 64 | 'https': 'http://127.0.0.1:8080' 65 | } 66 | 67 | headers = {} 68 | headers['User-Agent'] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0" 69 | headers['Accept'] = "application/json, text/plain, */*" 70 | headers['Referer'] = "http://www.wolframalpha.com/input/?i=%s" % (domain) 71 | 72 | #second request to get recalculate_code 73 | req1 = requests.get("http://www.wolframalpha.com/input/json.jsp?async=true&banners=raw&debuggingdata=false&fbtoken=&format=image,plaintext,imagemap,sound,minput,moutput&formattimeout=8&input=%s&output=JSON&parsetimeout=5&proxycode=%s&scantimeout=0.5&sponsorcategories=true&statemethod=deploybutton&storesubpodexprs=true" % (domain, code), headers=headers, proxies=proxies) 74 | recalculate = json.loads(req1.content)['queryresult']['recalculate'] 75 | 76 | if recalculate != "": 77 | recalc_code = json.loads(req1.content)['queryresult']['recalculate'].split("=")[1].split("&")[0] 78 | 79 | #third request to get calc_id 80 | #print "http://www.wolframalpha.com/input/json.jsp?action=recalc&format=image,plaintext,imagemap,minput,moutput&id=%s&output=JSON&output=JSON&scantimeout=10&statemethod=deploybutton&storesubpodexprs=true" % (recalc_code) 81 | req2 = requests.get("http://www.wolframalpha.com/input/json.jsp?action=recalc&format=image,plaintext,imagemap,minput,moutput&id=%s&output=JSON&output=JSON&scantimeout=10&statemethod=deploybutton&storesubpodexprs=true" % (recalc_code), headers=headers, proxies=proxies) 82 | pods = json.loads(req2.content)['queryresult']['pods'] 83 | for x in pods: 84 | if "Web statistics for" in x['title']: 85 | async_code = x['async'].split('=')[1] 86 | 87 | #fourth request to get id for subdomains. 88 | req3 = requests.get("http://www.wolframalpha.com/input/json.jsp?action=asyncPod&format=image,plaintext,imagemap,minput,moutput&formattimeout=20&id=%s&output=JSON&podtimeout=20&statemethod=deploybutton&storesubpodexprs=true" % (async_code), headers=headers, proxies=proxies) 89 | for x in json.loads(req3.content)['pods'][0]['deploybuttonstates']: 90 | if x['name'] == "Subdomains": 91 | server_value = json.loads(req3.content)['pods'][0]['server'] 92 | sub_code = x['input'] 93 | else: 94 | pass 95 | 96 | #fifth request to find few subdomains 97 | url = "http://www.wolframalpha.com/input/json.jsp?async=false&dbid=%s&format=image,plaintext,imagemap,sound,minput,moutput&includepodid=WebSiteStatisticsPod:InternetData&input=%s&output=JSON&podTitle=Web+statistics+for+all+of+%s&podstate=%s&s=%s&statemethod=deploybutton&storesubpodexprs=true&text=Subdomains" % (sub_code, domain, domain, sub_code, server_value) 98 | req4 = requests.get(url, headers = headers, proxies = proxies) 99 | servervalue_for_more = json.loads(req4.content)['queryresult']['server'] 100 | print servervalue_for_more 101 | for x in json.loads(req4.content)['queryresult']['pods']: 102 | for y in x['subpods']: 103 | if y['title'] == "Subdomains": 104 | temp_subdomain_list = y['plaintext'].split("\n") 105 | del temp_subdomain_list[0] 106 | for x in temp_subdomain_list: 107 | check_and_append_subdomains(x.split('|')[0].strip(" ")) 108 | more_code = y['deploybuttonstates'][0]['input'] 109 | else: 110 | more_code = "blank_bro" 111 | 112 | #wooh, final request bitch. 113 | url = "http://www.wolframalpha.com/input/json.jsp?async=false&dbid=%s&format=image,plaintext,imagemap,sound,minput,moutput&includepodid=WebSiteStatisticsPod:InternetData&input=%s&output=JSON&podTitile=Subdomains&podstate=%s&s=%s&statemethod=deploybutton&storesubpodexprs=true&text=More" % (more_code, domain, more_code, servervalue_for_more) 114 | req5 = requests.get(url, headers = headers, proxies = proxies) 115 | for x in json.loads(req5.content)['queryresult']['subpods']: 116 | if x['title'] == "Subdomains": 117 | temp_subdomain_list = x['plaintext'].split("\n") 118 | del temp_subdomain_list[0] 119 | for y in temp_subdomain_list: 120 | check_and_append_subdomains(y.split('|')[0].strip(" ")) 121 | 122 | else: 123 | print "Empty Recalculate, Cannot Proceed sire." 124 | 125 | 126 | 127 | #def netcraft_makecookies(cookie): 128 | cookies = dict() 129 | cookies_list = cookie[0:cookie.find(';')].split("=") 130 | cookies[cookies_list[0]] = cookies_list[1] 131 | cookies['netcraft_js_verification_response'] = hashlib.sha1(urllib.unquote(cookies_list[1])).hexdigest() 132 | return cookies 133 | 134 | def subdomains_from_netcraft(domain): 135 | target_dom_name = domain.split(".") 136 | #url = "http://searchdns.netcraft.com/?restriction=site+ends+with&host=%s" % (domain) 137 | #req = requests.get(url) 138 | #cookies = netcraft_makecookies(req.headers['set-cookie']) 139 | #req1 = requests.get("http://searchdns.netcraft.com/?host=%s" % (domain), cookies = cookies) 140 | req1 = requests.get("http://searchdns.netcraft.com/?host=%s" % (domain)) 141 | link_regx = re.compile('') 142 | links_list = link_regx.findall(req1.content) 143 | for x in links_list: 144 | dom_name = x.split("/")[2].split(".") 145 | if (dom_name[len(dom_name) - 1] == target_dom_name[1]) and (dom_name[len(dom_name) - 2] == target_dom_name[0]): 146 | check_and_append_subdomains(x.split("/")[2]) 147 | num_regex = re.compile('Found (.*) site') 148 | num_subdomains = num_regex.findall(req1.content) 149 | if num_subdomains == []: 150 | num_regex = re.compile('First (.*) sites returned') 151 | num_subdomains = num_regex.findall(req1.content) 152 | if num_subdomains[0] != str(0): 153 | num_pages = int(num_subdomains[0])/20+1 154 | if num_pages > 1: 155 | last_regex = re.compile('%s.\n' % (20)) 156 | last_item = last_regex.findall(req1.content)[0].split("/")[2] 157 | next_page = 21 158 | 159 | for x in range(2,num_pages): 160 | url = "http://searchdns.netcraft.com/?host=%s&last=%s&from=%s&restriction=site%%20contains" % (domain, last_item, next_page) 161 | req2 = requests.get(url) 162 | link_regx = re.compile('') 163 | links_list = link_regx.findall(req2.content) 164 | for y in links_list: 165 | dom_name1 = y.split("/")[2].split(".") 166 | if (dom_name1[len(dom_name1) - 1] == target_dom_name[1]) and (dom_name1[len(dom_name1) - 2] == target_dom_name[0]): 167 | check_and_append_subdomains(y.split("/")[2]) 168 | last_item = links_list[len(links_list) - 1].split("/")[2] 169 | next_page = 20 * x + 1 170 | #print last_item 171 | #print next_page 172 | else: 173 | print colored('zero subdomains found here', 'red') 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | def main(): 182 | domain = sys.argv[1] 183 | #subdomains [to be called before pagelinks so as to avoid repititions.] 184 | print colored(style.BOLD + '---> Finding subdomains, will be back soon with list. \n' + style.END, 'blue') 185 | time.sleep(0.3) 186 | subdomains(domain) 187 | ##print "\t\t\t[+] Check_subdomains from wolframalpha" 188 | ##find_subdomains_from_wolfram(domain) 189 | #pagelinks_list = pagelinks(domain) 190 | 191 | subdomains_from_netcraft(domain) 192 | 193 | #printing all subdomains 194 | print colored("List of subdomains found\n", 'green') 195 | for sub in subdomain_list: 196 | print sub 197 | 198 | 199 | 200 | if __name__ == "__main__": 201 | main() 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | -------------------------------------------------------------------------------- /domainOsint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import time 4 | import whois 5 | import requests 6 | import socket 7 | import sys 8 | import json 9 | from Wappalyzer import Wappalyzer, WebPage 10 | from bs4 import BeautifulSoup 11 | import dns.resolver 12 | import config as cfg 13 | import re 14 | import csv 15 | from urlparse import urlparse 16 | import hashlib 17 | import urllib 18 | from pymongo import MongoClient 19 | import clearbit 20 | import time 21 | import hashlib 22 | from termcolor import colored 23 | import signal 24 | from json2html import * 25 | 26 | 27 | 28 | reload(sys) 29 | sys.setdefaultencoding("utf-8") 30 | 31 | 32 | 33 | 34 | 35 | from domain_whois import whoisnew 36 | from domain_dnsrecords import fetch_dns_records,parse_dns_records 37 | from ip_shodan import shodansearch 38 | from domain_zoomeye import get_accesstoken_zoomeye,search_zoomeye 39 | from domain_checkpunkspider import checkpunkspider 40 | from domain_wappalyzer import wappalyzeit 41 | from domain_subdomains import check_and_append_subdomains,subdomains,find_subdomains_from_wolfram,subdomains_from_netcraft,subdomain_list 42 | from domain_pagelinks import pagelinks 43 | from domain_history import netcraft_domain_history 44 | from domain_emailhunter import emailhunter,collected_emails 45 | from domain_github import github_search 46 | from domain_forumsearch import boardsearch_forumsearch 47 | from domain_wikileaks import wikileaks 48 | from domain_censys import view,censys_search,censys_list 49 | from domain_shodan import shodandomainsearch 50 | from email_fullcontact import fullcontact 51 | from domain_pastes import google_search,colorize 52 | 53 | 54 | 55 | import optparse 56 | parser = optparse.OptionParser() 57 | parser.add_option('-d', '--domain', action="store", dest="domain", help="Domain name against which automated Osint is to be performed.", default="spam") 58 | 59 | 60 | ''' 61 | collected_emails = [] 62 | subdomain_list = [] 63 | censys_list = [] 64 | ''' 65 | ###### 66 | ## Proram starts here ## 67 | ###### 68 | 69 | dict_to_apend= {} 70 | csv_dict = {} 71 | 72 | ''' 73 | # Code for mongoDb 74 | client = MongoClient() 75 | db = client.database1 76 | ''' 77 | allusernames_list = [] 78 | 79 | 80 | class style: 81 | BOLD = '\033[1m' 82 | END = '\033[0m' 83 | 84 | 85 | def signal_handler(signal, frame): 86 | print colored(style.BOLD + '\n [-] Brrrr...You pressed Ctrl+c and this is sad. Trying to exit..\n' + style.END, 'red') 87 | sys.exit(0) 88 | quit() 89 | 90 | 91 | def printart(): 92 | print "\n\t ____/ /____ _ / /_ ____ _ _____ ____ / /____ (_)/ /_" 93 | print "\t / __ // __ `// __// __ `// ___// __ \ / // __ \ / // __/" 94 | print "\t / /_/ // /_/ // /_ / /_/ /(__ )/ /_/ // // /_/ // // /_ " 95 | print "\t \__,_/ \__,_/ \__/ \__,_//____// .___//_/ \____//_/ \__/ " 96 | print "\t /_/ " 97 | print "\t\t\t\t\t\t" 98 | print " Open Source Assistant for #OSINT " 99 | print " website: www.datasploit.info " 100 | print "\t" 101 | 102 | 103 | 104 | 105 | def do_everything(domain): 106 | dict_to_apend['targetname'] = domain 107 | 108 | API_URL = "https://www.censys.io/api/v1" 109 | #print cfg.zoomeyeuser 110 | 111 | 112 | #print WhoIs information 113 | whoisdata = whoisnew(domain) 114 | print whoisdata 115 | dict_to_apend['whois'] = whoisdata 116 | 117 | 118 | 119 | #print DNS Information 120 | dns_records = parse_dns_records(domain) 121 | #dict_to_apend['dns_records'] = dns_records > not working 122 | #bson.errors.InvalidDocument: Cannot encode object: 123 | 124 | for x in dns_records.keys(): 125 | print x 126 | if "No" in dns_records[x] and "Found" in dns_records[x]: 127 | print "\t%s" % (dns_records[x]) 128 | else: 129 | for y in dns_records[x]: 130 | print "\t%s" % (y) 131 | #print type(dns_records[x]) 132 | 133 | print colored(style.BOLD + '\n---> Finding Paste(s)..\n' + style.END, 'blue') 134 | if cfg.google_cse_key != "" and cfg.google_cse_key != "XYZ" and cfg.google_cse_cx != "" and cfg.google_cse_cx != "XYZ": 135 | total_results = google_search(domain, 1) 136 | if (total_results != 0 and total_results > 10): 137 | more_iters = (total_results / 10) 138 | if more_iters >= 10: 139 | print colored(style.BOLD + '\n---> Too many results, Daily API limit might exceed\n' + style.END, 'red') 140 | for x in xrange(1,more_iters + 1): 141 | google_search(domain, (x*10)+1) 142 | print "\n\n-----------------------------\n" 143 | else: 144 | print colored(style.BOLD + '\n[-] google_cse_key and google_cse_cx not configured. Skipping paste(s) search.\nPlease refer to http://datasploit.readthedocs.io/en/latest/apiGeneration/.\n' + style.END, 'red') 145 | 146 | 147 | #convert domain to reverse_domain for passing to checkpunkspider() 148 | reversed_domain = "" 149 | for x in reversed(domain.split(".")): 150 | reversed_domain = reversed_domain + "." + x 151 | reversed_domain = reversed_domain[1:] 152 | res = checkpunkspider(reversed_domain) 153 | if 'data' in res.keys() and len(res['data']) >= 1: 154 | dict_to_apend['punkspider'] = res['data'] 155 | print colored("[+] Few vulnerabilities found at Punkspider", 'green' ) 156 | for x in res['data']: 157 | print "==> ", x['bugType'] 158 | print "Method:", x['verb'].upper() 159 | print "URL:\n" + x['vulnerabilityUrl'] 160 | print "Param:", x['parameter'] 161 | else: 162 | print colored("[-] No Vulnerabilities found on PunkSpider", 'red') 163 | 164 | 165 | 166 | print colored(style.BOLD + '\n---> Wapplyzing web page of base domain:\n' + style.END, 'blue') 167 | 168 | 169 | wappalyze_results = {} 170 | #make proper URL with domain. Check on ssl as well as 80. 171 | print "Hitting HTTP:\n", 172 | try: 173 | targeturl = "http://" + domain 174 | list_of_techs = wappalyzeit(targeturl) 175 | wappalyze_results['http'] = list_of_techs 176 | except: 177 | print "[-] HTTP connection was unavailable" 178 | wappalyze_results['http'] = [] 179 | print "\nHitting HTTPS:\n", 180 | try: 181 | targeturl = "https://" + domain 182 | list_of_techs = wappalyzeit(targeturl) 183 | wappalyze_results['https'] = list_of_techs 184 | except: 185 | print "[-] HTTPS connection was unavailable" 186 | wappalyze_results['https'] = [] 187 | 188 | 189 | if len(wappalyze_results.keys()) >= 1: 190 | dict_to_apend['wappalyzer'] = wappalyze_results 191 | 192 | 193 | #make Search github code for the given domain. 194 | 195 | git_results = github_search(domain, 'Code') 196 | if git_results is not None: 197 | print git_results 198 | else: 199 | print colored("Sad! Nothing found on github", 'red') 200 | 201 | #collecting emails for the domain and adding information in master email list. 202 | if cfg.emailhunter != "": 203 | emails = emailhunter(domain) 204 | if len(collected_emails) >= 1: 205 | for x in collected_emails: 206 | print str(x) 207 | dict_to_apend['email_ids'] = collected_emails 208 | 209 | 210 | ''' 211 | ##### code for automated osint on enumerated email email_ids 212 | 213 | while True: 214 | a = raw_input(colored("\n\nDo you want to launch osint check for these emails? [(Y)es/(N)o/(S)pecificEmail]: ", 'red')) 215 | if a.lower() =="yes" or a.lower() == "y": 216 | for x in collected_emails: 217 | print "Checking for %s" % x 218 | print_emailosint(x) 219 | break 220 | elif a.lower() =="no" or a.lower() == "n": 221 | break 222 | elif a.lower() =="s": 223 | while True: 224 | b = raw_input("Please Enter the EmailId you want to tun OSINT.) [(C)ancel?]: ") 225 | if b.lower() =="c": 226 | break 227 | else: 228 | print_emailosint(b) 229 | break 230 | break 231 | 232 | else: 233 | print("[-] Wrong choice. Please enter Yes or No [Y/N]: \n") 234 | #print emailOsint.username_list 235 | ''' 236 | 237 | 238 | 239 | dns_ip_history = netcraft_domain_history(domain) 240 | if len(dns_ip_history.keys()) >= 1: 241 | for x in dns_ip_history.keys(): 242 | print "%s: %s" % (dns_ip_history[x], x) 243 | dict_to_apend['domain_ip_history'] = dns_ip_history 244 | 245 | 246 | #subdomains [to be called before pagelinks so as to avoid repititions.] 247 | subdomains(domain) 248 | ##print "---> Check_subdomains from wolframalpha" 249 | ##find_subdomains_from_wolfram(domain) 250 | 251 | 252 | 253 | #domain pagelinks 254 | links=pagelinks(domain) 255 | if len(links) >= 1: 256 | for x in links: 257 | print x 258 | dict_to_apend['pagelinks'] = links 259 | 260 | 261 | #calling and printing subdomains after pagelinks. 262 | 263 | subdomains_from_netcraft(domain) 264 | print colored(style.BOLD + '---> Finding subdomains: \n' + style.END, 'blue') 265 | time.sleep(0.9) 266 | if len(subdomain_list) >= 1: 267 | for sub in subdomain_list: 268 | print sub 269 | dict_to_apend['subdomains'] = subdomain_list 270 | 271 | #wikileaks 272 | leaklinks=wikileaks(domain) 273 | for tl,lnk in leaklinks.items(): 274 | print "%s (%s)" % (lnk, tl) 275 | if len(leaklinks.keys()) >= 1: 276 | dict_to_apend['wikileaks'] = leaklinks 277 | print "For all results, visit: "+ 'https://search.wikileaks.org/?query=&exact_phrase=%s&include_external_sources=True&order_by=newest_document_date'%(domain) 278 | 279 | 280 | 281 | links_brd =boardsearch_forumsearch(domain) 282 | for tl,lnk in links_brd.items(): 283 | print "%s (%s)" % (lnk, tl) 284 | if len(links_brd.keys()) >= 1: 285 | dict_to_apend['forum_links'] = links_brd 286 | 287 | 288 | if cfg.zoomeyeuser != "" and cfg.zoomeyepass != "": 289 | temp_list =[] 290 | zoomeye_results = search_zoomeye(domain) 291 | dict_zoomeye_results = json.loads(zoomeye_results) 292 | if 'matches' in dict_zoomeye_results.keys(): 293 | print len(dict_zoomeye_results['matches']) 294 | for x in dict_zoomeye_results['matches']: 295 | if x['site'].split('.')[-2] == domain.split('.')[-2]: 296 | temp_list.append(x) 297 | if 'title' in x.keys() : 298 | print "IP: %s\nSite: %s\nTitle: %s\nHeaders: %s\nLocation: %s\n" % (x['ip'], x['site'], x['title'], x['headers'].replace("\n",""), x['geoinfo']) 299 | else: 300 | for val in x.keys(): 301 | print "%s: %s" % (val, x[val]) 302 | if len(temp_list) >= 1: 303 | dict_to_apend['zoomeye'] = temp_list 304 | 305 | 306 | if cfg.censysio_id != "" and cfg.censysio_secret != "": 307 | print colored(style.BOLD + '\n---> Kicking off Censys Search. This may take a while..\n' + style.END, 'blue') 308 | censys_search(domain) 309 | if len(censys_list) >= 1: 310 | dict_to_apend['censys'] = censys_list 311 | for x in censys_list: 312 | if x is not None and x != 'None': 313 | print x 314 | 315 | 316 | if cfg.shodan_api != "": 317 | res_from_shodan = json.loads(shodandomainsearch(domain)) 318 | if 'matches' in res_from_shodan.keys(): 319 | dict_to_apend['shodan'] = res_from_shodan['matches'] 320 | for x in res_from_shodan['matches']: 321 | print "IP: %s\nHosts: %s\nDomain: %s\nPort: %s\nData: %s\nLocation: %s\n" % (x['ip_str'], x['hostnames'], x['domains'], x['port'], x['data'].replace("\n",""), x['location']) 322 | 323 | 324 | ''' 325 | #insert data into mongodb instance 326 | try: 327 | result = db.domaindata.insert(dict_to_apend, check_keys=False) 328 | print 'output saved to MongoDb' 329 | except: 330 | print "More data than I can handle, hence not saved in MongoDb. Apologies." 331 | ''' 332 | 333 | 334 | 335 | 336 | 337 | def main(): 338 | signal.signal(signal.SIGINT, signal_handler) 339 | options, args = parser.parse_args() 340 | printart() 341 | domain = options.domain 342 | if domain == 'spam': 343 | print "[-] Invalid argument passed. \nUsage: domainOsint.py [options]\n\nOptions:\n -h,\t\t--help\t\t\tshow this help message and exit\n -d DOMAIN,\t--domain=DOMAIN\t\tDomain name against which automated Osint is to be performed." 344 | else: 345 | do_everything(domain) 346 | ''' 347 | Since mongodb support is gone, dont need this snippet 348 | cursor = db.domaindata.find({"targetname": domain}) 349 | if cursor.count() > 0: 350 | while True: 351 | a = raw_input(colored("Would you like to delete all the data for %s and launch a new scan? (Note: Deleting all data will disable alerting options.) [(Y)es/(N)o/(C)ancel]: ",'red') % domain,) 352 | if a.lower() =="yes" or a.lower() == "y": 353 | print colored("Deleting all data for %s...", 'blue') % domain 354 | result = db.domaindata.delete_many({"targetname": domain}) 355 | print colored("Deleted %s document(s)", 'green') % result.deleted_count 356 | print colored("Launching new scan....\n",'blue') 357 | do_everything(domain) 358 | break 359 | elif a.lower() =="no" or a.lower() == "n": 360 | print colored("Note: This will create another entry for %s\n", 'red') % domain 361 | do_everything(domain) 362 | break 363 | elif a.lower() =="cancel" or a.lower() == "c": 364 | print colored("I lost the battle against your will. Quitting...", 'red') 365 | break 366 | else: 367 | print("[-] Wrong choice. Please enter Yes or No [Y/N]: \n") 368 | else: 369 | print colored("No earlier scans found for %s, Launching fresh scan in 3, 2, 1..\n", 'blue') % domain 370 | do_everything(domain) 371 | ''' 372 | 373 | if __name__ == "__main__": 374 | main() 375 | 376 | 377 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------