@@ -135,8 +135,6 @@ def _ap_sniff_cb(self, pkt):
135
135
self ._custom_bssid_last_ch = self ._all_ssids [band_type ][ssid ].channel
136
136
else :
137
137
self ._clients_sniff_cb (pkt ) # pass forward to find potential clients
138
- except KeyboardInterrupt :
139
- self .user_abort ()
140
138
except Exception as exc :
141
139
pass
142
140
@@ -157,8 +155,6 @@ def _scan_channels_for_aps(self):
157
155
f"{ len (channels_to_scan ) - (idx + 1 )} )" , end = "\r " )
158
156
sniff (prn = self ._ap_sniff_cb , iface = self .interface , timeout = self ._channel_sniff_timeout ,
159
157
stop_filter = lambda p : Interceptor ._ABORT is True )
160
- except KeyboardInterrupt :
161
- self .user_abort ()
162
158
finally :
163
159
printf ("" )
164
160
@@ -274,20 +270,16 @@ def run(self):
274
270
t .start ()
275
271
276
272
printf (f"{ DELIM } \n " )
277
- try :
278
- start = get_time ()
279
- while not Interceptor ._ABORT :
280
- print_info (f"Target SSID{ self .target_ssid .name .rjust (80 - 15 , ' ' )} " )
281
- print_info (f"Channel{ str (ssid_ch ).rjust (80 - 11 , ' ' )} " )
282
- print_info (f"MAC addr{ self .target_ssid .mac_addr .rjust (80 - 12 , ' ' )} " )
283
- print_info (f"Net interface{ self .interface .rjust (80 - 17 , ' ' )} " )
284
- print_info (f"Confirmed clients{ BOLD } { str (len (self .target_ssid .clients )).rjust (80 - 21 , ' ' )} { RESET } " )
285
- print_info (f"Elapsed sec { BOLD } { str (get_time () - start ).rjust (80 - 16 , ' ' )} { RESET } " )
286
- sleep (self ._printf_res_intv )
287
- clear_line (7 )
288
- except KeyboardInterrupt :
289
- print ("" )
290
- self .user_abort ()
273
+ start = get_time ()
274
+ while not Interceptor ._ABORT :
275
+ print_info (f"Target SSID{ self .target_ssid .name .rjust (80 - 15 , ' ' )} " )
276
+ print_info (f"Channel{ str (ssid_ch ).rjust (80 - 11 , ' ' )} " )
277
+ print_info (f"MAC addr{ self .target_ssid .mac_addr .rjust (80 - 12 , ' ' )} " )
278
+ print_info (f"Net interface{ self .interface .rjust (80 - 17 , ' ' )} " )
279
+ print_info (f"Confirmed clients{ BOLD } { str (len (self .target_ssid .clients )).rjust (80 - 21 , ' ' )} { RESET } " )
280
+ print_info (f"Elapsed sec { BOLD } { str (get_time () - start ).rjust (80 - 16 , ' ' )} { RESET } " )
281
+ sleep (self ._printf_res_intv )
282
+ clear_line (7 )
291
283
292
284
@staticmethod
293
285
def user_abort (* args ):
0 commit comments