mirror of
https://github.com/laramies/theHarvester.git
synced 2025-02-24 14:32:57 +08:00
Small misc. change to google dorking and wrapped dogpile when doing -b all in try except.
This commit is contained in:
parent
77d95332a8
commit
ccb7f7edba
2 changed files with 13 additions and 11 deletions
|
@ -133,11 +133,10 @@ def send_dorks(self): # Helper function to minimize code reusability.
|
|||
# Get random user agent to try and prevent google from blocking IP.
|
||||
for num in range(len(self.links)):
|
||||
try:
|
||||
if num % 10 == 0:
|
||||
if num % 10 == 0 and num > 0:
|
||||
print(f'\tSearching through {num} results')
|
||||
link = self.links[num]
|
||||
req = requests.get(link, headers=headers)
|
||||
print(req.text)
|
||||
self.results = req.text
|
||||
if search(self.results):
|
||||
time.sleep(getDelay() * 5) # Sleep for a longer time.
|
||||
|
|
|
@ -427,15 +427,18 @@ def start():
|
|||
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')
|
||||
try:
|
||||
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')
|
||||
except Exception as e:
|
||||
print(f'An exception has occurred in Dogpile: {e}')
|
||||
|
||||
print('\033[94m[*] Searching DuckDuckGo. \033[0m')
|
||||
from discovery import duckduckgosearch
|
||||
|
|
Loading…
Reference in a new issue