Freigeben über


Fun & Frolics: Generate a 0 and 1 Screen Stream

What a ridiculous title!

Believe me, the post gets even more ridiculous. Anyway, it's a bit of fun!
 

I had to do the following for a conference I recently spoke at...

 

 
        function ExfiltrateData {

           Write-Output " "
           1..900 | % {Write-Host "$(Get-Random -Minimum 0 -Maximum 2)" -NoNewline }
           1..14 | % {Write-Host "$(Get-Random -Minimum 0 -Maximum 2)" -NoNewline -ForegroundColor Red}
           1..1200 | % {Write-Host "$(Get-Random -Minimum 0 -Maximum 2)" -NoNewline }
           1..12 | % {Write-Host "$(Get-Random -Minimum 0 -Maximum 2)" -NoNewline -ForegroundColor Red}
           1..1000 | % {Write-Host "$(Get-Random -Minimum 0 -Maximum 2)" -NoNewline }          
           1..9 | % {Write-Host "$(Get-Random -Minimum 0 -Maximum 2)" -NoNewline -ForegroundColor Red}
           1..800 | % {Write-Host "$(Get-Random -Minimum 0 -Maximum 2)" -NoNewline }
           Write-Output " "
           Write-Output " "
           Write-Host "MISSION ACCOMPLISHED!" -ForegroundColor Black -BackgroundColor Yellow
           Write-Output " "

        }

 

What this gives you is the following output...

 

capture204

 

Don't ask!