8484
8585args = vars (parser .parse_args ())
8686
87-
88- from io import StringIO
89- import sys
90-
91- class Capturing (list ):
92- def __enter__ (self ):
93- self ._stdout = sys .stdout
94- sys .stdout = self ._stringio = StringIO ()
95- return self
96- def __exit__ (self , * args ):
97- self .extend (self ._stringio .getvalue ().splitlines ())
98- del self ._stringio # free up some memory
99- sys .stdout = self ._stdout
100-
10187if args ['apicon' ]: # Runs the apicon program.
10288 while True :
10389 try :
10490 apicon .apicon ()
105- os . _exit (0 )
91+ sys . exit (0 )
10692 except Exception as error :
10793 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
108- os . _exit (0 )
94+ sys . exit (0 )
10995
11096if args ['pvpn' ]: # Runs the pvpn program.
11197 while True :
11298 try :
11399 pvpn .pvpn ()
114- os . _exit (0 )
100+ sys . exit (0 )
115101 except Exception as error :
116102 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
117- os . _exit (0 )
103+ sys . exit (0 )
118104
119105if args ['ovpn' ]:
120106 while True :
121107 try :
122108 ovpn .ovpn ()
123- os . _exit (0 )
109+ sys . exit (0 )
124110 except Exception as error :
125111 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
112+ sys .exit (0 )
126113
127114if args ['shodan' ]: # Runs the shodan program.
128115 while True :
129116 try :
130117 shodan .run_shodan ()
131- os . _exit (0 )
118+ sys . exit (0 )
132119 except Exception as error :
133120 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
134- os . _exit (0 )
121+ sys . exit (0 )
135122
136123if args ['numlook' ]: # Runs the numlook program.
137124 while True :
138125 try :
139126 numlook .numlook ()
140- os . _exit (0 )
127+ sys . exit (0 )
141128 except Exception as error :
142129 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
143- os . _exit (0 )
130+ sys . exit (0 )
144131
145132if args ['geolock' ]: # Runs the geolock program.
146133 while True :
147134 try :
148135 geolock .geolock ()
149- os . _exit (0 )
136+ sys . exit (0 )
150137 except Exception as error :
151138 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
152- os . _exit (0 )
139+ sys . exit (0 )
153140
154141if args ['mactrace' ]: # Runs the mactrace program.
155142 while True :
156143 try :
157144 mactrace .mactrace ()
158- os . _exit (0 )
145+ sys . exit (0 )
159146 except Exception as error :
160147 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
161- os . _exit (0 )
148+ sys . exit (0 )
162149
163150if args ['cryptotrace' ]: # Runs the cryptotrace program.
164151 while True :
165152 try :
166153 cryptotrace .cryptotrace ()
167- os . _exit (0 )
154+ sys . exit (0 )
168155 except Exception as error :
169156 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
170- os . _exit (0 )
157+ sys . exit (0 )
171158
172159if args ['vt' ]: # Runs the vt program.
173160 while True :
174161 try :
175162 vt .vt ()
176- os . _exit (0 )
163+ sys . exit (0 )
177164 except Exception as error :
178165 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
179- os . _exit (0 )
166+ sys . exit (0 )
180167
181168if args ['flightinfo' ]: # Runs the flightinfo program.
182169 while True :
183170 try :
184171 flightinfo .flightinfo ()
185- os . _exit (0 )
172+ sys . exit (0 )
186173 except Exception as error :
187174 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
188- os . _exit (0 )
175+ sys . exit (0 )
189176
190177if args ['wigle' ]: # Runs the wigle program.
191178 while True :
192179 try :
193180 wigle .wigle ()
194- os . _exit (0 )
181+ sys . exit (0 )
195182 except Exception as error :
196183 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
197- os . _exit (0 )
184+ sys . exit (0 )
198185
199186if args ['bankindex' ]: # Runs the bankindex program.
200187 while True :
201188 try :
202189 bankindex .bankindex ()
203- os . _exit (0 )
190+ sys . exit (0 )
204191 except Exception as error :
205192 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
206- os . _exit (0 )
193+ sys . exit (0 )
207194
208195if args ['exif' ]: # Runs the exif program.
209196 while True :
210197 try :
211198 exif .exif ()
212- os . _exit (0 )
199+ sys . exit (0 )
213200 except Exception as error :
214201 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
215- os . _exit (0 )
202+ sys . exit (0 )
216203
217204if args ['ytd' ]: # Runs the ytd program.
218205 while True :
219206 try :
220207 ytd .ytd ()
221- os . _exit (0 )
208+ sys . exit (0 )
222209 except Exception as error :
223210 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
224- os . _exit (0 )
211+ sys . exit (0 )
225212
226213if args ['falcon' ]: # Runs the falcon program.
227214 while True :
228215 try :
229216 falcon .falcon ()
230- os . _exit (0 )
217+ sys . exit (0 )
231218 except Exception as error :
232219 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
233- os . _exit (0 )
220+ sys . exit (0 )
234221
235222if args ['lokiencrypt' ]: # Runs the loki_encrypt program.
236223 while True :
237224 try :
238225 loki_encrypt .loki_encrypt ()
239- os . _exit (0 )
226+ sys . exit (0 )
240227 except Exception as error :
241228 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
242- os . _exit (0 )
229+ sys . exit (0 )
243230
244231if args ['lokidecrypt' ]: # Runs the loki_decrypt program.
245232 while True :
246233 try :
247234 loki_decrypt .loki_decrypt ()
248- os . _exit (0 )
235+ sys . exit (0 )
249236 except Exception as error :
250237 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
251- os . _exit (0 )
238+ sys . exit (0 )
252239
253240if args ['lokigen' ]: # Runs the loki_keygen program.
254241 while True :
255242 try :
256243 loki_keygen .loki_keygen ()
257- os . _exit (0 )
244+ sys . exit (0 )
258245 except Exception as error :
259246 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
260- os . _exit (0 )
247+ sys . exit (0 )
261248
262249if args ['lokiprobe' ]: # Runs the loki_discovery program.
263250 while True :
264251 try :
265252 loki_discovery .loki_discovery ()
266- os . _exit (0 )
253+ sys . exit (0 )
267254 except Exception as error :
268255 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
269- os . _exit (0 )
256+ sys . exit (0 )
270257
271258if args ['recpull' ]: # Runs the recpull program.
272259 while True :
273260 try :
274261 recpull .recpull ()
275- os . _exit (0 )
262+ sys . exit (0 )
276263 except Exception as error :
277264 print (f">_ { Fore .RED } FAILURE{ Fore .WHITE } : { error } \n " )
278- os . _exit (0 )
265+ sys . exit (0 )
279266
280267
281268if __name__ == '__main__' :
@@ -288,3 +275,4 @@ def __exit__(self, *args):
288275 sys .exit (0 )
289276 except SystemExit :
290277 os ._exit (0 )
278+
0 commit comments