You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have done small correction on David Bombal's script ( to fetch all the adapters [ if they available] not only the first adapter e.g wlan0 ) below is the correction :
I have done small correction on David Bombal's script ( to fetch all the adapters [ if they available] not only the first adapter e.g wlan0 ) below is the correction :
pattern = r'^wlan[0-9]+'
check_wifi_result = subprocess.run(["iwconfig"], capture_output=True).stdout.decode()
wifi_adapters = re.findall(pattern,check_wifi_result,re.MULTILINE)
if len(wifi_adapters) == 0:
print("Please connect a WiFi adapter and try again.")
exit()
print("The following WiFi interfaces are available:")
for index, item in enumerate(wifi_adapters):
print(f"{index} - {item}")
The text was updated successfully, but these errors were encountered: