Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim ObjExec,AllConnected,strFromProc,find,replacewith,BoxInput
- Set objShell=WScript.CreateObject("WScript.Shell")
- Do
- BoxInput=InputBox("Type full SSID of a network you want to view saved password for.")
- if BoxInput="" then
- Wscript.quit
- else
- Set ObjExec=objShell.Exec("Netsh WLAN show profile name="""&BoxInput&""" key=clear")
- Do
- strFromProc=ObjExec.StdOut.ReadLine()
- if inStr(strFromProc, "SSID name") then
- AllConnected=""""&Allconnected&""&strFromProc&""
- end if
- if inStr(strFromProc, "Key Content") then
- AllConnected=""""&Allconnected&""&strFromProc&""
- end if
- Loop While Not ObjExec.Stdout.atEndOfStream
- find = " "
- replacewith = ""
- AllConnected = Replace(AllConnected, find, replacewith)
- find = "Key Content"
- replacewith = "Password"
- AllConnected = Replace(AllConnected, find, replacewith)
- find = "SSID name"
- replacewith = "SSID"
- AllConnected = Replace(AllConnected, find, replacewith)
- find = """"""
- replacewith = ""
- AllConnected = Replace(AllConnected, find, replacewith)
- x=msgbox(""&AllConnected&"",0+64,"Wi-Fi Password Recovery")
- End if
- AllConnected = ""
- Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement