Created
January 13, 2023 16:05
-
-
Save haroonabbasi/0ff6b4276f3f1407ade6045f4db3f871 to your computer and use it in GitHub Desktop.
Let's see wifi password using python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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