mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-20 07:16:31 +08:00
Removed PGP source.
This commit is contained in:
parent
381b9f7aae
commit
a264ade32f
|
@ -6,7 +6,7 @@
|
|||
* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *
|
||||
* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *
|
||||
* *
|
||||
* theHarvester 3.0.6 v282 *
|
||||
* theHarvester 3.0.6 v284 *
|
||||
* Coded by Christian Martorella *
|
||||
* Edge-Security Research *
|
||||
* cmartorella@edge-security.com *
|
||||
|
@ -53,8 +53,6 @@ Passive:
|
|||
|
||||
* netcraft: Netcraft Data Mining
|
||||
|
||||
* pgp: PGP key server - mit.edu
|
||||
|
||||
* securityTrails: Security Trails search engine, the world's largest repository<br>
|
||||
of historical DNS data (Requires API key, see below.) - www.securitytrails.com
|
||||
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
'bingsearch',
|
||||
'censys',
|
||||
'crtsh',
|
||||
'dogpilesearch',
|
||||
'cymon',
|
||||
'dnssearch',
|
||||
'dogpilesearch',
|
||||
'duckduckgosearch',
|
||||
'exaleadsearch',
|
||||
'googleCSE',
|
||||
'googlecertificates',
|
||||
'googleCSE',
|
||||
'googlesearch',
|
||||
'huntersearch',
|
||||
'intelxsearch',
|
||||
'linkedinsearch',
|
||||
'netcraft',
|
||||
'pgpsearch',
|
||||
'port_scanner',
|
||||
'securitytrailssearch',
|
||||
'shodansearch',
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
from lib.core import *
|
||||
from parsers import myparser
|
||||
import requests
|
||||
|
||||
|
||||
class SearchPgp:
|
||||
|
||||
def __init__(self, word):
|
||||
self.word = word
|
||||
self.results = ""
|
||||
self.server = 'pgp.mit.edu'
|
||||
self.hostname = 'pgp.mit.edu'
|
||||
|
||||
def process(self):
|
||||
print('\tSearching results.')
|
||||
try:
|
||||
url = 'http://' + self.server + '/pks/lookup?search=' + self.word + '&op=index'
|
||||
headers = {
|
||||
'Host': self.hostname,
|
||||
'User-agent': Core.get_user_agent()
|
||||
}
|
||||
h = requests.get(url=url, headers=headers)
|
||||
self.results = h.text
|
||||
self.results += self.results
|
||||
except Exception as e:
|
||||
print('Unable to connect to PGP server: ', str(e))
|
||||
|
||||
def get_emails(self):
|
||||
rawres = myparser.Parser(self.results, self.word)
|
||||
return rawres.emails()
|
||||
|
||||
def get_hostnames(self):
|
||||
rawres = myparser.Parser(self.results, self.word)
|
||||
return rawres.hostnames()
|
|
@ -50,7 +50,7 @@ def banner():
|
|||
print("* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *")
|
||||
print("* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *")
|
||||
print('* *')
|
||||
print('* theHarvester 3.0.6 v282 *')
|
||||
print('* theHarvester 3.0.6 v284 *')
|
||||
print('* Coded by Christian Martorella *')
|
||||
print('* Edge-Security Research *')
|
||||
print('* cmartorella@edge-security.com *')
|
||||
|
@ -74,7 +74,6 @@ def get_supportedengines():
|
|||
'intelx',
|
||||
'linkedin',
|
||||
'netcraft',
|
||||
'pgp',
|
||||
'securityTrails',
|
||||
'threatcrowd',
|
||||
'trello',
|
||||
|
|
|
@ -49,7 +49,7 @@ def start():
|
|||
parser.add_argument('-b', '--source', help='''baidu, bing, bingapi, censys, crtsh, cymon,
|
||||
dogpile, duckduckgo, google, googleCSE,
|
||||
google-certificates, hunter, intelx,
|
||||
linkedin, netcraft, pgp, securityTrails, threatcrowd,
|
||||
linkedin, netcraft, securityTrails, threatcrowd,
|
||||
trello, twitter, vhost, virustotal, yahoo, all''')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -287,20 +287,6 @@ def start():
|
|||
db = stash.stash_manager()
|
||||
db.store_all(word, all_hosts, 'host', 'netcraft')
|
||||
|
||||
elif engineitem == 'pgp':
|
||||
print('\033[94m[*] Searching PGP key server. \033[0m')
|
||||
try:
|
||||
search = pgpsearch.SearchPgp(word)
|
||||
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', 'pgp')
|
||||
db.store_all(word, all_emails, 'email', 'pgp')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
elif engineitem == 'securityTrails':
|
||||
print('\033[94m[*] Searching SecurityTrails. \033[0m')
|
||||
from discovery import securitytrailssearch
|
||||
|
@ -556,23 +542,6 @@ def start():
|
|||
db = stash.stash_manager()
|
||||
db.store_all(word, all_hosts, 'host', 'netcraft')
|
||||
|
||||
print('\033[94m[*] Searching PGP key server. \033[0m')
|
||||
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('\033[94m[*] Searching SecurityTrails. \033[0m')
|
||||
from discovery import securitytrailssearch
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue