Fixed GoogleCSE

Fixed API message, and error while executing due to order of storing data.
This commit is contained in:
Laramies 2018-11-27 23:29:05 +01:00
parent b2b4b9e4cc
commit 590489fd5c
3 changed files with 17 additions and 3 deletions

View file

@ -21,4 +21,5 @@
"port_scanner",
"takeover",
"googlecertificates",
"googleCSE"]
"googleCSE",
"censys"]

View file

@ -18,6 +18,9 @@ def __init__(self, word, limit, start):
self.limit = limit
self.counter = 1
self.api_key = ""
if self.api_key == "":
print("You need an API key in order to use the Hunter search engine. You can get one here: https://cse.google.com")
sys.exit()
self.cse_id = ""
self.lowRange = start
self.highRange = start+100

View file

@ -126,7 +126,7 @@ def start(argv):
dnstld = True
elif opt == '-b':
engines = set(arg.split(','))
supportedengines = set(["baidu","bing","crtsh","bingapi","dogpile","google","googleCSE","virustotal","threatcrowd","googleplus","google-profiles",'google-certificates',"linkedin","pgp","twitter","vhost","yahoo","netcraft","hunter","all"])
supportedengines = set(["baidu","bing","crtsh","censys","bingapi","dogpile","google","googleCSE","virustotal","threatcrowd","googleplus","google-profiles",'google-certificates',"linkedin","pgp","twitter","vhost","yahoo","netcraft","hunter","all"])
if set(engines).issubset(supportedengines):
print("found supported engines")
print(("[-] Starting harvesting process for domain: " + word + "\n"))
@ -197,8 +197,8 @@ def start(argv):
search.store_results()
all_emails = search.get_emails()
db=stash.stash_manager()
db.store_all(word,all_hosts,'email','googleCSE')
all_hosts = search.get_hostnames()
db.store_all(word,all_hosts,'email','googleCSE')
db=stash.stash_manager()
db.store_all(word,all_hosts,'host','googleCSE')
@ -298,6 +298,16 @@ def start(argv):
all_emails = search.get_emails()
all_hosts = search.get_hostnames()
elif engineitem == "censys":
print("[-] Searching in Censys:")
from discovery import censys
#import locally or won't work
search = censys.search_censys(word)
search.process(5)
all_emails = []
all_hosts = search.get_hostnames()
elif engineitem == "all":
print(("Full harvest on " + word))
all_emails = []