@@ -65,7 +65,7 @@ def __init__(self, net_iface, skip_monitor_mode_setup, kill_networkmanager, bssi
65
65
66
66
self ._custom_bssid_name : Union [str , None ] = self .parse_custom_bssid_name (bssid_name )
67
67
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
69
69
70
70
@staticmethod
71
71
def parse_custom_bssid_name (bssid_name : Union [None , str ]) -> Union [None , str ]:
@@ -123,16 +123,16 @@ def _ap_sniff_cb(self, pkt):
123
123
if pkt .haslayer (Dot11Beacon ) or pkt .haslayer (Dot11ProbeResp ):
124
124
ap_mac = str (pkt .addr3 )
125
125
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 ()
127
127
and ssid != self ._custom_bssid_name ):
128
128
return
129
129
pkt_ch = frequency_to_channel (pkt [RadioTap ].Channel )
130
130
band_type = BandType .T_50GHZ if pkt_ch > 14 else BandType .T_24GHZ
131
131
if ssid not in self ._all_ssids [band_type ]:
132
132
self ._all_ssids [band_type ][ssid ] = SSID (ssid , ap_mac , band_type )
133
133
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
136
136
else :
137
137
self ._clients_sniff_cb (pkt ) # pass forward to find potential clients
138
138
except KeyboardInterrupt :
@@ -143,14 +143,14 @@ def _ap_sniff_cb(self, pkt):
143
143
def _scan_channels_for_aps (self ):
144
144
channels_to_scan = self ._custom_bssid_channels or self ._channel_range
145
145
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 } " )
148
148
149
149
try :
150
150
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
154
154
return
155
155
self ._set_channel (ch_num )
156
156
print_info (f"Scanning channel { self ._current_channel_num } (left -> "
@@ -169,7 +169,7 @@ def _found_custom_bssid_name(self):
169
169
return True
170
170
return False
171
171
172
- def _custom_bbsid_name_is_set (self ):
172
+ def _custom_bssid_name_is_set (self ):
173
173
return self ._custom_bssid_name is not None
174
174
175
175
def _start_initial_ap_scan (self ) -> SSID :
@@ -297,7 +297,7 @@ def user_abort(*args):
297
297
print_error (f"User asked to stop, quitting..." )
298
298
exit (0 )
299
299
300
- # todo custom bbsid name - document "\" espa
300
+ # todo custom bssid name - document "\" espa
301
301
if __name__ == "__main__" :
302
302
signal .signal (signal .SIGINT , Interceptor .user_abort )
303
303
@@ -322,8 +322,8 @@ def user_abort(*args):
322
322
default = False , dest = "skip_monitormode" , required = False )
323
323
parser .add_argument ('-k' , '--kill' , help = 'kill NetworkManager (might interfere with the process)' ,
324
324
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 )
327
327
parser .add_argument ('-c' , '--channels' , help = 'custom channels to scan, separated by a comma (i.e -> 1,3,4)' ,
328
328
metavar = "ch1,ch2" , action = 'store' , default = None , dest = "custom_channels" , required = False )
329
329
pargs = parser .parse_args ()
@@ -332,6 +332,6 @@ def user_abort(*args):
332
332
attacker = Interceptor (net_iface = pargs .net_iface ,
333
333
skip_monitor_mode_setup = pargs .skip_monitormode ,
334
334
kill_networkmanager = pargs .kill_networkmanager ,
335
- bssid_name = pargs .custom_bbsid ,
335
+ bssid_name = pargs .custom_bssid ,
336
336
custom_channels = pargs .custom_channels )
337
337
attacker .run ()
0 commit comments