Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions projects/saved_WIFI_password_generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# List out saved WIFI passwords

This script allows one to list out the passwords of all the WIFI networks to which the device had been connected to.

# Usage

Run `python wifi-passwords.py` in the command line after setting the project directory.

# Author name
[Ayush Paine](https://github.com/ayushpaine)
12 changes: 12 additions & 0 deletions projects/saved_WIFI_password_generator/wifi-passwords.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import subprocess

data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n')
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]
for i in profiles:
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split('\n')
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
try:
print ("{:<30}| {:<}".format(i, results[0]))
except IndexError:
print ("{:<30}| {:<}".format(i, ""))
input("")