2828__copyright__ = "Copyright (c) 2016 @maldevel"
2929__credits__ = ["maldevel" , "PaulSec" , "cclauss" , "Christian Martorella" ]
3030__license__ = "GPLv3"
31- __version__ = "1.3.1 "
31+ __version__ = "1.3.2 "
3232__maintainer__ = "maldevel"
3333
3434################################
@@ -93,6 +93,7 @@ def __init__(self, userAgent, proxy):
9393 self .proxy = proxy
9494 self .userAgent = userAgent
9595 self .parser = myparser ()
96+ self .activeEngine = "None"
9697 path = "plugins/"
9798 plugins = {}
9899
@@ -112,14 +113,15 @@ def get_plugins(self):
112113 def show_message (self , msg ):
113114 print (green (msg ))
114115
115- def init_search (self , url , word , limit , counterInit , counterStep ):
116+ def init_search (self , url , word , limit , counterInit , counterStep , engineName ):
116117 self .results = ""
117118 self .totalresults = ""
118119 self .limit = int (limit )
119120 self .counter = int (counterInit )
120121 self .url = url
121122 self .step = int (counterStep )
122123 self .word = word
124+ self .activeEngine = engineName
123125
124126 def do_search (self ):
125127 try :
@@ -143,11 +145,11 @@ def process(self):
143145 self .do_search ()
144146 time .sleep (1 )
145147 self .counter += self .step
146- print (" \t Searching " + str (self .counter ) + " results..." )
148+ print (green ( "[+] Searching in {}:" . format (self .activeEngine )) + cyan ( " {} results" . format ( str ( self . counter ))) )
147149
148150 def get_emails (self ):
149151 self .parser .extract (self .totalresults , self .word )
150- return self .parser .emails ()
152+ return self .parser .emails ()
151153
152154###################################################################
153155
@@ -160,6 +162,9 @@ def green(text):
160162def red (text ):
161163 return colored (text , 'red' , attrs = ['bold' ])
162164
165+ def cyan (text ):
166+ return colored (text , 'cyan' , attrs = ['bold' ])
167+
163168def unique (data ):
164169 return list (set (data ))
165170
@@ -230,14 +235,12 @@ def checkDomain(value):
230235
231236 if args .listplugins :
232237 path = "plugins/"
233- msg = "[+] Available plugins:"
234- print (green (msg ))
235- print (green ("-" * len (msg )))
238+ print (green ("[+] Available plugins" ))
236239 sys .path .insert (0 , path )
237240 for f in os .listdir (path ):
238241 fname , ext = os .path .splitext (f )
239242 if ext == '.py' :
240- print (fname )
243+ print (green ( "[+] Plugin: " ) + cyan ( fname ) )
241244 sys .exit (1 )
242245
243246 if not args .domain :
@@ -248,10 +251,10 @@ def checkDomain(value):
248251 userAgent = (args .uagent or
249252 "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1" )
250253
251- print (" User-Agent in use: {}" . format ( yellow ( userAgent ) ))
254+ print (green ( "[+] User-Agent in use: " ) + cyan ( userAgent ))
252255
253256 if args .proxy :
254- print (" Proxy server in use: {}" . format ( yellow ( args .proxy .scheme + "://" + args .proxy .netloc ) ))
257+ print (green ( "[+] Proxy server in use: " ) + cyan ( args .proxy .scheme + "://" + args .proxy .netloc ))
255258
256259 filename = args .filename or ""
257260 limit = args .limit
@@ -264,40 +267,38 @@ def checkDomain(value):
264267 if args .exclude :
265268 excluded = args .exclude .split (',' )
266269 if engine == "all" :
267- print (green ("[+] Searching everywhere.. " ))
270+ print (green ("[+] Searching everywhere" ))
268271 for search_engine in plugins :
269272 if search_engine not in excluded :
270273 all_emails += plugins [search_engine ]['search' ](domain , limit )
271274 elif engine not in plugins :
272- print (red ("Search engine plugin not found" ))
275+ print (red ("[-] Search engine plugin not found" ))
273276 sys .exit (3 )
274277 else :
275278 all_emails = plugins [engine ]['search' ](domain , limit )
276279 all_emails = unique (all_emails )
277280
278281 if not all_emails :
279- print (red ("\n No emails found! " ))
282+ print (red ("[-] No emails found" ))
280283 sys .exit (4 )
281284
282- msg = "\n \n [+] {} emails found:" .format (len (all_emails ))
283- print (green (msg ))
284- print (green ("-" * len (msg )))
285+ print (green ("[+] Emails found: " ) + cyan (len (all_emails )))
285286
286287 if not args .noprint :
287288 for emails in all_emails :
288289 print (emails )
289290
290291 if filename :
291292 try :
292- print (green ("\n [+] Saving files... " ))
293+ print (green ("[+] Saving results to files" ))
293294 with open (filename , 'w' ) as out_file :
294295 for email in all_emails :
295296 try :
296297 out_file .write (email + "\n " )
297298 except :
298- print (red ("Exception " + email ))
299+ print (red ("[-] Exception: " + email ))
299300 except Exception as e :
300- print (red ("Error saving TXT file: " + e ))
301+ print (red ("[-] Error saving TXT file: " + e ))
301302
302303 try :
303304 filename = filename .split ("." )[0 ] + ".xml"
@@ -306,7 +307,7 @@ def checkDomain(value):
306307 for email in all_emails :
307308 out_file .write ('<email>{}</email>' .format (email ))
308309 out_file .write ('</EmailHarvester>' )
309- print (green ("Files saved! " ))
310+ print (green ("[+] Files saved" ))
310311 except Exception as er :
311- print (red ("Error saving XML file: " + er ))
312+ print (red ("[-] Error saving XML file: " + er ))
312313
0 commit comments