Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Will I Hack Something New?

by jake (Pilgrim)
on Sep 18, 2002 at 05:34 UTC ( [id://198743]=obfuscated: print w/replies, xml ) Need Help??

1 year, 2 days since my last obfu. Hope I'm not too rusty. :)
$q="WillIHackSomethingNew"; @@=( ' u sj ', ' ', ' t ', ' ', ' e r a n ', ' ', 'p err e ho t', ' k c ', ' l ', ' ', ' h a ') ;$;=$/=(1==21);$==$-=2;$=*= $==++$=;$.='';$$=$-;;while( $q=~/(.)/g){$..=_($;,$=);$: =ord($1);$%=4;$$++;if($:%$% ==0){$;+=$-}if($:%$%==1){$= +=$-}if($:%$%==2){$;-=3}if( $:%$%==3){$=-=3}$/++;}while ($.=~/(.)/g){print" $1";}; sub _{$^= substr($@[$_[0]], $_[(1!=1.01)],(1.01!=1));};

Replies are listed 'Best First'.
Self Criticism
by jake (Pilgrim) on Sep 18, 2002 at 15:15 UTC
    There are a few things I like about this obfu. But in general, there are a lot of things that bug me. The first being that it could have been a lot better.

    Let's start with the phrase "WillIHackSomethingNew". It seemed appropriate when I started, since I was kinda curious if I could. Plus I needed a sentence exactly that length. It doesn't exactly roll of the tongue. And I feel that this statement has no relationship to the rest of the composition. I like to have the process of the code resemble the output or the code itself. Like this obfu.

    I like the way I presented the content of @@. I wanted the source of my output (j.a.p.h.) to be obvious, while obfuscating the process for extracting the data.

    But the process is where I really have my issues. The control structures are way obvious. Especially the if statements. I basically do the exact same thing 4 times in a row. And there is nothing special about the while statements. The only thing that obfuscates these are things like using strange scalars (i.e. $:%$%==1) and embedding the control structures into one continious block of code.

    sub _ is right out!

    I am happy with two things with this block of code. It is almost completely solid, using only one unnecessary ' ' and ony unnecessary ';'. And I had fun with the first two lines:
    ;$;=$/=(1==21);$==$-=2;$=*= $==++$=;$.='';$$=$-;;while(
    I like the overall idea. I'm sure I will make a second attempt sometime soon.

    jake
      I'm much happier with this than the original.
      {$~="WillIHackSomethingNew" ;@@= ( ' u sj ' , ' ' , ' t ' , ' ' , ' e r a n ' , ' ' , 'p err e ho t' , ' k c ' , ' l ' , ' ' , ' h a ' ) ;$;=!1;$==$-=2;$=*=$==++$=; $$=$-;$}=$--1;$%=$$*$-;$|=! 0;$x=' '}while($~=~/(.)/g){ ;print$x x$-.substr($@[$;], $=,$|);$:=ord($1); if($:%$% ==($%==$-)||$}==$:%$%){$;+= $-*($}-$:%$%);$=+=$-*$:%$%; }$=-=$:%$%*($:%$%==-$}+$%); $;-=++$:%$%*($$+$|==$:%$%)}
      I guess I was a tad rusty. :)
Re: Will I Hack Something New?
by jynx (Priest) on Sep 18, 2002 at 17:39 UTC

    While i'm certain you can do much better,

    here's what my spin would be:

    $q="WillIHackSomethingNew"; @@=( ' u sj ', ' ', ' t ', ' ', ' e r a n ', ' ', 'p err e ho t', ' k c ', ' l ', ' ', ' h a ') ;$==$-=$^F;$=*=$==++$=;map{ $..=substr$@[$;],$=,1;$;+=! ($_=(ord)%4)?$-:$_-$^F?q::: -3;$=-=/3/?3:/1/?-$-:q;;}$q =~m;.;g;print join"$\"$\"", $.=~/./g,chr++$;+$;++- --$|
    hmm, that's probably easier to read. *sigh* oh well, it was fun...

    jynx

Log In?
Username:
Password:

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

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

    No recent polls found