Ps Enc
@ Animesh Roy | Thursday, Mar 25, 2021 | 1 minutes read | Update at Thursday, Mar 25, 2021

Powershell Enc

$pt='echo "Hello $env:username"'
$bytes=[System.Text.Encoding]::Unicode.GetBytes($pt)
$enc=[Convert]::ToBase64String($bytes)
$enc
ZQBjAGgAbwAgACIASABlAGwAbABvACAAJABlAG4AdgA6AHUAcwBlAHIAbgBhAG0AZQAiAA==

Run the encoded code

powershell.exe -enc "ZQBjAGgAbwAgACIASABlAGwAbABvACAAJABlAG4AdgA6AHUAcwBlAHIAbgBhAG0AZQAiAA=="

© 2010 - 2024 Classroom

Reading Stuffs

Social Links

YOU CAN REUSE MY CONTENT