Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Yearbook fun

by Xavier (Novice)
on Feb 04, 2000 at 04:06 UTC ( #2825=obfuscated: print w/replies, xml ) Need Help??

In my highschool's yearbook, we are allowed a 25x10 grid in which we can write whatever we want (provided you pass the yearbook's censorship, of course). So, I figured I'd fill the grid with some nice, slightly obfuscated perl code. :-)
$a="User-Agent:PlMk";$u=" ";$h="GET / HTTP/1.\n";$u =~s/\n//gs;$d=`echo "$h$a "|nc $u 80`;$d=~s/.+?ml\r (.+)/$1/s;$d=~s/\n+|\s+ \ / /gsx;$d=~s/<a.+?f="(.*? )">(.+?)<\/a>/$2($1)/sgx; $d=~s/<(br|p|li)>/\n/g;$d =~s/<.+?>//gsx;print"$d";
ok, so I cheated a little bit by using "nc", but it's necessary with this little room for code.

Replies are listed 'Best First'.
What is nc?
by Anonymous Monk on Feb 04, 2000 at 15:40 UTC
    What is "nc"? For me, it's the NEdit Client.
      nc is a great little program called netcat. you give it a hostname and a port and it will open a bi-directional link to that. nc localhost 80 allows you to talk directly to the http server, for example. unless you really want to learn http 1.1 you're better off using the perl modules out there for accessing internet services.
RE: Yearbook fun
by Anonymous Monk on Feb 07, 2000 at 16:09 UTC
    So what exactly does this little proggie do?
by Anonymous Monk on Feb 06, 2000 at 02:25 UTC
    Can you really call it obfuscated if the only thing that's been done to obfuscate it is removing all the linebreaks? They just take a moment to put back in, and then your code is as clear as day.
      Yeah, true. hence the "slightly obfuscated" bit at the top of my post. I posted it here, but then noticed that the Craft section exists. Ahh, well. It's still somewhat of a puzzle to work through: it uses some obfuscation tricks such as using the linebreaks that are already there due to the form as a functional part of the code. (there's a string with "\r " where the linebreak of the code itself is used instead of \n) there are also a few ugly regexps there.
RE: Yearbook fun
by Anonymous Monk on Apr 20, 2000 at 20:46 UTC
    Sorry, I wouldn't even call this obfuscated.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2021-01-16 09:07 GMT
Find Nodes?
    Voting Booth?