Created
April 7, 2014 08:54
-
-
Save veeenu/10016903 to your computer and use it in GitHub Desktop.
Jumping Tux obfuscation in Perl, dates back to 2004. I was so young and so 31337, and this could have been made hundreds of times better than this, but still to date I'm so proud of it :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
########################################### | |
# Jumping Tux Obfu v0.1_alpha by X-3mE'89 # | |
# Written for Perlmonks.org on 18/07/2k4 # | |
########################################### | |
###################################### | |
# Tools used to create this obfu: # | |
# # | |
# . Slackware Linux 9.1 as O.S. # | |
# . "banner" for the shape # | |
# . "mask.pl v0.1_alpha" by X-3mE for# | |
# converting normal code into obfu # | |
# following a shape # | |
# . xterm for doing tests # | |
# . emacs for writing source # | |
# # | |
###################################### | |
# Usage: ./obfu.pl columns lines | |
# example ./obfu.pl 80 24 (in a standard size xterm) | |
$_=q! | |
$x ma | |
x= sh | |
if t& | |
@A RGV;$ | |
yma x=shift | |
&@ARGV ;if(($xmax | |
== "")&or &($ymax=="")) | |
&{ &die& "Usage:&$0&rows&c | |
ols\n "&}$gfx0=("&&\e[1; | |
32m__ _____");$gfx1=(" &\ | |
e[1;3 2m/&&&&&&&\\");$ gf | |
x2=("\e[1;32m|&&0&&&0 | |
&&|");$gfx3=("\e[1; | |
32m|&&&\e[1;33m, | |
^,\e[0m&&&\e[1;3 | |
2m|\e[0m");$gfx4=("&\e | |
[1;32m\\&&\e[1;33 m\\_/ | |
\e [0m&&\e[1;32m/\e [0m") | |
;$ gfx5=("&\e[1;32m/ &&\e[ | |
1;37m___\e[0m&&\ e[1;3 2m | |
\\\e[0m");$gfx6 =("\ e[ | |
1;32m|__\e[ 1;37m/& | |
&&\\\e[0 m\e[ | |
1;32m__ |\e | |
[0m ") | |
;$ gf | |
x7 =( | |
"\ | |
e[ | |
1; | |
32 | |
m( | |
__ | |
)& | |
&& | |
(_ | |
_) | |
\e | |
[0 | |
m" | |
); | |
$g | |
fx8= (" | |
\e[1; 32m | |
\\&&\ e[1;3 | |
7m\ \___ | |
/\e [0m& | |
&\e [1; | |
32 m/ | |
\e [0 | |
m" ) ;$ | |
gfx 9=( "\e | |
[1; 33m|\ \^/ | |
|_|\ \^/|\e[0 m");$ | |
gfx10=( "\e[1;33m&\\_/& &&\\_/\ | |
e[0m");$x =1;$y=5;$ xf=1;$yf=1;while(1)& | |
{print&"\ec\e[31m\e[1;".(i nt(($xmax-21)/2)). | |
"HJumpingTux&v0.1_alpha \n\e[2;".(int(( | |
$xmax-21)/2))."H&&&& &by&X-3mE' | |
89\e[0m";limits | |
();print("\e | |
[" .$ | |
y. "; | |
".$x."H".$gfx0."\n"."\e[".($y+1 | |
).";".$x."H".$gfx1."\n"."\e[".( | |
$y+2).";".$x."H".$gfx2."\n"."\e | |
[".($y+3).";".$x."H".$gfx3."\n" | |
." \e[ | |
".( | |
$y+ | |
4) .";". | |
$x."H".$gfx4."\n"."\e[".($y+5). | |
";".$x."H".$gfx5."\n"."\e[".($y | |
+6).";".$x."H".$gfx6."\n"."\e[ | |
".($y+7).";".$x."H".$gfx7."\n | |
". "\e | |
[". | |
($y | |
+8 ).";" | |
.$x."H".$gfx8."\n"."\e[".($y+9) | |
.";".$x."H".$gfx9."\n"."\e[".($ | |
y+10).";".$x."H".$gfx10."\n"); | |
if($x>=($xmax-12))&{$xf=0}if( | |
$x | |
<4 | |
)& {$ | |
xf =1 | |
}i f( | |
$xf==1)&{$x++}else&{$x--}if($y>=($ymax-11))&{$yf=0}i | |
f($y<5)&{$yf=1}if($yf==1)&{$y++}else&{$y--}system(" | |
sleep&0.05");}sub&limits&{print&"\e[3;2H";for($i=0;$ | |
i<($xmax-3);$i++)&{print&'_'}print&"\e[4;1H/\e[4;".( | |
$xmax-1)."H\\";for($i=5;$i<$ymax;$i++)&{print&"\e[". | |
$i ." ;1 | |
H| "} pr | |
in t& "\ | |
e[ $y ma | |
x; 1H \\ | |
"; fo r( | |
$i =1 ;$ | |
i< ($xmax -2 | |
); $i++)&{pri nt | |
&' _'}print&' /' | |
;f or | |
($i =5; | |
$i< $ym | |
ax;$ i++) | |
&{print&"\ e[".$i.";" | |
.($xmax-1) ."H|"}prin | |
t("\e[".$y max.";5HTy | |
pe&Ctrl-Z&to&quit");} !; | |
s/\s+//g; | |
s/&/ /g; | |
s/\\/\\\\/g; | |
s/\\\\e/\\e/g; | |
s/\\\\\\\\/\\\\/g; | |
s/\\\\n/\\n/g; | |
eval |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment