-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGet-PCInfo.ps1
14 lines (13 loc) · 1.37 KB
/
Get-PCInfo.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$omg = {
$a = wmic /node:"localhost" ComputerSystem Get Model
$c = wmic /node:"localhost" ComputerSystem Get Manufacturer
$b = wmic bios get serialnumber
$d = [Environment]::UserName + '@xxxxx.ru'
Send-MailMessage -SmtpServer outlook.pcw.local -To "xxxxx.ru" -Encoding ([System.Text.Encoding]::UTF8) -From "$d" -Subject "Model and Serial Number" -Body "
$c
$a
$b
"
}
[convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($omg))
powershell -ExecutionPolicy ByPass -EncodedCommand CgAkAGEAIAA9ACAAdwBtAGkAYwAgAC8AbgBvAGQAZQA6ACIAbABvAGMAYQBsAGgAbwBzAHQAIgAgAEMAbwBtAHAAdQB0AGUAcgBTAHkAcwB0AGUAbQAgAEcAZQB0ACAATQBvAGQAZQBsAAoAJABjACAAPQAgAHcAbQBpAGMAIAAvAG4AbwBkAGUAOgAiAGwAbwBjAGEAbABoAG8AcwB0ACIAIABDAG8AbQBwAHUAdABlAHIAUwB5AHMAdABlAG0AIABHAGUAdAAgAE0AYQBuAHUAZgBhAGMAdAB1AHIAZQByAAoAJABiACAAPQAgAHcAbQBpAGMAIABiAGkAbwBzACAAZwBlAHQAIABzAGUAcgBpAGEAbABuAHUAbQBiAGUAcgAKACQAZAAgAD0AIABbAEUAbgB2AGkAcgBvAG4AbQBlAG4AdABdADoAOgBVAHMAZQByAE4AYQBtAGUAIAArACAAJwBAAGMAbwBtAHAAYQByAGUAeAAuAHIAdQAnAAoAUwBlAG4AZAAtAE0AYQBpAGwATQBlAHMAcwBhAGcAZQAgAC0AUwBtAHQAcABTAGUAcgB2AGUAcgAgAG8AdQB0AGwAbwBvAGsALgBwAGMAdwAuAGwAbwBjAGEAbAAgAC0AVABvACAAIgB2AGEAbABlAG4AdABpAG4ALgBlAHIAbQBhAGMAaABrAG8AdgBAAGMAbwBtAHAAYQByAGUAeAAuAHIAdQAiACAALQBGAHIAbwBtACAAIgAkAGQAIgAgAC0AUwB1AGIAagBlAGMAdAAgACIATQBvAGQAZQBsACAAYQBuAGQAIABTAGUAcgBpAGEAbAAgAE4AdQBtAGIAZQByACIAIAAtAEIAbwBkAHkAIAAiAAoAJABjACAACgAkAGEACgAkAGIACgAiAAoA