mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-23 08:46:32 +08:00
973220d3d1
Added Port scanning, Subdomain takeover, Fixed Shodan, improved Dns bruteforce and added SQLite support to store the results.
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
import string
|
|
import httplib
|
|
import sys
|
|
import myparser
|
|
|
|
|
|
class search_pgp:
|
|
|
|
def __init__(self, word):
|
|
self.word = word
|
|
self.results = ""
|
|
#self.server = "pgp.mit.edu"
|
|
self.server = "pgp.rediris.es"
|
|
self.hostname = "pgp.rediris.es"
|
|
self.userAgent = "(Mozilla/5.0 (Windows; U; Windows NT 6.0;en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6"
|
|
|
|
def process(self):
|
|
print "\tSearching PGP results..."
|
|
try:
|
|
|
|
h = httplib.HTTP(self.server)
|
|
h.putrequest('GET', "/pks/lookup?search=" + self.word + "&op=index")
|
|
h.putheader('Host', self.hostname)
|
|
h.putheader('User-agent', self.userAgent)
|
|
h.endheaders()
|
|
returncode, returnmsg, headers = h.getreply()
|
|
self.results = h.getfile().read()
|
|
except Exception, e:
|
|
pass
|
|
|
|
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()
|