Skip to content

Instantly share code, notes, and snippets.

@haroonabbasi
Created January 13, 2023 16:05
Show Gist options
  • Save haroonabbasi/0ff6b4276f3f1407ade6045f4db3f871 to your computer and use it in GitHub Desktop.
Save haroonabbasi/0ff6b4276f3f1407ade6045f4db3f871 to your computer and use it in GitHub Desktop.
Let's see wifi password using python
# https://dev.to/ashishpandey/lets-see-wifi-password-using-python-3kg3?utm_source=hackertab.dev&utm_medium=post&utm_campaign=home
import subprocess
network_name = "Get your own wifi" #your_wifi_network_name
result = subprocess.run(['netsh', 'wlan', 'show', 'profile', network_name, 'key=clear'], stdout=subprocess.PIPE)
output = result.stdout.decode()
for line in output.split('\n'):
if "Key Content" in line:
print(line.split(":")[1].strip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment