mirror of
https://github.com/laramies/theHarvester.git
synced 2025-02-24 22:42:56 +08:00
Made boolean to be an arguement instead of necessary in class as only used in one spot which is inside function.
This commit is contained in:
parent
ebf4961363
commit
6e55a63c40
2 changed files with 10 additions and 11 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
class search_google:
|
||||
|
||||
def __init__(self, word, limit, start, google_dorking):
|
||||
def __init__(self, word, limit, start):
|
||||
self.word = word
|
||||
self.results = ""
|
||||
self.totalresults = ""
|
||||
|
@ -28,7 +28,6 @@ def __init__(self, word, limit, start, google_dorking):
|
|||
self.quantity = "100"
|
||||
self.limit = limit
|
||||
self.counter = start
|
||||
self.google_dorking = google_dorking
|
||||
|
||||
def do_search(self):
|
||||
try: #do normal scraping
|
||||
|
@ -72,8 +71,8 @@ def get_profiles(self):
|
|||
rawres = myparser.parser(self.totalresults, self.word)
|
||||
return rawres.profiles()
|
||||
|
||||
def process(self):
|
||||
if self.google_dorking == False:
|
||||
def process(self,google_dorking):
|
||||
if google_dorking == False:
|
||||
while self.counter <= self.limit and self.counter <= 1000:
|
||||
self.do_search()
|
||||
#more = self.check_next()
|
||||
|
|
|
@ -128,8 +128,8 @@ def start(argv):
|
|||
for engineitem in engines:
|
||||
if engineitem == "google":
|
||||
print "[-] Searching in Google:"
|
||||
search = googlesearch.search_google(word, limit, start,google_dorking)
|
||||
search.process()
|
||||
search = googlesearch.search_google(word, limit, start)
|
||||
search.process(google_dorking)
|
||||
all_emails = search.get_emails()
|
||||
all_hosts = search.get_hostnames()
|
||||
for x in all_hosts:
|
||||
|
@ -267,7 +267,7 @@ def start(argv):
|
|||
|
||||
elif engineitem == "google-profiles":
|
||||
print "[-] Searching in Google profiles.."
|
||||
search = googlesearch.search_google(word, limit, start, google_dorking)
|
||||
search = googlesearch.search_google(word, limit, start)
|
||||
search.process_profiles()
|
||||
people = search.get_profiles()
|
||||
print "Users from Google profiles:"
|
||||
|
@ -282,8 +282,8 @@ def start(argv):
|
|||
all_hosts = []
|
||||
|
||||
print "[-] Searching in Google.."
|
||||
search = googlesearch.search_google(word, limit, start, google_dorking)
|
||||
search.process()
|
||||
search = googlesearch.search_google(word, limit, start)
|
||||
search.process(google_dorking)
|
||||
emails = search.get_emails()
|
||||
hosts = search.get_hostnames()
|
||||
all_emails.extend(emails)
|
||||
|
@ -533,8 +533,8 @@ def start(argv):
|
|||
if recursion:
|
||||
start = 0
|
||||
for word in vhost:
|
||||
search = googlesearch.search_google(word, limit, start, google_dorking)
|
||||
search.process()
|
||||
search = googlesearch.search_google(word, limit, start)
|
||||
search.process(google_dorking)
|
||||
emails = search.get_emails()
|
||||
hosts = search.get_hostnames()
|
||||
print emails
|
||||
|
|
Loading…
Reference in a new issue