Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $str = Read-Host
- switch -Regex ($str.Replace('^','')) {
- ("(set.+)&") {$cmds = $matches[1].split('&')}
- }
- $pstr = $cmds[0]
- for ($i = 1;$i -lt $cmds.Length;$i++) {
- if ($cmds[$i].length -ne 0) {
- switch -Regex ($cmds[$i]) {
- ":(.)=(.)!" {$vars = $matches}
- }
- $pstr = $pstr -creplace [regex]::escape($vars[1]), [regex]::escape($vars[2])
- }
- }
- $decode = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($pstr.split(' ')[-1]))
- switch -Regex ($decode) {
- "\('(.)'\)" {$split = $matches[1]}
- "'(.*)'" {($matches[1].split("'"))[0].split($split)}
- }
Advertisement
Add Comment
Please, Sign In to add comment