Your Ad Here

Sabtu, 25 Agustus 2012

Unix Tip: GEEK DECODER RING

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3486 - August 25, 2012

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


GEEK DECODER RING

Ever want to sneek some not
quite politically correct
witticism or other thought
past the "non-technical"?
Or maybe you just want to
un[en|de]code bits, hex or
uu text (boring, but more
practical).

Here's some simple perl
code you can use for a
geek/nerd/dweeb "decoder
ring":

ENCODE INTO BITS, HEX, UU:

perl -ne'$b=unpack("b*",$_);@l=$b=~/.{0,56}/g;
print(join("\n",@l))' <<RM
Tron rules!
RM

Just change the "b*" to "h*"
for hexidecimal or "u*" for
uuencoding.

DECODE FROM BITS, HEX, UU:

perl -ne'chomp;$a.=pack"b*",$_;END{print"\n$a\n\n"}'<<RM
00101010010011101111011001110110000001000100111010101110
00110110101001101100111010000100
RM

I include my favorite
messages that I otherwise
might not write out in clear
text in my signature file along
with the decoder code. It's
enough to scare away most. But,
I've found those technically
superior types get more of a
kick out of "decoding" (cut
and paste to UNIX/LINUX
command line) the message
during their more productive
moments. ;-)


This tip generously supported by: rmuhle@tuxzone.net


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Tidak ada komentar:

Posting Komentar

Your Ad Here
Free Automatic Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink