Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Crypto
Set-Location $PSScriptRoot
$crypto = "PkTr2sz2*cF-raz7GuD4w6U#gctK3E@Bt1aYQPic%705ZvAeW6jePRfpmI)Hy^LoowCnbJdOSi9Mber#)ieU*f2Z6MSh7VuD5a(hsv8el1oWZO7lpKyJlDz$-jI@tT23Raikq=F&wB6c%Hly"
[string]$word = ""
$length = $crypto.Length
$stop = 0
$currentposition = 0
for ($first = 1; $first -le $length; $first++)
{
for ($second = 1; $second -le $length; $second++)
{
while (!$stop)
{
$currentposition += $first
if ($currentposition -gt $length)
{
$stop = $true
continue
}
$word += $crypto[$currentposition -1]
$currentposition += $second
if ($currentposition -gt $length)
{
$stop = $true
continue
}
$word += $crypto[$currentposition - 1]
}
[string]$output = [string]$first + "`t" + [string]$second + "`t" + [string]$word
Write-Host $output
$output >> words.txt
$word = ""
$currentposition = 0
$stop = $false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.