UBB.Dev
Posted By: el84 Obfuscated perl challenge #2 - 03/29/2001 1:10 AM
This contest open to everyone, including Mark and Charles [Linked Image]

Code
code:

Explain how this code works.
Posted By: Jamin Re: Obfuscated perl challenge #2 - 03/29/2001 1:30 AM
I bet it takes .00003 cents out of every transaction completed in tne New York Stock Exchange, and then sends that money into an offshore holding account in the Caymans that only I know the twenty-seven digit password to. laugh

---Skorpion
Posted By: @ragorn Re: Obfuscated perl challenge #2 - 03/29/2001 3:45 AM
Aha! But I have also figured out the twenty-seven digit password! And Im getting rich! rich! rich!

***dances about, chanting "Can't fool me Im the gingerbread man!"***
laugh
Posted By: Mark Badolato Re: Obfuscated perl challenge #2 - 03/29/2001 4:08 AM
from a very quick look I see the q* *; and q! !; so those combined with the evals lead to the actual perl code for print "Just another Perl hacker" being constructed within. then evaling on the completed string issues the print.

I don't have time do decipher the actual statement construction right now, but looks like you put a lot of effort into it.

--mark
Posted By: Greg Hard Re: Obfuscated perl challenge #2 - 03/29/2001 4:43 AM
i'll come up with part 3 tommorow. wink tipsy
Posted By: el84 Re: Obfuscated perl challenge #2 - 03/29/2001 6:33 AM
You have the general idea, Mark. Actually, it took a little more than an hour to write.

That last eval is only there because I wanted to break the program into separate lines - avoiding the wide UBB display annoyance. I had to escape all the backslashes between q* and *; because of that.

I made a program to create the encrypted message. First used sprintf to convert the "Yet another..." message to octal. Tacked the string "print eval" in front of that (with a little trick to get eval to work properly), then used sprintf again to convert that string to octal. Then used the y/// thingy to turn the octal representation to punctuation charaters. From there, it was pretty simple to add the decryption stuff.

I'll post the encryption and test code if anyone wants to see it.

The hard part was figuring when to escape and when not to escape.
Posted By: @ragorn Re: Obfuscated perl challenge #2 - 03/30/2001 3:03 AM
Phew! It amazes me how you people can come up with such complicated code! My general knowledge is with PHP, so I honestly wouldn't have a clue as to how you did that or deciphered it.

Cool though, all the same. laugh
© UBB.Developers