Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Do the dishes

by tye (Sage)
on Apr 03, 2001 at 04:34 UTC ( #69153=obfuscated: print w/replies, xml ) Need Help??

My first non-colaborative obfu. The terms "messy" and "kitchen sink" come to mind (hence the title) because it lacks a clean and consistant design. But maybe that is a good thing in this case?

#!/usr/bin/perl -w use strict; 0123 =~ m #\d+# $8.$; * $= sub{ },eval{%[=[1]-> [1,$& /=[*]=\ &$,1] ->[1]]%0}=>* += sub {warn qq.@_\...$/}; $..=$[.[* *=\&],& + (map{&*(*(=\$_,y No UsingOf&DeparseN021Quench JagVPN&y&&&=>&*(*)=\$_) );(crypt$),$()=~/([^Zip 021]+)/}qq(Dia;(eg*pO)o (rn#g'\(fesUo))=~?([^ (2]+)?gx)]
        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: Do the dishes
by Adam (Vicar) on Apr 03, 2001 at 05:13 UTC
    Very cool. I especially like the "No Using Of Deparse". Clever. Where was this ingenuity when we were working on OneWay???

      Well, since then the Monastery has taught me a lot of things I didn't really want to know :), for example I made good use of some tricks from your last obfu.

      Also, we were rather restricted when building OneWay because of the contest rules (doing something useful with a hard limit on number of characters).

              - tye (but my friends call me "Tye")
(jeffa) Re: Do the dishes
by jeffa (Bishop) on Apr 03, 2001 at 18:11 UTC
    If you squint your eyes just right, it looks like a profile
    of Duke Nuk'em smoking a Quench brand cigarette.
Re: Do the dishes
by MeowChow (Vicar) on Apr 04, 2001 at 01:12 UTC
    Great work, tye, and I see that you've enlisted our latest countermeasure :-)

    that's a hint, for those that are still scratching their heads...

       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print

      Thanks. I actually had a hard time finding that again using Super Search, but I'm glad I did. ;)

              - tye (but my friends call me "Tye")
Re: Do the dishes
by satchboost (Scribe) on Apr 04, 2001 at 02:23 UTC
    I am in awe. I spent the entire afternoon figuring this one out and all I can say is "Wow".

    I do have a few questions, if you don't mind.

    1) I understand that

    0123 =~ m #\d+# $8.$;

    is a NO-OP. I just don't understand how. I'm also assuming that the eval() right afterwards puts a semi-colon in right before, but I'm not sure why.

    2) How on earth did you get the crypt function to work the way you wanted it to?? Was it just random luck or did you brute force a whole bunch of possibilities until you got the ones you wanted?

    3) Why did you have to quote the No Using Deparse tr when using 'y'? Once I got it into tr///, it worked just fine, but leaving it in y/// didn't.

    If I could ++ this again, I would. I learned a ton from it. Thank you!

      First, I don't mind at all and I'm sorry for the long time it took me to respond.

      1) Actually that is vital for preventing a warning. And you've parsed it incorrectly (which is why you are confused about the semicolon). I knew I didn't do nearly enough with that construct when I found it!

      You see, I tried to use quite a few things that I didn't know before-hand how they would parse and that I was pretty sure I couldn't look up (Perl has quite a few of these). Those two lines are one of the best examples of that and I'm reluctant to just spill the beans on it as I hope to use it again in future. (: Besides, with just a bit of experimentation, anyone should be able to figure out what is going on.

      2) I wrote a Perl script to find those, of course (by brute force). Most of them took nearly no time since I only had to get about two characters to match. In fact, I had the script find the first 10 cases that work either with or without the salt prepended to the "password":

      print join " ",crypt("Ju-T","Ju"), crypt("-~","Ju") # produces: JustlAveUo0gg JustT9svpIBa.
      but the "password" for "another" took quite a while to calculate.

      3) I didn't understand this so I asked for clarification and got

      satchboost says when I took the '=> ...' out from y No ...N => ..., it wouldn't run. When I changed the 'y' to 'tr', it worked just fine. Why?
      You can take out the => if you replace it with a comma (or probably even a semicolon). The quoting nature of => isn't needed but you have to separate that expression (or statement) from the next. I can only assume that when you changed it to 'tr' you also did something to separate the expressions. But if not, show me the two cases and I'll be happy to help you figure it out.

              - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2020-07-07 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?