Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,3 +0,0 @@
|
|||
$e = "This is a test Guvf vf n grfg"
|
||||
|
||||
[char[]](0..64+78..90+65..77+91..96+110..122+97..109+123..255)[[char[]]$e] -join ""
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
function Invoke-Rot13 {
|
||||
param(
|
||||
[char[]]$message
|
||||
)
|
||||
begin {
|
||||
$outString = New-Object System.Collections.ArrayList
|
||||
$alpha = 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'
|
||||
$alphaL = $alpha + $alpha
|
||||
$alphaU = $alphaL.toUpper()
|
||||
$int = 13
|
||||
}
|
||||
process{
|
||||
$message | ForEach-Object {
|
||||
# test if char is special
|
||||
if ($_ -match '[^\p{L}\p{Nd}]') {
|
||||
$outString += $_
|
||||
}
|
||||
# test if char is digit
|
||||
elseif ($_ -match '\d') {
|
||||
$outString += $_
|
||||
}
|
||||
# test if char is upperCase
|
||||
elseif ($_ -ceq $_.ToString().ToUpper()) {
|
||||
$charIndex = $alphaU.IndexOf($_.tostring())
|
||||
$outString += $alphaU[$charIndex+$int]
|
||||
}
|
||||
# test if char is lowerCase
|
||||
elseif ($_ -ceq $_.ToString().ToLower()) {
|
||||
$charIndex = $alphaL.IndexOf($_.tostring())
|
||||
$outString += $alphaL[$charIndex+$int]
|
||||
}
|
||||
else {
|
||||
$outString += $_
|
||||
}
|
||||
} # end foreach
|
||||
} # end process
|
||||
end {
|
||||
# output string and join all chars
|
||||
$outString -join ""
|
||||
}
|
||||
} # end function
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
PS> $message = '{!This is /A\ Test123}'
|
||||
PS> $messageE = Invoke-Rot13 -message $message
|
||||
PS> $messageE
|
||||
PS> Invoke-Rot13 -message $messageE
|
||||
{!Guvf vf /N\ Grfg123}
|
||||
{!This is /A\ Test123}
|
||||
Loading…
Add table
Add a link
Reference in a new issue