11import os
22import sys
3- # import threading
43
54import lib .settings
65import lib .output
109import api_calls .censys
1110
1211
13- stop_animation = False
14-
15-
1612class AutoSploitTerminal (object ):
1713
1814 """
@@ -109,16 +105,14 @@ def gather_hosts(self, query, given_choice=None):
109105
110106 option 2 must be provided
111107 """
112- global stop_animation
113-
114108 choice_dict = {
115109 1 : api_calls .shodan .ShodanAPIHook ,
116110 2 : api_calls .zoomeye .ZoomEyeAPIHook ,
117111 3 : api_calls .censys .CensysAPIHook
118112 }
119113 searching = False
120114 if given_choice is None :
121- lib .output .info ("please choose an API to gather from (choosing two "
115+ lib .output .info ("please choose an API to gather from (choosing two or more "
122116 "separate by comma IE; 1,2)" )
123117 for i , api in enumerate (lib .settings .API_URLS .keys (), start = 1 ):
124118 print ("{}. {}" .format (i , api .title ()))
@@ -128,23 +122,14 @@ def gather_hosts(self, query, given_choice=None):
128122 while not searching :
129123 try :
130124 choice = int (choice )
131- # t = threading.Thread(
132- # target=lib.settings.animation,
133- # args=("performing lookup for provided query '{}'".format(query),)
134- # )
135- # t.daemon = True
136- # t.start()
137125 if choice == 1 :
138126 choice_dict [choice ](self .tokens ["shodan" ][0 ], query ).shodan ()
139- # stop_animation = True
140127 break
141128 elif choice == 2 :
142129 choice_dict [choice ](query ).zoomeye ()
143- # stop_animation = True
144130 break
145131 elif choice == 3 :
146132 choice_dict [choice ](self .tokens ["censys" ][1 ], self .tokens ["censys" ][0 ], query ).censys ()
147- # stop_animation = True
148133 break
149134 else :
150135 lib .output .warning ("invalid option provided" )
0 commit comments