Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

cog (4665)

Journal of cog (4665)

Wednesday April 21, 2004
02:45 PM

obfuscated code

[ #18423 ]
It was really just an example I did for some friends, and also my first real attempt at obfuscating something (I usually do it without really trying...)

Input:
10 20
9 21
11 19
5 10
10  3
2 10

Output:
7.83333333333333 13.8333333333333

Basically, we want to find the average coordinates (average for the first number and also for the second...)

My attempt:
#!/usr/bin/perl -nl
$$$$;END{eval};$$$$
;m;(?<!^) +;;$;+=$`
;$$$;;$: +=$';;$$$;
;}{;$_.="\x70\x72".
"\x69\x6e\x74\x28".
"\x24\x3b\x2f\x24".
"\x2e \x2c\x22\x20".
"\x22\x2c\x24\x3a".
"\x2f\x24\x2e\x29";

Oh, the file has 200 bytes O:-)

(just noticed... there's a space on the third line from the bottom that shouldn't be there... gotta go, bye)

(f***, and some of those input lines should have spaces in their beginning)
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.