Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Just another silly pattern

by Darkling (Beadle)
on Feb 14, 2002 at 03:32 UTC ( [id://145359]=obfuscated: print w/replies, xml ) Need Help??

Not sure what this is supposed to be...
I just liked the shape.
#!/usr/bin/perl -w $d="124x65x98x62x41 x35x66x41x88x105x103x104 x42x35x45x35x66x41x111x98x99x 104x118x115x102x42x35x45x35x66x41x 100x115x102x122x42x35x45x35x66x41x118x 111x113x121x115x102x42x35x42x60x103x112x115 x33x41x65x98x42x124x116x48x93x41x48x93x35x48x104 x60x116x48x93x42x48x33x93x35x48x104x60x117x115 x48x66x46x78x98x46x110x94x79x46x91x111x46 x123x94x48x79x46x91x111x46x123x94x66 x46x78x98x46x110x94x48x60x116x48 x79x48x113x115x106x111x117x48 x60x37x96x47x62x35x60x35x 60x102x119x98x109x41x37 x96x42x60x126x126"; for(split(/x/,$d) ){$a.=chr($_-1) ;}eval($a);
Hopefully not too obvious what's going on.

Darkling.
think

Replies are listed 'Best First'.
Re: Just another silly pattern
by smgfc (Monk) on Feb 18, 2002 at 02:25 UTC
    You have an "x" deliminated (did I just make that word up?) string ($d) of the output of
    chr() - 1
    on every character of your original code. And on that topic your original code is: {@a=("A(Whfg)","A(nabgure)","A(crey)","A(unpxre)");for (@a){s/\(/\"/g;s/\)/ \"/g;tr/A-Ma-m]N-Zn-z]/N-Zn-z]A-Ma-m]/;s/N/print/;$_.=";";eval($_);}} You take every element of @a and first turn the { into " and the } into a space and a " so:
    A(Whfg)
    becomes ( s/\(/\"/g )
    A"Whfg)
    becomes ( s/\)/ \"/g )
    A"Whfg "
    then you use tr/A-Ma-m]N-Zn-z]/N-Zn-z]A-Ma-m]/ to turn
    A"Whfg "
    into
    N"Just "
    this works because it replaces a character, for example W, with its complement (kinda broke explanation :) i.e. W is the 10th character in N-Z, and J is the 10th character in A-M, so J replaces W. It is case insensitive because you say both A-M and a-m, etc. Then
    N"Just "
    becomes ( s/N/print/ )
    print"Just "
    then ; is added to the end of the string by $_.=";"; and the string is evaluated! for my first explanation of a obfuscation, not that bad :)
      Hehe. I didn't think anyone would actually go through it and explain it.
      Yes, I admit it is a little obvious, but it was fun to put together.

      Darkling
        well, if its any concelation, i had alot of fun taking it apart.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-19 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found