PoSH Challenge Part 11
For Level 12 more bitmaps but then mixed together and delivered as bytes :
# Level 12
$a=$b=$c=$d=$e = @()
$ba = [System.IO.File]::ReadAllBytes( "C:\PowerShell\PoshChallenge\evil2.gfx" )
foreach ($byte in $ba) {
$a += $byte
[void]$foreach.movenext();$b += $foreach.current
[void]$foreach.movenext();$c += $foreach.current
[void]$foreach.movenext();$d += $foreach.current
[void]$foreach.movenext();$e += $foreach.current
}
"a,b,c,d,e".split(',') |% {
[System.IO.File]::WriteAllBytes("C:\PowerShell\PoshChallenge\EVIL2${_}.jpg",(get-variable "$_").value)
ii "C:\PowerShell\PoshChallenge\EVIL2${_}.jpg"
sleep 5
}
Not that challenging technically but you might find some interesting scripting tricks in above example.
As the next level involved some deeper diving, more research and trail and error to solve in PowerShell , but was very interesting and I did learn a lot from this level. more about that in next post.
Greetings /\/\o\/\/