WiFi Hacking with python
WiFi Hacking python code:
import subprocess
try:
profiles = [line.split(":")[1][1:-1] for line in subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors="backslashreplace").split('\n') if "All User Profile" in line]
print("{:<30}| {:<}".format("Wi-Fi Name", "Password"))
print("----------------------------------------------")
for profile in profiles:
try:
password = [line.split(":")[1][1:-1] for line in subprocess.check_output(['netsh', 'wlan', 'show', 'profile', profile, 'key=clear']).decode('utf-8', errors="backslashr eplace").split('\n') if "Key Content" in line][0]
print("{:<30}| {:<}".format(profile, password))
except IndexError:
print("{:<30}| {:<}".format(profile, ""))
except subprocess.CalledProcessError:
print("Encoding Error Occurred")
Comments
Post a Comment