This blog has moved to http://ThePowerShellGuy.com
Greetings /\/\o\/\/
this script is not very usefull, it's Just to annoy someone,
when you start this script, Monad will start dropping letters at random, after every command, messing up the output.
It keeps pretending it's the "normal" shell, by getting the input from the user and starting it with invoke-command.
also it will "hide" it's starting line so that you can invoke it without being seen (on the console that is).
if your "target" call's for help let him press Ctrl-C, and MSH will act normal again.
gr /\/\o\/\/
# DropChars.msh
# just lets MSH "drop" some characters at random
# and hides startupline for more suprise
# /\/\o\/\/ 2005
$raw = $host.ui.rawUI
$WS = $raw.WindowSize
# Remove startup line
$pos = $host.ui.rawui.CursorPosition
$pos.y--
$fgc = $host.ui.rawUI.ForegroundColor
$bgc = $host.ui.rawUI.BackgroundColor
$row = $host.ui.rawui.NewBufferCellArray($(" " * $WS.Width),$fgc,$bgc)
$host.ui.rawui.SetBufferContents($pos,$row)
$host.ui.rawui.CursorPosition = $pos
$times = 0
while ($true) {
$pos = $raw.windowposition
for ($time = 0 ; $time -lt $Times ; $time++) {
$r = new random
for($i = 0 ; $i -lt $WS.Height ; $i++ ) {
$x = $r.next($ws.width)
$O++
[system.console]::MoveBufferArea($x,$pos.y,1,1,$x,$pos.y + 1)
$pos.y = $pos.y +1
}
}
write-host -no (prompt)
$line = [console]::readline()
if ($line.Length -gt 0 ) {invoke-command $line}
if ($times -lt 5) {$times++}
}