Re: How to grab Wifi passwords with only 2 commands
So to wrap it up since i uploaded multiple script versions here that you could use:
For Linux Distros using NetworkManager (Ubuntu, Debian etc.)
Run as .py or .txt file (lol)
For Windows Users (Win 7, 10, 11)
Compiled as .exe:
Release wifiPassword.ps1 compiled to .exe * vlc3n/FuckUrBatch * GitHub
So to wrap it up since i uploaded multiple script versions here that you could use:
For Linux Distros using NetworkManager (Ubuntu, Debian etc.)
Run as .py or .txt file (lol)
Code:
import subprocess try: # Get a list of active Wi-Fi connections wifi_profiles_info = subprocess.check_output(['nmcli', '-t', '-f', 'NAME', 'connection', 'show', '--active']).decode('utf-8') wifi_profiles = wifi_profiles_info.strip().split('\n') if wifi_profiles: print("Available Wi-Fi networks:") for index, profile in enumerate(wifi_profiles, start=1): print(f"{index}. {profile}") selection = int(input("Select a Wi-Fi network (enter the number): ")) - 1 selected_profile = wifi_profiles[selection] wifi_password_info = subprocess.check_output(['nmcli', '-s', '-g', '802-11-wireless-security.psk', 'connection', 'show', selected_profile]).decode('utf-8') wifi_password = wifi_password_info.strip() print(f"Wi-Fi network: {selected_profile}") print(f"Password: {wifi_password}") else: print("No Wi-Fi networks found.") except (ValueError, IndexError): print("Invalid selection or no Wi-Fi network selected.")
Code:
$wifiProfiles = netsh wlan show profiles | Select-String "All User Profile" | ForEach-Object { $_ -replace "All User Profile\s+:\s+" } $selectedProfile = $wifiProfiles | Out-GridView -Title "Select a Wi-Fi network" -OutputMode Single if ($selectedProfile) { $wifiPassword = (netsh wlan show profile name="$selectedProfile" key=clear | Select-String "Key Content").ToString() -replace "Key Content\s+:\s+" Write-Host "Wi-Fi network: $selectedProfile" Write-Host "Password: $wifiPassword" } else { Write-Host "No Wi-Fi network selected." }
Release wifiPassword.ps1 compiled to .exe * vlc3n/FuckUrBatch * GitHub
Comment