use Acme::Pony;
程序不能运行了。。。你赔
2009/12/9 张晓亮 <alaboszhang@gmail.com>
这相模块可以用来代码加密.
骗骗简单的用户.
打开源代码,全部都是 larry 的大头像. 好玩.
----- Original Message -----
From: "Fayland Lam" <fayland@gmail.com>
To: <perlchina@googlegroups.com>
Sent: Wednesday, December 09, 2009 7:25 AM
Subject: [PerlChina] CN Perl Advent Day 9: Have fun
http://perlchina.org/advent/2009/HaveFun.html
=for advent_year 2009
=for advent_day 9
=for advent_title Have Fun
=for advent_author Fayland Lam
本文存属玩乐。
M<Acme::Pony>
=begin code
use Acme::Pony;
print "Hello world";
=end code
将上文保存为 hello.pl, 然后运行 perl hello.pl, 最后打开 hello.pl 你会发现整个文件都变了。变成了:
=begin pre
use Acme::Pony;
bu
ffYBUf
fYbuFFYbU
ffYbUFfyBUF
fYBuffYbUFFy
buffyBuffYb
ufFybuffYbu Ff
YbUffYBuffYB uFFyb
uFFyBUfFYBUfFYbuffybUffYBUfFY
BuFFYBuFFybUffYBUffyBUfFYbufFyb
UFf yBuffYbuFFyBUFfybUfFybuffY
bUf fybUffyBUffYBuFFYbufFyB
uffy BUFFYbUfFYBUF
fYbU fFybuFfyBUFf
yBu ffYbufFyBU
FFY bUf FYBUFfY
bXX XXX XXX
XX XXX
XXX XXX
=end pre
更惊奇的事情还在后头,重新运行 perl hello.pl, 你会发现它输出了 "Hello world". :)
如果上述还不够过瘾,试试下面的。
编辑一个 hello.pl
=begin code
print "Hello World\n";
=end code
然后创建一个 havefun.pl, paste 如下代码:
=begin code
use Acme::EyeDrops qw(sightly);
print sightly( {
Shape => 'camel',
SourceFile => 'hello.pl',
Regex => 1
} );
=end code
完毕后运行 perl havefun.pl > hello2.pl
打开 hello2.pl, 你会发现一只大骆驼
=begin pre
''=~('('.'?'
.'{'.( '`'|'%').("\["^
'-').('`'| '!').('`'|',').'"'
.('['^'+') .('['^ ')').('`'|')').('`'|
'.').('['^'/').('{'^ '[').'\\'.'"'.('`'^'('
).('`'|'%').('`'|',') .('`'|',').('`'|"\/").(
'{'^'[').('{'^','). ('`'|'/').('['^')').("\`"|
',').('`'|'$') .'\\'.'\\'.('`'|'.').'\\'.'"'
.';'.'"'."\}". ')');$:='.'^'~';$~='@'|('(');$^=
')'^'[';$/='`'| '.';$,='('^'}';$\='`'|'!';$:=(')')^
'}';$~='*'|'`'; $^='+'^'_';$/='&'|'@';$,='['&('~');$\=
','^'|';$:='.'^ '~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$,=
'('^'}';$\='`' |'!';$:=')'^'}';$~='*'|'`';$^='+'^'_';$/=
'&'|'@';$,='[' &'~';$\=','^'|';$:='.'^'~';$~='@'|"\(";$^=
')'^'[';$/='`'|'.';$,='('^'}';$\='`'|'!';$:=')'^'}';$~='*'
|'`';$^='+'^'_';$/='&'|'@';$,='['&'~';$\=','^'|';$:='.'^'~'
;$~='@'|'(';$^=')'^'[';$/='`'|'.';$,='('^'}';$\='`'|'!';$:
=')'^'}';$~='*'|'`';$^='+'^'_';$/='&'|'@';$,='['&'~';$\=','
^'|';$:='.'^'~';$~='@'|'(';$^=')'^'[';$/='`'|'.';$,='('^'}'
;$\='`'|'!';$:=')'^'}';$~='*'|'`';$^='+'^'_';$/='&'|'@';$,
='['&'~';$\=','^'|';$:='.'^'~';$~='@'|'(';$^=')'^'['; $/=
'`'|'.';$,='('^'}';$\='`'|'!';$:=')'^'}';$~='*'|'`' ;$^
='+'^'_';$/='&'|'@';$,='['&'~';$\=','^'|' ;$:='.'^ '~'
;$~='@'|'(';$^=')'^'[';$/='`'|"\.";$,= '('^'}' ;$\
='`'| '!';$:=')'^'}';$~='*'|"\`";$^= '+'^'_' ;$/
='&'|'@';$,='['&'~';$\=(',')^ '|';$:= '.'
^'~';$~= '@'|'(';$^ ="\)"^ '[';$/ =(
('`'))| "\.";$,= ('(')^ '}';$\ =(
('`'))| "\!";$:= "\)"^ "\}"; (
($~))= '*'|'`'; ($^) ='+'
^"\_"; $/=('&')| '@'; ($,)
='['& "\~";$\= ','^ '|';
($:)= '.'^'~' ;$~= '@'|
'('; $^=')' ^'[' ;$/=
'`'| '.' ;$,= '('^
'}'; $\= '`' |((
'!' )); $:= ')'
^(( '}' )); $~=
'*' |(( '`' ))
;( ($^))= ((
(( '+')) ))
^+ "\_";$/= ((
'&' ))|+ "\@"; $,
=(( '['))& '~'; $\=
','^ "\|";$:= '.' ^'~'
;($~)= ('@')|
"\(";$^= ')'^'['
=end pre
如果你运行它,perl hello2.pl, 毫无疑问,上述图片是可运行的,输出还是 "Hello World".
如果骆驼不够好看,想看看 Larry Wall? 将 Shape => 'camel' 改为 Shape => 'larry', 重新运行
perl havefun.pl > hello2.pl 你会发现一个可以运行的 Larry Wall 图片:
=begin pre
''=~('('.'?'.'{'
.('`'|'%').('['^"\-").(
'`'|'!').('`'|',').'"'.(('[')^
'+'). ('['
^')' ).(
'`'| ')'
).+( ( '`'
)|(( ( '.'
)))) .( ( '['
)^(( ( ( '/'
))) )) .( '{'
^(( (( ( '['
))) ))). ( (((
((( '\\' ) )))
))) .'"' . (((
'`' ))^'(').( ( '`'
)|+ (( ( ((
'%' )) ) ))
).( ( ( ((
'`' ) )))|+
',' ) .(
'`' | ',').('`'|'/').('{'^'[').('{'^(',')).(
'`' |'/').("\["^ "\)").( ( ( "\`"))| (
',' ) ) .+( '`' |+ ( ( (( '$' ))) )
).+ ( ( '\\')).'\\'. ( ( '`')|('.')). (
((( ( ( ( ( (
(( ((( ( ( ( (( (
(( ( '\\') ) ) )) )
)) ) ) ) ) ) )
)) ) ))) ))).'"'.';'.'"' . '}'.')');$:=
(( ( ( ( (
( ( ( ( (
( ( ( '.' ) )
) ))) )) )
) ) )))^'~';$~='@'|'(';$^ =
( ( ')'))^'[';$/='`'|'.';$,= (
( ( '(')))^'}';$\='`'|"\!";$:= (
( ( ')')) )^'}';$~="\*"| '`'; (
( ( $^)) ) = '+' ^
(( '_' ));$/='&'|'@';#; #;#
; #
; #
; #
; # ;
# ; #
; # ;
# ; #
; # ; #
; # ; #
; #;# ;# ;
# ;#;#;#;#;#; #
=end pre
更多更好玩的图片,请参考 M<Acme::EyeDrops>
更多更好玩的模块,有 M<Acme::Bleach>, M<Acme::Morse>, M<Acme::DWIM>,
M<Acme::Smirch>, M<Acme::Buffy >, M<Acme::AsciiArt2HtmlTable> 等。玩也玩不够。
Have Fun! Enjoy!
谢谢
--
Fayland Lam // http://www.fayland.org/
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---
没有评论:
发表评论