Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

too much punctuation

by iamcal (Friar)
on Jun 13, 2002 at 08:15 UTC ( [id://174112]=obfuscated: print w/replies, xml ) Need Help??

#!/usr/bin/perl -w use strict; $_=q[";7w2q";m/656/bq6/i;$g= q(3616w8206qc7);$/="265502"; 0;{$w=~y/726568q7/=46/;}for( 6..ew(6));q1;=|20.747.3754|; @wa];s[\[^0-9a-f\]]{}g;@ARGV =reverse(/../g);$a=\@ARGV;0; grep{push(@_,sprintf('%.2x', hex))}@$a;$"=q s\xs ;$$=qq"$ \"@_";$$=~s/\s//g;print eval qq("$$");
deconstructions are welcomed...

Replies are listed 'Best First'.
Re: too much punctuation
by maverick (Curate) on Jun 13, 2002 at 15:57 UTC
    Deconstruction follows:

    q delimited by brackets, all non-alpha numerics will be removed
    $_=q[";7w2q";m/656/bq6/i;$g=q(3616w8206qc7);$/="265502";0;{$w=~y/726568q7/=46/;}for(6..ew(6));q1;=|20.747.3754|;@wa];

    by this. /me strongly suspects hex encoded data at this point
    s[\[^0-9a-f\]]{}g;         # $_ =~ s/[^0-9a-f]//g;

    reverse the string keeping the pairs in order (72654a -> 4a6572)
    @ARGV = reverse(/../g);

    make a ref to @ARGV
    $a=\@ARGV;

    noise
    0;

    grep used like a map. converting the hex encoded data back to characters. Look at the last two non-alpha characters in the first line. 4a which is 'J'

    grep { # @_ = map { push(@_,sprintf('%.2x',hex)) # sprintf('%. +2x',hex) } @$a; # } @$a;

    set the default join character for arrays to '\x'
    $"=q s\xs;                                  # $" = '\x';

    joins @_ on \x, adding a \x in front. So $_ now contains \x4a\x75\x73 etc.
    $$=qq"$\"@_";                               # $$ = '\x'.join('\x',@_);

    remove any spaces in the string (induced by obfu formatting)
    $$=~s/\s//g;

    eval the hex string and print
    print eval qq("$$");

    /\/\averick
    OmG! They killed tilly! You *bleep*!!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2025-06-20 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.