Created
December 3, 2017 23:40
-
-
Save peewpw/2fc092ac51ed4b554d530da8fd93537c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$in = $( Read-Host "Please specify a file to encode with -in" ), | |
[string]$out = $( Read-Host "Please specify an output file with -out" ) | |
) | |
if (-Not (Test-Path $in)) { Read-Host "Please specify a valid filepath" } | |
$str = [System.IO.File]::ReadAllText($in) | |
$bytes = [System.Text.Encoding]::Ascii.GetBytes($str) | |
for($i=0; $i -lt $bytes.count; $i++) { | |
$bytes[$i] = $bytes[$i] -bxor 0x71 | |
} | |
[Convert]::ToBase64String($bytes) | Out-File $out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment