Skip to content

Commit 87e8b73

Browse files
committed
fix name
1 parent 642052a commit 87e8b73

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

wifi-deauth.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager, bssi
6565

6666
self._custom_bssid_name: Union[str, None] = self.parse_custom_bssid_name(bssid_name)
6767
self._custom_bssid_channels: List[int] = self.parse_custom_channels(custom_channels)
68-
self._custom_bbsid_last_ch = 0 # to avoid overlapping
68+
self._custom_bssid_last_ch = 0 # to avoid overlapping
6969

7070
@staticmethod
7171
def parse_custom_bssid_name(bssid_name: Union[None, str]) -> Union[None, str]:
@@ -123,16 +123,16 @@ def _ap_sniff_cb(self, pkt):
123123
if pkt.haslayer(Dot11Beacon) or pkt.haslayer(Dot11ProbeResp):
124124
ap_mac = str(pkt.addr3)
125125
ssid = pkt[Dot11Elt].info.strip(b'\x00').decode('utf-8').strip() or ap_mac
126-
if ap_mac == BD_MACADDR or not ssid or (self._custom_bbsid_name_is_set()
126+
if ap_mac == BD_MACADDR or not ssid or (self._custom_bssid_name_is_set()
127127
and ssid != self._custom_bssid_name):
128128
return
129129
pkt_ch = frequency_to_channel(pkt[RadioTap].Channel)
130130
band_type = BandType.T_50GHZ if pkt_ch > 14 else BandType.T_24GHZ
131131
if ssid not in self._all_ssids[band_type]:
132132
self._all_ssids[band_type][ssid] = SSID(ssid, ap_mac, band_type)
133133
self._all_ssids[band_type][ssid].add_channel(pkt_ch if pkt_ch in self._channel_range else self._current_channel_num)
134-
if self._custom_bbsid_name_is_set():
135-
self._custom_bbsid_last_ch = self._all_ssids[band_type][ssid].channel
134+
if self._custom_bssid_name_is_set():
135+
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
138138
except KeyboardInterrupt:
@@ -143,14 +143,14 @@ def _ap_sniff_cb(self, pkt):
143143
def _scan_channels_for_aps(self):
144144
channels_to_scan = self._custom_bssid_channels or self._channel_range
145145
print_info(f"Starting AP scan, please wait... ({len(channels_to_scan)} channels total)")
146-
if self._custom_bbsid_name_is_set():
147-
print_info(f"Scanning for target BBSID -> {self._custom_bssid_name}")
146+
if self._custom_bssid_name_is_set():
147+
print_info(f"Scanning for target BSSID -> {self._custom_bssid_name}")
148148

149149
try:
150150
for idx, ch_num in enumerate(channels_to_scan):
151-
if self._custom_bbsid_name_is_set() and self._found_custom_bssid_name() \
152-
and self._current_channel_num - self._custom_bbsid_last_ch > 2:
153-
# make sure sniffing doesn't stop on an overlapped channel for custom BBSIDs
151+
if self._custom_bssid_name_is_set() and self._found_custom_bssid_name() \
152+
and self._current_channel_num - self._custom_bssid_last_ch > 2:
153+
# make sure sniffing doesn't stop on an overlapped channel for custom BSSIDs
154154
return
155155
self._set_channel(ch_num)
156156
print_info(f"Scanning channel {self._current_channel_num} (left -> "
@@ -169,7 +169,7 @@ def _found_custom_bssid_name(self):
169169
return True
170170
return False
171171

172-
def _custom_bbsid_name_is_set(self):
172+
def _custom_bssid_name_is_set(self):
173173
return self._custom_bssid_name is not None
174174

175175
def _start_initial_ap_scan(self) -> SSID:
@@ -297,7 +297,7 @@ def user_abort(*args):
297297
print_error(f"User asked to stop, quitting...")
298298
exit(0)
299299

300-
# todo custom bbsid name - document "\" espa
300+
# todo custom bssid name - document "\" espa
301301
if __name__ == "__main__":
302302
signal.signal(signal.SIGINT, Interceptor.user_abort)
303303

@@ -322,8 +322,8 @@ def user_abort(*args):
322322
default=False, dest="skip_monitormode", required=False)
323323
parser.add_argument('-k', '--kill', help='kill NetworkManager (might interfere with the process)',
324324
action='store_true', default=False, dest="kill_networkmanager", required=False)
325-
parser.add_argument('-b', '--bbsid', help='custom BBSID name (case-sensitive)', metavar="bssid_name",
326-
action='store', default=None, dest="custom_bbsid", required=False)
325+
parser.add_argument('-b', '--bssid', help='custom BSSID name (case-sensitive)', metavar="bssid_name",
326+
action='store', default=None, dest="custom_bssid", required=False)
327327
parser.add_argument('-c', '--channels', help='custom channels to scan, separated by a comma (i.e -> 1,3,4)',
328328
metavar="ch1,ch2", action='store', default=None, dest="custom_channels", required=False)
329329
pargs = parser.parse_args()
@@ -332,6 +332,6 @@ def user_abort(*args):
332332
attacker = Interceptor(net_iface=pargs.net_iface,
333333
skip_monitor_mode_setup=pargs.skip_monitormode,
334334
kill_networkmanager=pargs.kill_networkmanager,
335-
bssid_name=pargs.custom_bbsid,
335+
bssid_name=pargs.custom_bssid,
336336
custom_channels=pargs.custom_channels)
337337
attacker.run()

0 commit comments

Comments
 (0)