Recovering Corrupted Bash Shell

Kristian Hermansen kristian.hermansen at gmail.com
Sun Feb 25 13:07:16 EST 2007


On 2/25/07, Matthew Gillen <me at mattgillen.net> wrote:
> 016 is the first octal code that triggers the corrupt screen for me.  When
> you're done, you can use 'man ascii' to figure out what those characters are
> supposed to be.

Very nice :-)  \016 was the only code out of all of them that
corrupted my screen.

> Here's the script:

Thanks!  And here's the way to do it with perl if everyone else wants
to join in on the fun:
$ perl -e 'print chr(14)'

man ascii lists this character as 'shift out' and chr(15) as 'shift
'in'.  According to wikipedia, these characters were once used to
switch to different characters sets.  Now, here's a little fun:
$ perl -e 'print chr(14)'; ls; sleep 5; perl -e 'print chr(15)'; ls

So, then I got to thinking, wouldn't it be nasty if someone could
influence your shell corruption via wall or write?  Well, luckily it
seems that the characters will not corrupt your terminal if coming in
from that method.  Or maybe you just can't pass them from your shell
into wall/write because they get converted somewhere/somehow.  Heh,
fun stuff...
-- 
Kristian Hermansen

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the Discuss mailing list