Resyncing.

This commit is contained in:
NotoriousRebel
2019-01-22 17:35:33 -05:00
25 changed files with 1074 additions and 111 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
FROM python:3.6-alpine
FROM python:3.6-alpine3.7
RUN mkdir /app
RUN pip3 install requests beautifulsoup4 texttable plotly shodan
WORKDIR /app
+7 -7
View File
@@ -6,7 +6,7 @@
* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *
* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *
* *
* theHarvester 3.0.6 v183 *
* theHarvester 3.0.6 v206 *
* Coded by Christian Martorella *
* Edge-Security Research *
* cmartorella@edge-security.com *
@@ -36,7 +36,7 @@ Passive:
* dogpile: Dogpile search engine - www.dogpile.com
* duckduckgo:
* duckduckgo: DuckDuckGo search engine - www.duckduckgo.com
* google: Google search engine (Optional Google dorking.) - www.google.com
@@ -68,7 +68,7 @@ Passive:
* vhost: Bing virtual hosts search
* virustotal:
* virustotal: Virustotal.com domain search
* yahoo: Yahoo search engine
@@ -82,7 +82,7 @@ Active:
Modules that require an API key:
--------------------------------
Add your keys to discovery/constants.py
Add your keys to api-keys.yaml
* googleCSE: API key and CSE ID
* hunter: API key
@@ -92,7 +92,7 @@ Add your keys to discovery/constants.py
Dependencies:
-------------
* Python 3.6
* pip3 install -r requirements.txt
* python3 -m pip install -r requirements.txt
Changelog in 3.0:
-----------------
@@ -110,8 +110,8 @@ Main contributors:
-------
* Matthew Brown @NotoriousRebel
* Janos Zold @Jzold
* Lee Baird @discoverscripts
* Jay Townsend @L1ghtn1ng
* Lee Baird @discoverscripts [![Twitter Follow](https://img.shields.io/twitter/follow/discoverscripts.svg?style=social&label=Follow)](https://twitter.com/discoverscripts)
* Jay Townsend @L1ghtn1ng [![Twitter Follow](https://img.shields.io/twitter/follow/jay_townsend1.svg?style=social&label=Follow)](https://twitter.com/jay_townsend1)
Thanks:
-------
+16
View File
@@ -0,0 +1,16 @@
apikeys:
bing:
key:
googleCSE:
key:
id:
hunter:
key:
securityTrails:
key:
shodan:
key: oCiMsgM6rQWqiTvPxFHYcExlZgg7wvTt
+6
View File
@@ -0,0 +1,6 @@
hunter:asadsad
shodan:asdasdasdsa
securityTrails:adsadada
googleCSEapi:asdsadas
googleCSEid:dasdasd
bing:asdasdsa
+2 -2
View File
@@ -16,7 +16,7 @@ class SearchBing:
self.hostname = 'www.bing.com'
self.quantity = '50'
self.limit = int(limit)
self.bingApi = bingAPI_key
self.bingApi = Core.bing_key()
self.counter = start
def do_search(self):
@@ -70,7 +70,7 @@ class SearchBing:
def process(self, api):
if api == 'yes':
if self.bingApi == "":
if self.bingApi is None:
raise MissingKey(True)
while self.counter < self.limit:
if api == 'yes':
-19
View File
@@ -1,27 +1,8 @@
"""
Module that contains constants used across plugins.
Contains list of API keys, user agents, and a function to get random delay and user agent.
As well as a defined User Agent for Google Search.
User-Agents from: https://github.com/tamimibrahim17/List-of-user-agents
"""
import random
googleUA = "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1464.0 Safari/537.36"
bingAPI_key = ''
googleCSEAPI_key = ''
googleCSE_id = ''
hunterAPI_key = ''
securityTrailsAPI_key = ''
shodanAPI_key = 'oCiMsgM6rQWqiTvPxFHYcExlZgg7wvTt' # This is the default key.
def filter(lst):
"""
+1 -1
View File
@@ -22,7 +22,7 @@ class search_crtsh:
print(e)
try:
params = {'User-Agent': Core.get_user_agent()}
r=requests.get(urly, headers=params)
r = requests.get(urly, headers=params)
except Exception as e:
print(e)
links = self.get_info(r.text)
+6 -3
View File
@@ -17,14 +17,17 @@ class SearchDogpile:
def do_search(self):
# Dogpile is hardcoded to return 10 results.
url = 'http://' + self.server + "/search/web?qsi=" + str(self.counter) \
url = 'https://' + self.server + "/search/web?qsi=" + str(self.counter) \
+ "&q=\"%40" + self.word + "\""
headers = {
'Host': self.hostname,
'User-agent': Core.get_user_agent()
}
h = requests.get(url=url, headers=headers)
self.total_results += h.text
try:
h = requests.get(url=url, headers=headers)
self.total_results += h.text
except requests.exceptions.ConnectionError:
pass
def process(self):
while self.counter <= self.limit and self.counter <= 1000:
+5 -4
View File
@@ -1,4 +1,5 @@
from discovery.constants import *
from lib.core import *
from parsers import myparser
import re
import requests
@@ -19,11 +20,11 @@ class SearchGoogleCSE:
self.quantity = "10"
self.limit = limit
self.counter = 1
self.api_key = googleCSEAPI_key
if self.api_key == "":
self.api_key = Core.google_cse_key()['key']
if self.api_key is None:
raise MissingKey(True)
self.cse_id = googleCSE_id
if self.cse_id == "":
self.cse_id = Core.google_cse_key()['id']
if self.cse_id is None:
raise MissingKey(False)
self.lowRange = start
self.highRange = start + 100
+2 -1
View File
@@ -1,4 +1,5 @@
from discovery.constants import *
from lib.core import *
from parsers import myparser
import requests
@@ -9,7 +10,7 @@ class SearchHunter:
self.word = word
self.limit = 100
self.start = start
self.key = hunterAPI_key
self.key = Core.hunter_key()
if self.key == "":
raise MissingKey(True)
self.results = ""
+64
View File
@@ -0,0 +1,64 @@
import requests
import myparser
def search():
# {"term":"linkedin.com","lookuplevel":0,"maxresults":1000,"timeout":null,"datefrom":"","dateto":"","sort":2,"media":0,"terminate":[]}:
domain = 'linkedin.com'
s = requests.session()
tm = s.get('https://intelx.io')
print(tm.status_code)
params = {"term": "linkedin.com", "lookuplevel": 0, "maxresults": 1000, "timeout": 1, "datefrom": "", "dateto": "",
"sort": 2, "media": 0, "terminate": []}
url = 'https://api.intelx.io/intelligent/search'
r = s.post(url, params=params)
print(r.status_code)
print('r.text: ', r.text)
def test():
print(requests.get('https://www.intelx.io').text)
def main():
search()
if __name__ == '__main__':
main()
"""
class Creds():
def __init__(self, id):
self.id = id
def get_key(self):
with open('credentials.txt', 'r', encoding='UTF-8') as file:
for line in file:
line = line.strip().split(':')
id = line[0]
key = line[1]
print('id: ', id)
print('key: ', key)
if 'hunter' in id:
return key
elif 'bing' in id:
return key
elif 'shodan' in id:
return key
elif 'securityTrails' in id:
return key
elif 'googleCSEapi' in id:
return key
elif 'googleCSEid' in id:
return key
else:
continue
return None
x = 'YXNkYWRhZGFkYWQ='
import base64
print(base64.b64decode(x).decode('UTF-8'))
"""
+2 -1
View File
@@ -1,4 +1,5 @@
from discovery.constants import *
from lib.core import *
from parsers import securitytrailsparser
import requests
import sys
@@ -9,7 +10,7 @@ class search_securitytrail:
def __init__(self, word):
self.word = word
self.key = securityTrailsAPI_key
self.key = Core.security_trails_key()
if self.key == "":
raise MissingKey(True)
self.results = ""
+3 -2
View File
@@ -1,12 +1,13 @@
from discovery.constants import *
from shodan import Shodan
from lib.core import *
from shodan import exception
from shodan import Shodan
class search_shodan:
def __init__(self):
self.key = shodanAPI_key
self.key = Core.shodan_key()
if self.key == '':
raise MissingKey(True)
self.api = Shodan(self.key)
+1 -1
View File
@@ -24,7 +24,7 @@ class search_twitter:
print(e)
headers = {'User-Agent': Core.get_user_agent()}
try:
r=requests.get(urly, headers=headers)
r = requests.get(urly, headers=headers)
except Exception as e:
print(e)
self.results = r.text
+326 -31
View File
@@ -1,11 +1,45 @@
# coding=utf-8
#from discovery import *
# from lib import stash
import os
import random
# import re
import sys
import yaml
class Core:
@staticmethod
def bing_key():
with open('api-keys.yaml', 'r') as api_keys:
keys = yaml.safe_load(api_keys)
return keys['apikeys']['bing']['key']
@staticmethod
def google_cse_key():
with open('api-keys.yaml', 'r') as api_keys:
keys = yaml.safe_load(api_keys)
return keys['apikeys']['googleCSE']
@staticmethod
def hunter_key():
with open('api-keys.yaml', 'r') as api_keys:
keys = yaml.safe_load(api_keys)
return keys['apikeys']['hunter']['key']
@staticmethod
def security_trails_key():
with open('api-keys.yaml', 'r') as api_keys:
keys = yaml.safe_load(api_keys)
return keys['apikeys']['securityTrails']['key']
@staticmethod
def shodan_key():
with open('api-keys.yaml', 'r') as api_keys:
keys = yaml.safe_load(api_keys)
return keys['apikeys']['shodan']['key']
@staticmethod
def banner():
print('\n\033[93m*******************************************************************')
@@ -15,7 +49,7 @@ class Core:
print("* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *")
print("* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *")
print('* *')
print('* theHarvester 3.0.6 v183 *')
print('* theHarvester 3.0.6 v206 *')
print('* Coded by Christian Martorella *')
print('* Edge-Security Research *')
print('* cmartorella@edge-security.com *')
@@ -23,36 +57,33 @@ class Core:
print('******************************************************************* \n\n \033[0m')
@staticmethod
def usage():
comm = os.path.basename(sys.argv[0])
if os.path.dirname(sys.argv[0]) == os.getcwd():
comm = './' + comm
print('\033[94m Usage: theHarvester.py <options> \n \033[0m')
print(' -d: company name or domain to search')
print(""" -b: source: baidu, bing, bingapi, censys, crtsh, cymon, dogpile,
google, googleCSE, google-certificates, google-profiles,
hunter, linkedin, netcraft, pgp, securityTrails, threatcrowd,
trello, twitter, vhost, virustotal, yahoo, all""")
print(' -l: limit the number of search results')
print(' -s: start with result number X (default: 0)')
print(' -g: use Google Dorking instead of normal Google search')
print(' -h: use Shodan to query discovered hosts')
print(' -e: specify DNS server')
print(' -v: verify host name via DNS resolution and search for virtual hosts')
print(' -n: perform a DNS reverse query on all ranges discovered')
print(' -c: perform a DNS brute force on the domain')
print(' -t: perform a DNS TLD expansion discovery')
print(' -p: port scan the detected hosts and check for Takeovers (21,22,80,443,8080)')
print(' -f: save the results to an HTML and/or XML file')
print('\n\033[94m Examples: \033[0m')
print((' ' + comm + ' -d acme -l 200 -b linkedin'))
print((' ' + comm + ' -d acme.com -l 500 -b google -f myresults.html'))
print((' ' + comm + ' -d acme.com -b pgp, virustotal'))
print((' ' + comm + ' -d acme.com -l 100 -g -b google'))
print((' ' + comm + ' -d acme.com -l 200 -b googleCSE -s 300'))
print((' ' + comm + ' -d acme.edu -l 300 -b bing -h \n'))
def get_supportedengines():
supportedengines = {'baidu',
'bing',
'bingapi',
'censys',
'crtsh',
'cymon',
'dogpile',
'duckduckgo',
'google',
'googleCSE',
'google-certificates',
'google-profiles',
'hunter',
'linkedin',
'netcraft',
'pgp',
'securityTrails',
'threatcrowd',
'trello',
'twitter',
'vhost',
'virustotal',
'yahoo',
'all'
}
return supportedengines
@staticmethod
def get_supportedengines():
@@ -64,7 +95,12 @@ class Core:
@staticmethod
def get_user_agent():
<<<<<<< HEAD
"""User-Agents from https://github.com/tamimibrahim17/List-of-user-agents"""
||||||| merged common ancestors
=======
# User-Agents from https://github.com/tamimibrahim17/List-of-user-agents
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
user_agents = [
'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1464.0 Safari/537.36',
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) chromeframe/10.0.648.205',
@@ -296,3 +332,262 @@ class Core:
'Mozilla/5.0 (Windows NT 5.1; U; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.00'
]
return random.choice(user_agents)
# TODO use this method when -b all is called to replace lines 383-635 in theHarvester.py
# TODO and to find the best approch of getting the
# word, limit and start etc vars from the arguments and importing libs that are needed
# @staticmethod
# def engine_all_search():
# print(('Full harvest on ' + word))
# all_emails = []
# all_hosts = []
# try:
# print('[*] Searching Baidu.')
# search = baidusearch.SearchBaidu(word, limit)
# search.process()
# all_emails = filter(search.get_emails())
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'baidu')
# db.store_all(word, all_emails, 'email', 'baidu')
# except Exception:
# pass
#
# print('[*] Searching Bing.')
# bingapi = 'no'
# search = bingsearch.SearchBing(word, limit, start)
# search.process(bingapi)
# emails = filter(search.get_emails())
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'bing')
# all_emails.extend(emails)
# all_emails = sorted(set(all_emails))
# db.store_all(word, all_emails, 'email', 'bing')
#
# print('[*] Searching Censys.')
# from discovery import censys
# search = censys.SearchCensys(word, limit)
# search.process()
# ips = search.get_ipaddresses()
# setips = set(ips)
# uniqueips = list(setips) # Remove duplicates.
# all_ip.extend(uniqueips)
# hosts = filter(search.get_hostnames())
# sethosts = set(hosts)
# uniquehosts = list(sethosts) # Remove duplicates.
# all_hosts.extend(uniquehosts)
# db = stash.stash_manager()
# db.store_all(word, uniquehosts, 'host', 'censys')
# db.store_all(word, uniqueips, 'ip', 'censys')
#
# print('[*] Searching CRT.sh.')
# search = crtsh.search_crtsh(word)
# search.process()
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'CRTsh')
#
# # cymon
# print('\033[94m[*] Searching Cymon. \033[0m')
# from discovery import cymon
# # Import locally or won't work.
# search = cymon.search_cymon(word)
# search.process()
# all_ip = search.get_ipaddresses()
# db = stash.stash_manager()
# db.store_all(word, all_ip, 'ip', 'cymon')
#
# print('\033[94m[*] Searching Dogpile. \033[0m')
# search = dogpilesearch.SearchDogpile(word, limit)
# search.process()
# emails = filter(search.get_emails())
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# all_emails.extend(emails)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'email', 'dogpile')
# db.store_all(word, all_hosts, 'host', 'dogpile')
#
# print('[*] Searching DuckDuckGo.')
# from discovery import duckduckgosearch
# search = duckduckgosearch.SearchDuckDuckGo(word, limit)
# search.process()
# emails = filter(search.get_emails())
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# all_emails.extend(emails)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'email', 'duckduckgo')
# db.store_all(word, all_hosts, 'host', 'duckduckgo')
#
# print('[*] Searching Google.')
# search = googlesearch.search_google(word, limit, start)
# search.process(google_dorking)
# emails = filter(search.get_emails())
# hosts = filter(search.get_hostnames())
# all_emails.extend(emails)
# db = stash.stash_manager()
# db.store_all(word, all_emails, 'email', 'google')
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'google')
#
# print('[*] Searching Google Certificate transparency report.')
# search = googlecertificates.SearchGoogleCertificates(word, limit, start)
# search.process()
# domains = filter(search.get_domains())
# all_hosts.extend(domains)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'google-certificates')
#
# try:
# print('[*] Searching Google profiles.')
# search = googlesearch.search_google(word, limit, start)
# search.process_profiles()
# people = search.get_profiles()
# db = stash.stash_manager()
# db.store_all(word, people, 'name', 'google-profile')
# print('\nUsers from Google profiles:')
# print('---------------------------')
# for users in people:
# print(users)
# except Exception:
# pass
#
# print('[*] Searching Hunter.')
# from discovery import huntersearch
# # Import locally.
# try:
# search = huntersearch.SearchHunter(word, limit, start)
# search.process()
# emails = filter(search.get_emails())
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, hosts, 'host', 'hunter')
# all_emails.extend(emails)
# all_emails = sorted(set(all_emails))
# db.store_all(word, all_emails, 'email', 'hunter')
# except Exception as e:
# if isinstance(e, MissingKey):
# print(e)
# else:
# pass
#
# print('\033[94m[*] Searching Linkedin. \033[0m')
# search = linkedinsearch.SearchLinkedin(word, limit)
# search.process()
# people = search.get_people()
# db = stash.stash_manager()
# db.store_all(word, people, 'name', 'linkedin')
#
# if len(people) == 0:
# print('\n[*] No users found.\n\n')
# else:
# print('\n[*] Users found: ' + str(len(people)))
# print('---------------------')
# for user in sorted(list(set(people))):
# print(user)
#
# print('[*] Searching Netcraft.')
# search = netcraft.SearchNetcraft(word)
# search.process()
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'netcraft')
#
# print('[*] Searching PGP key server.')
# try:
# search = pgpsearch.SearchPgp(word)
# search.process()
# emails = filter(search.get_emails())
# hosts = filter(search.get_hostnames())
# sethosts = set(hosts)
# uniquehosts = list(sethosts) # Remove duplicates.
# all_hosts.extend(uniquehosts)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'PGP')
# all_emails.extend(emails)
# db = stash.stash_manager()
# db.store_all(word, all_emails, 'email', 'PGP')
# except Exception:
# pass
#
# print('[*] Searching Threatcrowd.')
# try:
# search = threatcrowd.search_threatcrowd(word)
# search.process()
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'threatcrowd')
# except Exception:
# pass
#
# print('[*] Searching Trello.')
# from discovery import trello
# # Import locally or won't work.
# search = trello.search_trello(word, limit)
# search.process()
# emails = filter(search.get_emails())
# all_emails.extend(emails)
# info = search.get_urls()
# hosts = filter(info[0])
# trello_info = (info[1], True)
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, hosts, 'host', 'trello')
# db.store_all(word, emails, 'email', 'trello')
#
# try:
# print('[*] Searching Twitter.')
# search = twittersearch.search_twitter(word, limit)
# search.process()
# people = search.get_people()
# db = stash.stash_manager()
# db.store_all(word, people, 'name', 'twitter')
# print('\nUsers from Twitter:')
# print('-------------------')
# for user in people:
# print(user)
# except Exception:
# pass
#
# print('\n[*] Virtual hosts:')
# print('------------------')
# for l in host_ip:
# search = bingsearch.SearchBing(l, limit, start)
# search.process_vhost()
# res = search.get_allhostnames()
# for x in res:
# x = re.sub(r'[[\<\/?]*[\w]*>]*', '', x)
# x = re.sub('<', '', x)
# x = re.sub('>', '', x)
# print((l + '\t' + x))
# vhost.append(l + ':' + x)
# full.append(l + ':' + x)
# vhost = sorted(set(vhost))
#
# print('[*] Searching VirusTotal.')
# search = virustotal.search_virustotal(word)
# search.process()
# hosts = filter(search.get_hostnames())
# all_hosts.extend(hosts)
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'virustotal')
#
# print('[*] Searching Yahoo.')
# search = yahoosearch.search_yahoo(word, limit)
# search.process()
# hosts = search.get_hostnames()
# emails = search.get_emails()
# all_hosts.extend(filter(hosts))
# all_emails.extend(filter(emails))
# db = stash.stash_manager()
# db.store_all(word, all_hosts, 'host', 'yahoo')
# db.store_all(word, all_emails, 'email', 'yahoo')
+28 -31
View File
@@ -1,16 +1,16 @@
try:
from datetime import datetime
import plotly.graph_objs as go
import plotly.plotly as py
import plotly
import stash
try:
db = stash.stash_manager()
db.do_init()
except Exception as e:
pass
from datetime import datetime
from lib import stash
import plotly
import plotly.graph_objs as go
import plotly.plotly as py
class graphgenerator:
try:
db = stash.stash_manager()
db.do_init()
except Exception:
pass
class GraphGenerator:
def __init__(self, domain):
self.domain = domain
@@ -23,26 +23,26 @@ try:
self.scattercountshodans = []
self.scattercountvhosts = []
def drawlatestscangraph(self,domain,latestscandata):
def drawlatestscangraph(self, domain, latestscandata):
try:
self.barcolumns= ['email', 'host', 'ip', 'shodan', 'vhost']
self.barcolumns = ['email', 'host', 'ip', 'shodan', 'vhost']
self.bardata.append(latestscandata['email'])
self.bardata.append(latestscandata['host'])
self.bardata.append(latestscandata['ip'])
self.bardata.append(latestscandata['shodan'])
self.bardata.append(latestscandata['vhost'])
layout = dict(title = 'Latest scan - number of targets identified for ' + domain,
xaxis = dict(title = 'Targets'),
yaxis = dict(title = 'Hits'),)
layout = dict(title='Latest scan - number of targets identified for ' + domain,
xaxis=dict(title='Targets'),
yaxis=dict(title='Hits'),)
barchartcode = plotly.offline.plot({
'data': [go.Bar(x=self.barcolumns, y=self.bardata)],
'layout': layout,
}, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div')
return barchartcode
except Exception as e:
print('Error generating HTML bar graph code for domain: ' + str(e))
print(f'Error generating HTML bar graph code for domain: {e}')
def drawscattergraphscanhistory(self,domain,scanhistorydomain):
def drawscattergraphscanhistory(self, domain, scanhistorydomain):
try:
scandata = scanhistorydomain
for i in scandata:
@@ -56,20 +56,20 @@ try:
trace0 = go.Scatter(
x=self.scatterxdata,
y=self.scattercounthosts,
mode = 'lines+markers',
name = 'hosts')
mode='lines+markers',
name='hosts')
trace1 = go.Scatter(
x=self.scatterxdata,
y=self.scattercountips,
mode = 'lines+markers',
name = 'IP address')
mode='lines+markers',
name='IP address')
trace2 = go.Scatter(
x=self.scatterxdata,
y=self.scattercountvhosts,
mode = 'lines+markers',
name = 'vhost')
mode='lines+markers',
name='vhost')
trace3 = go.Scatter(
x=self.scatterxdata,
@@ -84,16 +84,13 @@ try:
name='email')
data = [trace0, trace1, trace2, trace3, trace4]
layout = dict(title = 'Scanning history for ' + domain,
xaxis = dict(title = 'Date'),
yaxis = dict(title = 'Results'),
)
layout = dict(title='Scanning history for ' + domain, xaxis=dict(title='Date'), yaxis=dict(title='Results'))
scatterchartcode = plotly.offline.plot({
'data': data,
'layout': layout}, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div')
return scatterchartcode
except Exception as e:
print('Error generating HTML for the historical graph for domain: ' + str(e))
print(f'Error generating HTML for the historical graph for domain: {e}')
except Exception as e:
print('Error in the reportgraph module: ' + str(e))
print(f'Error in the reportgraph module: {e}')
View File
+59
View File
@@ -0,0 +1,59 @@
<html><head><style type='text/css'>body {
background: #FFFFFF top no-repeat;
}
h1 { font-family: arial, Times New Roman, times-roman, georgia, serif;
color: #680000;
margin: 0;
padding: 0px 0px 6px 0px;
font-size: 51px;
line-height: 44px;
letter-spacing: -2px;
font-weight: bold;
}
h3 { font-family: arial, Times New Roman, times-roman, georgia, serif;
color: #444;
margin: 0;
padding: 0px 0px 6px 0px;
font-size: 30px;
line-height: 44px;
letter-spacing: -2px;
font-weight: bold;
}
li { font-family: arial, Times New Roman, times-roman, georgia, serif;
color: #444;
margin: 0;
padding: 0px 0px 6px 0px;
font-size: 15px;
line-height: 15px;
letter-spacing: 0.4px;
}
h2{
font-family: arial, Times New Roman, times-roman, georgia, serif;
font-size: 48px;
line-height: 40px;
letter-spacing: -1px;
color: #680000 ;
margin: 0 0 0 0;
padding: 0 0 0 0;
font-weight: 100;
}
pre {
overflow: auto;
padding-left: 15px;
padding-right: 15px;
font-size: 11px;
line-height: 15px;
margin-top: 10px;
width: 93%;
display: block;
background-color: #eeeeee;
color: #000000;
max-height: 300px;
}
</style>
</head><body><h1>theHarvester results</h1><h2>for :yale.edu</h2><h3>Dashboard:</h3><body><table border=0 cellspacing=0 cellpadding=0><tr><td><table border=0 cellspacing=2 cellpadding=0><tr align=center valign=bottom><td><table border=0 cellspacing=0 cellpadding=0 width=100%><tr align=center><td style="color:black;font-family:Arial, Helvetica;font-size:12px;" valign=bottom height=114 nowrap>0%</td></tr><tr><td width=24 height=1></td></tr></table></td><td><table border=0 cellspacing=0 cellpadding=0 width=100%><tr align=center><td style="color:black;font-family:Arial, Helvetica;font-size:12px;" valign=bottom height=14 nowrap>100%</td></tr><tr align=center valign=bottom><td><table border=0 cellspacing=0 cellpadding=0><tr><td style="border:2px outset white;" bgcolor="#0000FF" title="30"><div style="width:20px; height:100px; line-height:1px; font-size:1px;"></div></td></tr></table></td></tr></table></td><td><table border=0 cellspacing=0 cellpadding=0 width=100%><tr align=center><td style="color:black;font-family:Arial, Helvetica;font-size:12px;" valign=bottom height=114 nowrap>0%</td></tr><tr><td width=24 height=1></td></tr></table></td><td><table border=0 cellspacing=0 cellpadding=0 width=100%><tr align=center><td style="color:black;font-family:Arial, Helvetica;font-size:12px;" valign=bottom height=114 nowrap>0%</td></tr><tr><td width=24 height=1></td></tr></table></td><td><table border=0 cellspacing=0 cellpadding=0 width=100%><tr align=center><td style="color:black;font-family:Arial, Helvetica;font-size:12px;" valign=bottom height=114 nowrap>0%</td></tr><tr><td width=24 height=1></td></tr></table></td></tr><tr align=center><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;" nowrap>&nbsp;0&nbsp;</td><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;" nowrap>&nbsp;30&nbsp;</td><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;" nowrap>&nbsp;0&nbsp;</td><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;" nowrap>&nbsp;0&nbsp;</td><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;" nowrap>&nbsp;0&nbsp;</td></tr><tr><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;text-align:center;">&nbsp;Emails&nbsp;</td><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;text-align:center;">&nbsp;hosts&nbsp;</td><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;text-align:center;">&nbsp;Vhost&nbsp;</td><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;text-align:center;">&nbsp;TLD&nbsp;</td><td style="color:black;background-color:#C0E0FF;border:2px groove white;font-family:Arial, Helvetica;font-size:12px;text-align:center;">&nbsp;Shodan&nbsp;</td></tr></table></td></tr></table></body><h3>Emails found:</h3><h2>No emails found.</h2><h3>Hosts found:</h3><ul class="softlist"><li class="softitem">admissions.yale.edu:104.16.141.133</li><li class="softitem">canvas.yale.edu:23.185.0.3</li><li class="softitem">courses.yale.edu:3.16.174.139</li><li class="softitem">divinity.yale.edu:23.185.0.3</li><li class="softitem">economics.yale.edu:23.185.0.3</li><li class="softitem">facilities.yale.edu:23.185.0.3</li><li class="softitem">finaid.yale.edu:23.185.0.3</li><li class="softitem">gsas.yale.edu:23.185.0.3</li><li class="softitem">housing.yale.edu:23.185.0.3</li><li class="softitem">law.yale.edu:104.16.243.239</li><li class="softitem">map.yale.edu:104.16.141.133</li><li class="softitem">music.yale.edu:104.197.192.61</li><li class="softitem">news.yale.edu:104.16.140.133</li><li class="softitem">oyc.yale.edu:23.185.0.3</li><li class="softitem">psychology.yale.edu:23.185.0.3</li><li class="softitem">registrar.yale.edu:23.185.0.3</li><li class="softitem">software.yale.edu:23.185.0.3</li><li class="softitem">som.yale.edu:23.185.0.3</li><li class="softitem">studentlife.yale.edu:23.185.0.3</li><li class="softitem">summer.yale.edu:23.185.0.3</li><li class="softitem">to.yale.edu:23.185.0.3</li><li class="softitem">visitorcenter.yale.edu:23.185.0.3</li><li class="softitem">web.library.yale.edu:23.185.0.3</li><li class="softitem">www.architecture.yale.edu:52.55.191.55</li><li class="softitem">www.drama.yale.edu:34.237.244.148</li><li class="softitem">www.yale.edu:104.16.141.133</li><li class="softitem">yalecollege.yale.edu:23.185.0.3</li><li class="softitem">yalehealth.yale.edu:23.185.0.3</li><li class="softitem">ymm.yale.edu:52.162.255.165</li><li class="softitem">your.yale.edu:104.16.141.133</li></ul></body></html>
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><theHarvester><host><ip>104.16.141.133</ip><hostname>admissions.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>canvas.yale.edu</hostname></host><host><ip>3.16.174.139</ip><hostname>courses.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>divinity.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>economics.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>facilities.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>finaid.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>gsas.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>housing.yale.edu</hostname></host><host><ip>104.16.243.239</ip><hostname>law.yale.edu</hostname></host><host><ip>104.16.141.133</ip><hostname>map.yale.edu</hostname></host><host><ip>104.197.192.61</ip><hostname>music.yale.edu</hostname></host><host><ip>104.16.140.133</ip><hostname>news.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>oyc.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>psychology.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>registrar.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>software.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>som.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>studentlife.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>summer.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>to.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>visitorcenter.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>web.library.yale.edu</hostname></host><host><ip>52.55.191.55</ip><hostname>www.architecture.yale.edu</hostname></host><host><ip>34.237.244.148</ip><hostname>www.drama.yale.edu</hostname></host><host><ip>104.16.141.133</ip><hostname>www.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>yalecollege.yale.edu</hostname></host><host><ip>23.185.0.3</ip><hostname>yalehealth.yale.edu</hostname></host><host><ip>52.162.255.165</ip><hostname>ymm.yale.edu</hostname></host><host><ip>104.16.141.133</ip><hostname>your.yale.edu</hostname></host></theHarvester>
+30
View File
@@ -0,0 +1,30 @@
[-] Target domain: yale.edu
[-] Searching in Google.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta name="viewport" content="initial-scale=1"><title>https://www.google.com/search?num=100&amp;start=0&amp;hl=en&amp;meta=&amp;q=%40%22yale.edu%22&amp;gws_rd=ssl</title></head>
<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px;" onload="e=document.getElementById('captcha');if(e){e.focus();}">
<div style="max-width:400px;">
<hr noshade size="1" style="color:#ccc; background-color:#ccc;"><br>
<form id="captcha-form" action="index" method="post">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script>var submitCallback = function(response) {document.getElementById('captcha-form').submit();};</script>
<div id="recaptcha" class="g-recaptcha" data-sitekey="6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1b" data-callback="submitCallback" data-s="18Eo76MFhYpVx6sQJTHgt8TIjpuvvnAOkoGGPsDzwT5jP1kkSug02rUWd2XPt15pxAmW1DSUoR2IvoLyGvUgToVtPw1m402Eo-H6XP_7aC_Vy-GZ955uDeRnpphIDRDY9Mow_uy9b5KfRCOFtReQj21Pxfl3bMBaAjp0UPpXNYPOlkJqsqJWqY90RkGW4rvoYYnd6rzILvRwzYVS1PwODU_WWTxlWCntrt4MeQa-xhLqI99OOB6bMlw"></div>
<input type='hidden' name='q' value='EgRD-THLGMmtv-EFIhkA8aeDS5_RbBBsZpmoMx0GNPeNJmMRPsgaMgFy'><input type="hidden" name="continue" value="https://www.google.com/search?num=100&amp;start=0&amp;hl=en&amp;meta=&amp;q=%40%22yale.edu%22&amp;gws_rd=ssl">
</form>
<hr noshade size="1" style="color:#ccc; background-color:#ccc;">
<div style="font-size:13px;">
<b>About this page</b><br><br>Our systems have detected unusual traffic from your computer network. This page checks to see if it&#39;s really you sending the requests, and not a robot. <a href="#" onclick="document.getElementById('infoDiv').style.display='block';">Why did this happen?</a><br><br>
<div id="infoDiv" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;">
This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the <a href="//www.google.com/policies/terms/">Terms of Service</a>. The block will expire shortly after those requests stop. In the meantime, solving the above CAPTCHA will let you continue to use our services.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests. If you share your network connection, ask your administrator for help &mdash; a different computer using the same IP address may be responsible. <a href="//support.google.com/websearch/answer/86640">Learn more</a><br><br>Sometimes you may be asked to solve the CAPTCHA if you are using advanced terms that robots are known to use, or sending requests very quickly.
</div>
IP address: 67.249.49.203<br>Time: 2019-01-04T21:57:29Z<br>URL: https://www.google.com/search?num=100&amp;start=0&amp;hl=en&amp;meta=&amp;q=%40%22yale.edu%22&amp;gws_rd=ssl<br>
</div>
</div>
</body>
</html>
Google is blocking your IP due to too many automated requests, wait or change your IP
+91
View File
File diff suppressed because one or more lines are too long
+6 -5
View File
@@ -1,6 +1,7 @@
beautifulsoup4>=4.7.0
plotly>=3.4.2
pytest>=4.0.2
beautifulsoup4>=4.7.1
plotly>=3.5.0
PyYaml==3.13
pytest>=4.1.1
requests>=2.21.0
texttable>=1.4.0
shodan>=1.10.0
shodan>=1.10.0
texttable>=1.6.0
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><theHarvester><host><ip>69.147.64.34</ip><hostname>baseball.fantasysports.yahoo.com</hostname></host><host><ip>66.218.84.43</ip><hostname>ca.finance.yahoo.com</hostname></host><host><ip>98.136.96.141</ip><hostname>ca.news.yahoo.com</hostname></host><host><ip>69.147.82.61</ip><hostname>ca.sports.yahoo.com</hostname></host><host><ip>66.218.84.137</ip><hostname>downloads.yahoo.com</hostname></host><host><ip>66.218.84.42</ip><hostname>e1.mail.yahoo.com</hostname></host><host><ip>72.30.35.10</ip><hostname>en-maktoob.yahoo.com</hostname></host><host><ip>98.136.96.141</ip><hostname>es-us.deportes.yahoo.com</hostname></host><host><ip>74.6.144.139</ip><hostname>es-us.vida-estilo.yahoo.com</hostname></host><host><ip>98.138.219.231</ip><hostname>espanol.yahoo.com</hostname></host><host><ip>74.6.144.139</ip><hostname>finance.yahoo.com</hostname></host><host><ip>66.218.84.42</ip><hostname>football.fantasysports.yahoo.com</hostname></host><host><ip>72.30.35.10</ip><hostname>fr-be.yahoo.com</hostname></host><host><ip>66.218.84.42</ip><hostname>fr.mail.yahoo.com</hostname></host><host><ip>98.136.96.141</ip><hostname>fr.news.yahoo.com</hostname></host><host><ip>72.30.35.10</ip><hostname>frontier.yahoo.com</hostname></host><host><ip>98.138.219.231</ip><hostname>gr.yahoo.com</hostname></host><host><ip>98.136.100.143</ip><hostname>hk.news.yahoo.com</hostname></host><host><ip>72.30.35.9</ip><hostname>id.yahoo.com</hostname></host><host><ip>66.218.84.137</ip><hostname>images.search.yahoo.com</hostname></host><host><ip>66.218.84.43</ip><hostname>in.mail.yahoo.com</hostname></host><host><ip>98.136.96.141</ip><hostname>in.news.yahoo.com</hostname></host><host><ip>72.30.35.9</ip><hostname>in.yahoo.com</hostname></host><host><ip>67.195.204.151</ip><hostname>login.yahoo.com</hostname></host><host><ip>66.218.84.43</ip><hostname>mail.yahoo.com</hostname></host><host><ip>72.30.35.10</ip><hostname>malaysia.yahoo.com</hostname></host><host><ip>66.218.84.137</ip><hostname>maps.yahoo.com</hostname></host><host><ip>98.136.96.141</ip><hostname>mobile.yahoo.com</hostname></host><host><ip>72.30.35.9</ip><hostname>my.yahoo.com</hostname></host><host><ip>98.136.96.141</ip><hostname>news.yahoo.com</hostname></host><host><ip>74.6.144.139</ip><hostname>nz.news.yahoo.com</hostname></host><host><ip>72.30.35.10</ip><hostname>nz.yahoo.com</hostname></host><host><ip>66.218.84.42</ip><hostname>overview.mail.yahoo.com</hostname></host><host><ip>72.30.35.10</ip><hostname>se.yahoo.com</hostname></host><host><ip>66.218.84.137</ip><hostname>search.yahoo.com</hostname></host><host><ip>98.136.96.141</ip><hostname>sg.news.yahoo.com</hostname></host><host><ip>66.218.84.137</ip><hostname>sg.search.yahoo.com</hostname></host><host><ip>74.6.144.139</ip><hostname>sg.style.yahoo.com</hostname></host><host><ip>98.139.28.144</ip><hostname>smallbusiness.yahoo.com</hostname></host><host><ip>69.147.82.61</ip><hostname>sports.yahoo.com</hostname></host><host><ip>98.136.100.143</ip><hostname>tw.news.yahoo.com</hostname></host><host><ip>66.218.84.42</ip><hostname>uk.finance.yahoo.com</hostname></host><host><ip>69.147.82.60</ip><hostname>uk.sports.yahoo.com</hostname></host><host><ip>66.218.84.137</ip><hostname>us.search.yahoo.com</hostname></host><host><ip>72.30.35.10</ip><hostname>us.yahoo.com</hostname></host><host><ip>72.30.35.10</ip><hostname>www.yahoo.com</hostname></host></theHarvester>
+397 -2
View File
@@ -3,16 +3,28 @@
import argparse
from discovery import *
from discovery.constants import *
from lib.core import *
from lib import hostchecker
from lib import htmlExport
from lib import reportgraph
from lib import statichtmlgenerator
<<<<<<< HEAD
from lib import stash
||||||| merged common ancestors
=======
from lib import stash
from lib.core import *
from platform import python_version
import argparse
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
import datetime
import ipaddress
import re
<<<<<<< HEAD
from platform import python_version
||||||| merged common ancestors
import stash
=======
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
import time
try:
@@ -30,6 +42,7 @@ except ImportError:
Core.banner()
<<<<<<< HEAD
def start():
parser = argparse.ArgumentParser(description='theHarvester is a open source intelligence gathering tool(OSINT) that is used for recon')
parser.add_argument('-c', '--dns-brute', help='perform a DNS brute force on the domain, default=False, params=True', default=False)
@@ -51,6 +64,39 @@ def start():
args = parser.parse_args()
||||||| merged common ancestors
def start(argv):
if len(sys.argv) < 4:
Core.usage()
sys.exit(1)
try:
opts, args = getopt.getopt(argv, 'l:d:b:s:u:vf:nhcgpte:')
except getopt.GetoptError:
Core.usage()
sys.exit(1)
=======
def start():
parser = argparse.ArgumentParser(description='theHarvester is a open source intelligence gathering tool(OSINT) that is used for recon')
parser.add_argument('-d', '--domain', help='company name or domain to search', required=True)
parser.add_argument('-l', '--limit', help='limit the number of search results, default=500', default=500, type=int)
parser.add_argument('-S', '--start', help='start with result number X, default=0', default=0, type=int)
parser.add_argument('-g', '--google-dork', help='use Google Dorks for google search, default=False, params=True', default=False)
parser.add_argument('-p', '--port-scan', help='scan the detected hosts and check for Takeovers (21,22,80,443,8080) default=False, params=True', default=False)
parser.add_argument('-s', '--shodan', help='use Shodan to query discovered hosts, default=False, params=True', default=False)
parser.add_argument('-v', '--virtual-host', help='verify host name via DNS resolution and search for virtual hosts params=basic, default=False', default=False)
parser.add_argument('-e', '--dns-server', help='DNS server to use for lookup')
parser.add_argument('-t', '--dns-tld', help='perform a DNS TLD expansion discovery, default False', default=False)
parser.add_argument('-n', '--dns-lookup', help='enable DNS server lookup, default=False, params=True', default=False)
parser.add_argument('-c', '--dns-brute', help='perform a DNS brute force on the domain, default=False, params=True', default=False)
parser.add_argument('-f', '--filename', help='save the results to an HTML and/or XML file', default='', type=str)
parser.add_argument('-b', '--source', help='''source: baidu, bing, bingapi, censys, crtsh, cymon, dogpile,
google, googleCSE, google-certificates, google-profiles,
hunter, linkedin, netcraft, pgp, securityTrails, threatcrowd,
trello, twitter, vhost, virustotal, yahoo, all''', required=True)
args = parser.parse_args()
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
try:
db = stash.stash_manager()
db.do_init()
@@ -61,21 +107,181 @@ def start():
all_hosts = []
all_ip = []
bingapi = 'yes'
<<<<<<< HEAD
dnsbrute = args.dns_brute
dnslookup = args.dns_lookup
dnsserver = args.dns_server
dnstld = args.dnstld
filename = args.filename
||||||| merged common ancestors
dnsbrute = False
dnslookup = False
dnsserver = ""
dnstld = False
filename = ""
=======
dnsbrute = args.dns_brute
dnslookup = args.dns_lookup
dnsserver = args.dns_server
dnstld = args.dns_tld
filename = args.filename
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
full = []
<<<<<<< HEAD
google_dorking = args.googleDork
||||||| merged common ancestors
google_dorking = False
=======
google_dorking = args.google_dork
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
host_ip = []
<<<<<<< HEAD
limit = args.limit
ports_scanning = args.portscan
shodan = args.shodan
start = args.start
||||||| merged common ancestors
limit = 500
ports_scanning = False
shodan = False
start = 0
=======
limit = args.limit
ports_scanning = args.port_scan
shodan = args.shodan
start = args.start
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
takeover_check = False
trello_info = ([], False)
vhost = []
<<<<<<< HEAD
virtual = args.virtual_host
word = args.domain
engines = set(args.source.split(','))
if set(engines).issubset(Core.get_supportedengines()):
print(f'\033[94m[*] Target domain: {word} \n \033[0m')
for engineitem in engines:
if engineitem == 'baidu':
print('\033[94m[*] Searching Baidu. \033[0m')
try:
search = baidusearch.SearchBaidu(word, limit)
search.process()
all_emails = filter(search.get_emails())
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'baidu')
db.store_all(word, all_emails, 'email', 'baidu')
except Exception:
pass
||||||| merged common ancestors
virtual = False
for value in enumerate(opts):
opt = value[1][0]
arg = value[1][1]
opt = str(opt)
arg = str(arg)
if opt == '-l':
limit = int(arg)
elif opt == '-d':
word = arg
elif opt == '-g':
google_dorking = True
elif opt == '-s':
start = int(arg)
elif opt == '-v':
virtual = 'basic'
elif opt == '-f':
filename = arg
elif opt == '-n':
dnslookup = True
elif opt == '-c':
dnsbrute = True
elif opt == '-h':
shodan = True
elif opt == '-e':
dnsserver = arg
elif opt == '-p':
ports_scanning = True
elif opt == '-t':
dnstld = True
elif opt == '-b':
engines = set(arg.split(','))
supportedengines = set(['baidu', 'bing', 'bingapi', 'censys', 'crtsh', 'cymon', 'dogpile', 'duckduckgo',
'google', 'googleCSE', 'google-certificates', 'google-profiles', 'hunter',
'linkedin', 'netcraft', 'pgp', 'securityTrails', 'threatcrowd', 'trello',
'twitter', 'vhost', 'virustotal', 'yahoo', 'all'])
if set(engines).issubset(supportedengines):
print(f'\033[94m[*] Target domain: {word} \n \033[0m')
for engineitem in engines:
if engineitem == 'baidu':
print('\033[94m[*] Searching Baidu. \033[0m')
try:
search = baidusearch.SearchBaidu(word, limit)
search.process()
all_emails = filter(search.get_emails())
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'baidu')
db.store_all(word, all_emails, 'email', 'baidu')
except Exception:
pass
elif engineitem == 'bing' or engineitem == 'bingapi':
print('\033[94m[*] Searching Bing. \033[0m')
try:
search = bingsearch.SearchBing(word, limit, start)
if engineitem == 'bingapi':
bingapi = 'yes'
else:
bingapi = 'no'
search.process(bingapi)
all_emails = filter(search.get_emails())
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'email', 'bing')
db.store_all(word, all_hosts, 'host', 'bing')
except Exception as e:
if isinstance(e, MissingKey):
print(e)
else:
pass
elif engineitem == 'censys':
print('\033[94m[*] Searching Censys. \033[0m')
from discovery import censys
# Import locally or won't work
search = censys.SearchCensys(word, limit)
search.process()
all_ip = search.get_ipaddresses()
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'censys')
db.store_all(word, all_ip, 'ip', 'censys')
elif engineitem == 'crtsh':
print('\033[94m[*] Searching CRT.sh. \033[0m')
search = crtsh.search_crtsh(word)
search.process()
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'CRTsh')
elif engineitem == 'cymon':
print('\033[94m[*] Searching Cymon. \033[0m')
from discovery import cymon
# Import locally or won't work.
search = cymon.search_cymon(word)
search.process()
all_ip = search.get_ipaddresses()
db = stash.stash_manager()
db.store_all(word, all_ip, 'ip', 'cymon')
=======
virtual = args.virtual_host
word = args.domain
engines = set(args.source.split(','))
@@ -117,6 +323,30 @@ def start():
print(e)
else:
pass
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
<<<<<<< HEAD
elif engineitem == 'bing' or engineitem == 'bingapi':
print('\033[94m[*] Searching Bing. \033[0m')
try:
search = bingsearch.SearchBing(word, limit, start)
bingapi = ''
if engineitem == 'bingapi':
bingapi += 'yes'
else:
bingapi += 'no'
search.process(bingapi)
all_emails = filter(search.get_emails())
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'email', 'bing')
db.store_all(word, all_hosts, 'host', 'bing')
except Exception as e:
if isinstance(e, MissingKey):
print(e)
else:
pass
elif engineitem == 'censys':
print('\033[94m[*] Searching Censys. \033[0m')
@@ -194,7 +424,112 @@ def start():
search.process()
search.store_results()
all_emails = filter(search.get_emails())
||||||| merged common ancestors
elif engineitem == 'dogpile':
print('\033[94m[*] Searching Dogpile. \033[0m')
search = dogpilesearch.SearchDogpile(word, limit)
search.process()
emails = filter(search.get_emails())
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
all_emails.extend(emails)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'email', 'dogpile')
db.store_all(word, all_hosts, 'host', 'dogpile')
elif engineitem == 'duckduckgo':
print('\033[94m[*] Searching DuckDuckGo. \033[0m')
from discovery import duckduckgosearch
search = duckduckgosearch.SearchDuckDuckGo(word, limit)
search.process()
emails = filter(search.get_emails())
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
all_emails.extend(emails)
=======
elif engineitem == 'censys':
print('\033[94m[*] Searching Censys. \033[0m')
from discovery import censys
# Import locally or won't work
search = censys.SearchCensys(word, limit)
search.process()
all_ip = search.get_ipaddresses()
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'censys')
db.store_all(word, all_ip, 'ip', 'censys')
elif engineitem == 'crtsh':
print('\033[94m[*] Searching CRT.sh. \033[0m')
search = crtsh.search_crtsh(word)
search.process()
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'CRTsh')
elif engineitem == 'cymon':
print('\033[94m[*] Searching Cymon. \033[0m')
from discovery import cymon
# Import locally or won't work.
search = cymon.search_cymon(word)
search.process()
all_ip = search.get_ipaddresses()
db = stash.stash_manager()
db.store_all(word, all_ip, 'ip', 'cymon')
elif engineitem == 'dogpile':
print('\033[94m[*] Searching Dogpile. \033[0m')
search = dogpilesearch.SearchDogpile(word, limit)
search.process()
emails = filter(search.get_emails())
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
all_emails.extend(emails)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'email', 'dogpile')
db.store_all(word, all_hosts, 'host', 'dogpile')
elif engineitem == 'duckduckgo':
print('\033[94m[*] Searching DuckDuckGo. \033[0m')
from discovery import duckduckgosearch
search = duckduckgosearch.SearchDuckDuckGo(word, limit)
search.process()
emails = filter(search.get_emails())
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
all_emails.extend(emails)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'email', 'duckduckgo')
db.store_all(word, all_hosts, 'host', 'duckduckgo')
elif engineitem == 'google':
print('\033[94m[*] Searching Google. \033[0m')
search = googlesearch.search_google(word, limit, start)
search.process(google_dorking)
emails = filter(search.get_emails())
all_emails.extend(emails)
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'google')
db.store_all(word, all_emails, 'email', 'google')
elif engineitem == 'googleCSE':
print('\033[94m[*] Searching Google Custom Search. \033[0m')
try:
search = googleCSE.SearchGoogleCSE(word, limit, start)
search.process()
search.store_results()
all_emails = filter(search.get_emails())
db = stash.stash_manager()
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db.store_all(word, all_hosts, 'email', 'googleCSE')
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
db = stash.stash_manager()
<<<<<<< HEAD
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db.store_all(word, all_hosts, 'email', 'googleCSE')
@@ -203,6 +538,66 @@ def start():
except Exception as e:
if isinstance(e, MissingKey):
print(e)
||||||| merged common ancestors
db.store_all(word, all_hosts, 'email', 'duckduckgo')
db.store_all(word, all_hosts, 'host', 'duckduckgo')
elif engineitem == 'google':
print('\033[94m[*] Searching Google. \033[0m')
search = googlesearch.search_google(word, limit, start)
search.process(google_dorking)
emails = filter(search.get_emails())
all_emails.extend(emails)
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'google')
db.store_all(word, all_emails, 'email', 'google')
elif engineitem == 'googleCSE':
print('\033[94m[*] Searching Google Custom Search. \033[0m')
try:
search = googleCSE.SearchGoogleCSE(word, limit, start)
search.process()
search.store_results()
all_emails = filter(search.get_emails())
db = stash.stash_manager()
hosts = filter(search.get_hostnames())
all_hosts.extend(hosts)
db.store_all(word, all_hosts, 'email', 'googleCSE')
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'googleCSE')
except Exception as e:
if isinstance(e, MissingKey):
print(e)
else:
pass
elif engineitem == 'google-certificates':
print('\033[94m[*] Searching Google Certificate transparency report. \033[0m')
search = googlecertificates.SearchGoogleCertificates(word, limit, start)
search.process()
hosts = filter(search.get_domains())
all_hosts.extend(hosts)
db = stash.stash_manager()
db.store_all(word, all_hosts, 'host', 'google-certificates')
elif engineitem == 'google-profiles':
print('\033[94m[*] Searching Google profiles. \033[0m')
search = googlesearch.search_google(word, limit, start)
search.process_profiles()
people = search.get_profiles()
db = stash.stash_manager()
db.store_all(word, people, 'name', 'google-profile')
if len(people) == 0:
print('\n[*] No users found.\n\n')
=======
db.store_all(word, all_hosts, 'host', 'googleCSE')
except Exception as e:
if isinstance(e, MissingKey):
print(e)
>>>>>>> 0d7b8a09ef12196954ed9f21fb8339335e940948
else:
pass
@@ -857,7 +1252,7 @@ def start():
HTMLcode = generator.beginhtml()
HTMLcode += generator.generatelatestscanresults(latestscanresults)
HTMLcode += generator.generatepreviousscanresults(previousscanresults)
graph = reportgraph.graphgenerator(word)
graph = reportgraph.GraphGenerator(word)
HTMLcode += graph.drawlatestscangraph(word, latestscanchartdata)
HTMLcode += graph.drawscattergraphscanhistory(word, scanhistorydomain)
HTMLcode += generator.generatepluginscanstatistics(pluginscanstatistics)
+19
View File
@@ -0,0 +1,19 @@
ad
as
bz
cc
cd
co
dj
fm
io
la
me
ms
nu
sc
sr
su
tv
tk
ws