fork download
  1. import subprocess
  2. from unittest import result
  3.  
  4.  
  5. def wifisasuke(NET, WAN, SHW, PRS):
  6. data = subprocess.check_output([NET, WAN, SHW, PRS]).decode('utf-8', errors="backslashreplace").split('\n')
  7. profile = [wifi.split(":")[1][1:-1] for wifi in data if "All User Profile" in wifi]
  8.  
  9. for send in profile:
  10. results = subprocess.check_output([NET, WAN, SHW, PRS, send, 'key=clear']).decode('utf-8', errors="backslashreplace").split('\n')
  11. results = [wifi_pass.split(":")[1][1:-1] for wifi_pass in results if "Key Content" in wifi_pass]
  12. try:
  13. print("{:<3} : {:<}".format(send, results[0]))
  14. except IndexError:
  15. print("{:<3} : {:<}".format(wifi_pass, "None"))
  16.  
  17. SHOW = wifisasuke('netsh', 'wlan', 'show', 'profiles')
  18.  
  19.  
  20. ----------------------------------------------------------------------------
  21.  
  22. import subprocess , os
  23. os.system('cls' if os.name=='nt' else 'clear')
  24. print('\n'1)
  25.  
  26. data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n')
  27. profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]
  28. print('--------------------+-------------------------+')
  29. print("\033[33m{:<20}\033[0m|| \033[33m{:<}\033[0m{:>16}".format("Wi-Fi Name", "Password","|"))
  30. print('====================+=========================+')
  31. for i in profiles:
  32. try:
  33. results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split('\n')
  34. results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
  35. try:
  36. print ("\033[94m{:<20}\033[0m| \033[92m{:<}\033[0m {:>13}".format(i, results[0],"|"))
  37. print('--------------------+-------------------------+')
  38. except IndexError:
  39. print ("\033[94m{:<20}\033[0m| \033[92m{:<}\033[0m".format(i, ""))
  40. except subprocess.CalledProcessError:
  41. print ("\033[94m{:<30}\033[0m| \033[92m{:<}\033[0m".format(i, "ENCODING ERROR"))
  42.  
  43. print('\n'1)
  44. input("Enter to close program >")
Success #stdin #stdout 0.03s 25996KB
stdin
Standard input is empty
stdout
import subprocess
from unittest import result


def wifisasuke(NET, WAN, SHW, PRS):
data = subprocess.check_output([NET, WAN, SHW, PRS]).decode('utf-8', errors="backslashreplace").split('\n')
profile = [wifi.split(":")[1][1:-1] for wifi in data if "All User Profile" in wifi]

for send in profile:
results = subprocess.check_output([NET, WAN, SHW, PRS, send, 'key=clear']).decode('utf-8', errors="backslashreplace").split('\n')
results = [wifi_pass.split(":")[1][1:-1] for wifi_pass in results if "Key Content" in wifi_pass]
try:
print("{:<3} : {:<}".format(send, results[0]))
except IndexError:
print("{:<3} : {:<}".format(wifi_pass, "None"))

SHOW = wifisasuke('netsh', 'wlan', 'show', 'profiles') 


----------------------------------------------------------------------------

import subprocess , os
os.system('cls' if os.name=='nt' else 'clear')
print('\n'1)

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]
print('--------------------+-------------------------+')
print("\033[33m{:<20}\033[0m|| \033[33m{:<}\033[0m{:>16}".format("Wi-Fi Name", "Password","|"))
print('====================+=========================+')
for i in profiles:
try:
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 ("\033[94m{:<20}\033[0m| \033[92m{:<}\033[0m {:>13}".format(i, results[0],"|"))
print('--------------------+-------------------------+')
except IndexError:
print ("\033[94m{:<20}\033[0m| \033[92m{:<}\033[0m".format(i, ""))
except subprocess.CalledProcessError:
print ("\033[94m{:<30}\033[0m| \033[92m{:<}\033[0m".format(i, "ENCODING ERROR"))

print('\n'1)
input("Enter to close program >")