Skip to content

Commit 3806350

Browse files
committed
remove keyb interrupt
1 parent 87e8b73 commit 3806350

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

wifi-deauth.py

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ def _ap_sniff_cb(self, pkt):
135135
self._custom_bssid_last_ch = self._all_ssids[band_type][ssid].channel
136136
else:
137137
self._clients_sniff_cb(pkt) # pass forward to find potential clients
138-
except KeyboardInterrupt:
139-
self.user_abort()
140138
except Exception as exc:
141139
pass
142140

@@ -157,8 +155,6 @@ def _scan_channels_for_aps(self):
157155
f"{len(channels_to_scan) - (idx + 1)})", end="\r")
158156
sniff(prn=self._ap_sniff_cb, iface=self.interface, timeout=self._channel_sniff_timeout,
159157
stop_filter=lambda p: Interceptor._ABORT is True)
160-
except KeyboardInterrupt:
161-
self.user_abort()
162158
finally:
163159
printf("")
164160

@@ -274,20 +270,16 @@ def run(self):
274270
t.start()
275271

276272
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)
291283

292284
@staticmethod
293285
def user_abort(*args):

0 commit comments

Comments
 (0)