Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Rising Force

by cristian (Hermit)
on Aug 29, 2005 at 16:26 UTC ( [id://487459]=obfuscated: print w/replies, xml ) Need Help??

@'={$}=>,{}=>0x70,*,,0x6A,$={$$}=>0x68,*,,0x61,}; $,.= chr$_ foreach keys%{@'}; $_=$,,s<^(.)(.)(...).*>@$3$2$1@.print;

Replies are listed 'Best First'.
Re: Rising Force
by jdalbec (Deacon) on Aug 29, 2005 at 23:23 UTC
    This is perl, v5.6.1 built for i386-linux (obviously a buggy version)

    Output(piped through xxd): 0000000: 1740 a86f 00                             .@.o.

    This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level

    The order of the letters and 00 byte is random. Is that the effect you intended?

    Update: This is perl, v5.8.4 built for i386-linux-thread-multi

    This one works. The 00 byte appears first.

    Moral for obfu writers: write once, test everywhere!
      Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
        Platform:
          osname=linux, osvers=2.4.21-23.elsmp, archname=i386-linux-thread-multi

      Mine prints "japh"...

      -Scott

Cross-perl-version compatible version
by fizbin (Chaplain) on Sep 05, 2005 at 10:24 UTC
    @'={$}=>,{}=>0x70,*,,0x6A,$={$$}=>0x68,*,,0x61,}; $..=chr$_ foreach sort keys%{@'}; $_=$.,s<^.*(.)(.)(.)(.)>@$2$4$3$1@.print;
    Apparently perl 5.6 (or at least, ActiveState's perl 5.6.1) does strange, bizarre things when you try to set $, to some value that begins with \x00:
    C:\>perl -e "$, .= qq[\x00hjap]; print $,;" mult C:\>perl -e "$. .= qq[\x00hjap]; print $. ;" hjap C:\>perl -e "$; .= qq[\x00hjap]; print $; ;" hjap
    That first blank character there in the first two output lines is character 0, not a space; with $; you first see character 28, then character 0, then hjap. (my browser won't let me enter character number 28 - even if it could, that's not nice content on an html page) Note that perl 5.8 (though I've only tried cygwin's) does what you'd expect.

    I have my suspicions that what's happening in per 5.6 is that it's looking at some spot inside memory that's based on the string's length - for any string that's less than 8 characters, what happens is that I get that many characters returned of \x00multi-; for larger strings I get something like this: (not a real code block, so that I could paste in all those whacky special characters in the 1-31 range)

    C:\>perl -e "$, .= qq{\x00abcdefghijklmnopqrstuvwxyzaabbccddeeffgghhiijjkkllmmnn ooppqqrrssttuuvvwwxxyyzzaaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrss stttuuuvvvwwwxxxyyyzzzaaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnoo ooppppqqqqrrrrssssttttuuuuvvvvwwwwxxxxyyyyzzzz}; print $,;" ad ◄ ┴ ðBâ☺ Bâ☺¶?â☺Þ>â☺d>â☺D=â☺┤<â☺ý;â☺Ó:â☺$;â☺└9â☺,9â☺ÿ8â☺♀8â☺É:â☺¶6â☺ x6â☺╠5â☺(5â☺ÿ3â☺©2â☺d2â☺l%â☺©)â☺t4â☺8)â☺(!â☺l∟â☺©←â☺­→â☺@→â☺ÿ↨â☺8↨â☺ÿ▬▬â☺t§â☺ȶâ ☺►¶â☺`‼â☺¼↕â☺Ó◄â☺T◄â☺░►â☺ð☼â☺h☼â☺▄♫â☺┴ · Èîâ☺ê┤â☺efghijklmnopqrstuvwxyzaabbc cddeeffgghhiijjkkl
    --
    @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/
Re: Rising Force
by ikegami (Patriarch) on Sep 02, 2005 at 18:34 UTC

    "right-square-bracket hollow-happy-face 'p' ampersand" to you too!

    ActivePerl 5.6.1 on Win32

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://487459]
Approved by Tanktalus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-26 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found