Advertisement
G_Lise710

Saved Wi-Fi Password Recovery - Source Code

Feb 11th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim ObjExec,AllConnected,strFromProc,find,replacewith,BoxInput
  2. Set objShell=WScript.CreateObject("WScript.Shell")
  3. Do
  4. BoxInput=InputBox("Type full SSID of a network you want to view saved password for.")
  5. if BoxInput="" then
  6. Wscript.quit
  7. else
  8. Set ObjExec=objShell.Exec("Netsh WLAN show profile name="""&BoxInput&""" key=clear")
  9. Do
  10. strFromProc=ObjExec.StdOut.ReadLine()
  11. if inStr(strFromProc, "SSID name") then
  12. AllConnected=""""&Allconnected&""&strFromProc&""
  13. end if
  14. if inStr(strFromProc, "Key Content") then
  15. AllConnected=""""&Allconnected&""&strFromProc&""
  16. end if
  17. Loop While Not ObjExec.Stdout.atEndOfStream
  18. find = "   "
  19. replacewith = ""
  20. AllConnected = Replace(AllConnected, find, replacewith)
  21. find = "Key Content"
  22. replacewith = "Password"
  23. AllConnected = Replace(AllConnected, find, replacewith)
  24. find = "SSID name"
  25. replacewith = "SSID"
  26. AllConnected = Replace(AllConnected, find, replacewith)
  27. find = """"""
  28. replacewith = ""
  29. AllConnected = Replace(AllConnected, find, replacewith)
  30. x=msgbox(""&AllConnected&"",0+64,"Wi-Fi Password Recovery")
  31. End if
  32. AllConnected = ""
  33. Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement