Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the account and password of the currently used wireless network
#1
I want to get the account and password of the currently used wireless network, and then save it to a variable in the QM code.

I found the VBS code, After running the VBS code, a txt file will be generated with the password of the wireless network. but I don't know how to save it to the variables of the QM code. I hope someone can provide some suggestions, or a simpler implementation method. Thanks in advance. Smile

Code:
Copy      Help
'//////////////////////////////////////////////
'//            ε013 V 2.0 (Classic)
'//          Jordan Dalcq - 0v3rl0w
'/////////////////////////////////////////////

Function GetOutput(command)
 Set Shell = Wscript.CreateObject("WScript.Shell")
 Set cmd = Shell.Exec("cmd /c  " & command)
 strOut = ""

 Do While Not cmd.StdOut.AtEndOfStream
   strOut = strOut & cmd.StdOut.ReadLine() & "\n"
 Loop
 GetOutput=strOut
End Function

Function saveIt(wifi, passwd)
 wifi = Replace(Replace(wifi, ">", "-"), "<", "-")
 Set objFSO=CreateObject("Scripting.FileSystemObject")
 Set objFile=objFSO.CreateTextFile(wifi & ".txt")
 objFile.Write(passwd)
 objFile.Close
End Function

strText=Split(GetOutput("netsh wlan show profile"), "\n")

i = 0

For Each x in strText
    If i > 8 And i < Ubound(strText)-1 Then
        Name = Split(x, ": ")(1)
        str=Split(GetOutput("netsh wlan show profile """ & Name & """ key=clear"), "\n")(32)
        passwd = Split(str, ": ")
        If Ubound(passwd) Then
            saveIt Name, passwd(1)
        End If
    End If
    i = i + 1
Next


Messages In This Thread
How to get the account and password of the currently used wireless network - by win - 01-21-2019, 12:01 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)