Get wifi password of the network python
Disclaimer:- This code will be used only one computer and this is only for fun not to hear anyone
Copy all the code and paste it on python. 👇👇👇
def get_wifi_password():
try:
result = subprocess.run(['netsh', 'wlan', 'show', 'profile'], capture_output=True, text=True, check=True)
profiles = [line.split(":")[1].strip() for line in result.stdout.splitlines() if "All User Profile" in line]
for profile in profiles:
result = subprocess.run(['netsh', 'wlan', 'show', 'profile', profile, 'key=clear'], capture_output=True, text=True, check=True)
password_lines = [line.split(":")[1].strip() for line in result.stdout.splitlines() if "Key Content" in line]
if password_lines:
print(f"WiFi Network: {profile}")
print(f"Password: {password_lines[0]}")
print("-------------------------")
except subprocess.CalledProcessError:
print("Failed to retrieve WiFi passwords.")
get_wifi_password()
Post a Comment