Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

First attempt.

by abitkin (Monk)
on Aug 12, 2002 at 05:46 UTC ( [id://189386]=obfuscated: print w/replies, xml ) Need Help??

Here's something fun for all those people at OSU It's my first obfuscation code, so be nice.
#!/usr/local/bin/perl $b=sprintf("%02X",ord("\n"));while(<DATA>) {s/$b.*/$b/g;(split(//,$_));@a=();while( $#_>-1){$_=shift(@_);$_.=shift(@_);if( /G([0-9])/){for$i(2..int($1)){foreach$l (reverse(@a)){unshift @_,$l;}}$_="";}@a= split(//,$_);print chr(hex($_));}} __END__ 20G52E2D22G32D2E5FG220G30A20G52E2D22G32D22 20G42F202020G427206F275C200A20G52E2D22G322 20G22C2D3B20G2272E20G23A20G35F630A20G52E2D 203A5F2E225C2E5F2029203AG22D2220G20A20G52E 20G822G26D20226D20G30A20G52E2D22G32D220G52


Whoops, found an error, here's the new code:
#!/usr/local/bin/perl $b=sprintf("%02X",ord("\n"));while(<DATA>) {s/$b.*/$b/g;(split(//,$_));@a=();while( $#_>-1){$_=shift(@_);$_.=shift(@_);if( /G([0-9])/){for$i(2..int($1)){foreach$l (reverse(@a)){unshift @_,$l;}}$_="";}else{ print chr(hex($_));}@a=split(//,$_);p}} __END__ 20G72E2D22G22D2E5FG220G30A20G52E2D22G32D22 20G52F2020G427206F275C200A20G52E2D22G32222 20G22C2D3B20G2272E20G23A20G35F630A20G52E2D 203A5F2E225C2E5F2029203AG22D2220G20A20G52E 20G822G26D20226D20G30A20G52E2D22G32D220G52

Log In?
Username:
Password:

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

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

    No recent polls found