Skip to content

Commit 01cea2f

Browse files
committed
Bug Fix
1 parent 09720c0 commit 01cea2f

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

Bluto/bluto

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ from modules.output import action_output_vuln_zone, action_output_wild_false, ac
3333
from modules.data_mine import doc_start
3434
from modules.bluto_logging import info
3535

36-
VERSION = "2.3.9"
36+
VERSION = "2.3.10"
3737

3838
prox = False
3939

@@ -73,9 +73,9 @@ print """
7373
if __name__ == "__main__":
7474
info('\nBluto Started')
7575
try:
76-
parser = argparse.ArgumentParser(description='Use: -e for lots of spinach | Use: -api for emailhunter_support')
76+
parser = argparse.ArgumentParser(description='Use: -e for lots of spinach (much larger sublist) | Use: -api for emailhunter_support')
7777
parser.add_argument('-e', help='Used for brute forcing with a very large list of SubDomains', required=False, action='store_true')
78-
parser.add_argument('-t', type=int, help='Used to set the timeout, in seconds.', required=False)
78+
parser.add_argument('-t', type=int, help='Used to set the timeout, in seconds', required=False)
7979
parser.add_argument('-d', help='Used for setting the target domain', required=False)
8080
parser.add_argument('-api', help='Supply your free Email Hunter API key to gather even more email addresses', required=False)
8181
args = vars(parser.parse_args())
@@ -147,6 +147,8 @@ if __name__ == "__main__":
147147
t4 = threading.Thread(target=action_emailHunter, args=(domain, api, user_agents, q4, prox)) #Takes domain[str], api[list], user_agents[list] #Returns email,url [list[tuples]] Queue[object], prox[str]
148148
t4.start()
149149
t4.join()
150+
else:
151+
print colored('\nDon\'t forget you can increase your identified email count significantly with a free Hunter API key.\nhttps://hunter.io/api_keys', 'green')
150152
t1.start()
151153
t1.join()
152154
t2.start()
@@ -202,6 +204,8 @@ if __name__ == "__main__":
202204
t4 = threading.Thread(target=action_emailHunter, args=(domain, api, user_agents, q4, prox)) #Takes domain[str], api[list], user_agents[list] #Returns email,url [list[tuples]] Queue[object], prox[str]
203205
t4.start()
204206
t4.join()
207+
else:
208+
print colored('\nDon\'t forget you can increase your identified email count significantly with a free Hunter API key.\nhttps://hunter.io/api_keys', 'green')
205209
t1.start()
206210
t1.join()
207211
t2.start()
@@ -256,6 +260,8 @@ if __name__ == "__main__":
256260
t4 = threading.Thread(target=action_emailHunter, args=(domain, api, user_agents, q4, prox)) #Takes domain[str], api[list], user_agents[list] #Returns email,url [list[tuples]] Queue[object], prox[str]
257261
t4.start()
258262
t4.join()
263+
else:
264+
print colored('\nDon\'t forget you can increase your identified email count significantly with a free Hunter API key.\nhttps://hunter.io/api_keys', 'green')
259265
t1.start()
260266
t1.join()
261267
t2.start()

Bluto/modules/search.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,23 +146,32 @@ def action_emailHunter(domain, api, user_agents, q, prox):
146146
else:
147147
response = requests.get(link, headers=headers)
148148
if response.status_code == 200:
149+
for value in json_data['emails']:
150+
for domain in value['sources']:
151+
url = str(domain['uri']).replace("u'","")
152+
email = str(value['value']).replace("u'","")
153+
emails.append((email,url))
154+
elif response.status_code == 401:
149155
json_data = response.json()
150156
if json_data['message'] =='Too many calls for this period.':
151-
print colored("\tError:\tIt seems the EmailHunter API key being used has reached\n\t\tit's limit for this month.", 'red')
157+
print colored("\tError:\tIt seems the Hunter API key being used has reached\n\t\tit's limit for this month.", 'red')
152158
print colored('\tAPI Key: {}\n'.format(api),'red')
153159
q.put(None)
154160
return None
161+
if json_data['message'] == 'Invalid or missing api key.':
162+
print colored("\tError:\tIt seems the Hunter API key being used is no longer valid,\nit was probably deleted.", 'red')
163+
print colored('\tAPI Key: {}\n'.format(api),'red')
164+
print colored('\tWhy don\'t you grab yourself a new one (they are free)','green')
165+
print colored('\thttps://hunter.io/api_keys','green')
166+
q.put(None)
167+
return None
155168
else:
156169
raise ValueError('No Response From Hunter')
157170

158171
except KeyError:
159-
for value in json_data['emails']:
160-
for domain in value['sources']:
161-
url = str(domain['uri']).replace("u'","")
162-
email = str(value['value']).replace("u'","")
163-
emails.append((email,url))
172+
pass
164173
except ValueError:
165-
traceback.print_exc()
174+
info(traceback.print_exc())
166175
pass
167176
except Exception:
168177
traceback.print_exc()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='Bluto',
5-
version='2.3.9',
5+
version='2.3.10',
66
author='Darryl lane',
77
author_email='[email protected]',
88
url='https://github.com/darryllane/Bluto',

0 commit comments

Comments
 (0)