#!/usr/bin/perl
sub __{$_[0]=~y-=#&!~_`'.+,/<>():;?- .,eintsrahgldmfopv-;print@_}
sub _{($,,$:)=split/=/,$_[0],2;$* =$*?"$:$*":$:;__
"O_=`,!=$,=>+y=:)=C,r~'`(+'=(y=`.u!=<:?!=/+?!=`:=(!$/$*#$/$/"}map{_$_
}")~.'`=+=;+.`.~>/!=~_=+=;!+.=`.!!","'!c:_>=`w:=`u.`:?!'=+_>="
,"`,~.>=`,.!!=).!_c,=,!_'&=","):u.`,=):u.=c+<<~_/=b~.>'&$/"
,")~)`,=)~?!=/:<>!_=.~_/'&=","'~x`,='~x=/!!'!=+-<+y~_/&="
,"'!?!_`,='!?!_='w+_'=+-'w~((~_/&$/","!~/,`,=!~/,`=(+~>
'=+-(~~!'=>+_c~_/&=","`!_`,=`!_=<:.>'=+-.u((!.'=>.u((~_/&=
What it does is nothing but generate the following poem :
On the first day of Christmas my true love gave to me a partridge in a pear tree. On the second day of Christmas my true love gave to me two turtle doves and a partridge in a pear tree. On the third day of Christmas my true love gave to me three french hens, two turtle doves and a partridge in a pear tree. On the fourth day of Christmas my true love gave to me four calling birds, three french hens, two turtle doves and a partridge in a pear tree. On the fifth day of Christmas my true love gave to me five golden rings, four calling birds, three french hens, two turtle doves and a partridge in a pear tree. On the sixth day of Christmas my true love gave to me six geese a-laying, five golden rings, four calling birds, three french hens, two turtle doves and a partridge in a pear tree. On the seventh day of Christmas my true love gave to me seven swans a-swimming, six geese a-laying, five golden rings, four calling birds, three french hens, two turtle doves and a partridge in a pear tree. On the eighth day of Christmas my true love gave to me eight maid s a-milking, seven swans a-swimming, six geese a-laying, five golden rings, four calling birds, three french hens, two turtle doves and a partridge in a pear tree. On the ninth day of Christmas my true love gave to me nine ladies dancing, eight maid s a-milking, seven swans a-swimming, six geese a-laying, five golden rings, four calling birds, three french hens, two turtle doves and a partridge in a pear tree. On the tenth day of Christmas my true love gave to me ten lords a-leaping, nine ladies dancing, eight maid s a-milking, seven swans a-swimming, six geese a-laying, five golden rings, four calling birds, three french hens, two turtle doves and a partridge in a pear tree. On the eleventh day of Christmas my true love gave to me eleven pipers piping, ten lords a-leaping, nine ladies dancing, eight maid s a-milking, seven swans a-swimming, six geese a-laying, five golden rings, four calling birds, three french hens, two turtle doves and a partridge in a pear tree. On the twelfth day of Christmas my true love gave to me twelve drummers drumming, eleven pipers piping, ten lords a-leaping, nine ladies dancing, eight maid s a-milking, seven swans a-swimming, six geese a-laying, five golden rings, four calling birds, three french hens, two turtle doves and a partridge in a pear tree.cheers!
#!/usr/bin/perl
sub __{$_[0]=~y-=#&!~_`'.+,/<>():;?- .,eintsrahgldmfopv-;print@_}
sub _{($,,$:)=split/=/,$_[0],2;$* =$*?"$:$*":$:;__
"O_=`,!=$,=>+y=:)=C,r~'`(+'=(y=`.u!=<:?!=/+?!=`:=(!$/$*#$/$/"}map{_$_
}")~.'`=+=;+.`.~>/!=~_=+=;!+.=`.!!","'!c:_>=`w:=`u.`:?!'=+_>="
,"`,~.>=`,.!!=).!_c,=,!_'&=","):u.`,=):u.=c+<<~_/=b~.>'&$/"
,")~)`,=)~?!=/:<>!_=.~_/'&=","'~x`,='~x=/!!'!=+-<+y~_/&="
,"'!?!_`,='!?!_='w+_'=+-'w~((~_/&$/","!~/,`,=!~/,`=(+~>
'=+-(~~!'=>+_c~_/&=","`!_`,=`!_=<:.>'=+-.u((!.'=>.u((~_/&=
"
Where did you find it?
Cheers, Sören
Wow, this is 90 chars shorter than what I get if I LZ77-compress it (see this old obfu of mine: [id://296552]).
sub j{'dr~Tt~~~wM~|t[~}r{~}ly~|dW~{sI~|n~}|aG~[tz~}iu~}d}}Sh1~{ w~}ry~
}n"~}h|~}hB||s~~~,|~|wQ}Gfm~}uD~|hr~Tf\\{{ "~}aX~}l<~|g|~}bw|{s9|{hH|3
iw~}tX{RiV~zoX~}d|~}r${{s~~~;.{ h&~{i~~~xY{RsIx| ?~|e$~| p~}-X~}ao~}i#
{|,x~{vYy r3~mvB||tFxReRv{ t~}wB}|sqw{sR}}id~}m${{,{w aA}Wev~}gz~}tX{S
eCtz d~|i|z| pw|mv~}l~~~kkwys"v e;|An<~|tX{Sn<~|eY~|aq~}iE}| q~|n"~}ij
wzers g!{*tQvPt v{lm~}rjsyl6~|pouynMq lTy eNtslSvNeRly dn|py~}rb~|pxk|
ijwztrn esw r9}^wSl|f@oQwSl|vJ}{r[~}mK~|rDq{roh{i=qyl~k nxu tN}Q'=~
/./g?ord$&:die$_}do{$_.=chr(j).substr($_,12096-&j-95*j,126-&j)until 0}
if s""On the first day of Christmas my true love gave to me
a partridge in a pear tree.\n\nOn the secon"
Update: Oh, and the strange newline which ambrus mentioned was caused by an newline which got introduced into the code. Now I'm curious -- was this actually on the Internet somewhere, and ironically made its way back to the same place it came from? Hey, Anonymous Monk, where did you find this?
(sorry, i know i'm replying to your message where you point this out, but i went through the trouble of finding it before reading that you had already replied, liverpole)
the line by line comparison i did finds the newline:
,"'!?!_`,='!?!_='w+_'=+-'w~((~_/&$/","!~/,`,=!~/,`=(+~> '=+-(~just do a super search for: "eintsrahgldmfopv" and you'll see it soon enough. Re^3: a poemcreated: 2006-01-05 19:57:02That was clever, searching for "eintsrahgldmfopv" (sounds like a combination of German and Russian both -- I wonder what it might mean?). I'll have to see whether I can work that word into another obfuscation sometime, just so I can search for it at Perlmonks.By the way, I notice you wrote your own first obfuscation not too long ago, chargrill -- welcome to the club!
@ARGV=split//,"/:L"; map{print substr crypt($_,ord pop),2,3}qw"PerlyouC READPIPE provides"Re^4: a poemcreated: 2006-01-06 22:17:05Only mildly obfuscated, but...#! /usr/bin/perl use strict; use warnings; $a = 'eintsrahgldmfopv'; ($b = join '', ('a'..'z')) =~ s/[$a]//g; eval "(\$b = \$a) =~ y/a-z/$a$b/"; @_ = split //, qq($a, $b); print @_[22,33,18,28,17,6,2,13,3,7,24,30,17,31,0,5,9,17,25,26,23,21,24,5,16];Re^4: a poemcreated: 2006-01-07 14:49:56well, i've been combing the obfuscated code node for some time looking for inspiration and techniques beyond lack of whitespace and single digit var names. i don't recall if i've had the opportunity to sample some of your techniques, but you can be certain that if anyone has posted code or replies in this node in the last year or so, i've read it.your particular obfuscation of the 12 days of christmas stuck out in my mind as it's one of the several that i didn't even attempt to deobfuscate :) as i saw the general form of AM's obfu, it struck me as being familiar. i wondered if it was lifted directly from something else i had read. since there doesn't seem to be much similarity in strings people stick into obfu's for ~tr///, i figured if anything was lifted, that might be the clue.
keep in mind it's my first posted obfuscation ;) (hint hint)
perlmonks.org content © perlmonks.org and ambrus, Anonymous Monk, chargrill, Happy-the-monk, jdalbec, liverpole
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03