Your skill will accomplishwhat the force of many cannot PerlMonks

### Cursed Map

by kilinrax (Deacon)
 on Jun 07, 2001 at 23:57 UTC Need Help??

```#!/usr/bin/perl -w

use
strict;sub
p{\$_="\c];\a
\3SE\\$\5!.\f)
Ut4)\aHI#\5\f%)
"; y< \n>++d;@_
=/.+?(?=\d|\$)/gm;
\$==    \$|;    ;y
,"-/   ,\f-   ,;
\$;    =\$_    ;;
;y{;E!\a4.;@
\0-z} ^</*:>
nb^d;;
; map {s
}\W # }}xg
;}      @_;
@_=   map
{        chr ((\$       ==
@{[/       ./gx        ]})
?(\$-=                  ++\$=
**3,\$%+=              \$-,)[0]:
\$%/2)}@_        ,q++;map
{s[(.)    ]~@_=
map{\$_^\$',\$
_^\$+}@_~ex
;}/../g ;\${;}
=~s{.}%     map{\$_^=
\${&}}@_;\$\          .=shift()
;%ges;              \$\.=\$/;
print                 \$';
}                     p
Update: Changed "\r" as it was causing portability issues (kilinrax)
Second Update: Re-written, fixed, and tested for MacPerl (kilinrax)
Third Update: Neatened up 'bones' (kilinrax)

Replies are listed 'Best First'.
Re: Cursed Map
by iamcal (Friar) on Jun 08, 2001 at 12:39 UTC
waaaaay to complicated for me. the best analysis i can do is:
```#
# use strict
#

use strict;

#
# the japh has one sub routine which it calls once
#

sub p{

#
# First we set up \$_. nothing dodgy here except it contains whitespace
#

\$_="\c];\a\3SE\\$\5!.\f)Ut4)\aHI\r\5\f%)";

#
# here's were the nasty delimiters start
#
# this is actually "y| \n||d;" which removes all spaces and carriage
# returns from \$_
#
# \$_ contains the following chars: (decimal)
# 29 59 7 3 83 69 36 5 33 46 12 41 85 116 52 41 7 72 73 13 5 12 37 41
#

y< \n>++d;

#
# do some tricky regexp stuff which actually evaluates to
#
# @_ = /(.{14})(.{10})/;
#

@_=/.+?(?=\d|\$)/gx;

#
# set \$= to 0
#

\$==\$|;

#
# transliterate \$_ so that it equals: (decimal)
# 29 59 7 3 83 69 14 5 33 24 12 19 85 116 52 19 7 72 73 13 5 12 15 19
#

y,"-/   ,\f-   ,;

#
# assign the string in \$_ to \$;
#

\$;=\$_;

#
# a transliteraion i can't decode makes \$_ equal to: (decimal)
# 60 58 47 42 62 58
#

y{;E!\a4.;@\0-z} ^</*:>nb^d;

#
# some semicolons
#

;;

#
# remove non alpha numerics from @_
# @_ = ('SEUt','4HI');
#

map {s}\W # }}xg;}@_;

#
# do a scary map on @_,'' to get chr(83),chr(52),chr(0)
#

@_=map{
chr( (\$==@{[/./g]}) ? (\$-=++\$=**3,\$%+=\$-)[0] : \$%/2 );
}@_,'';

#
# replace pairs of characters in \$_ with perl expressions and evaluate
+ them
# @_ = qw|W S R V Q U T P j n o k l h i m t p q u r v w s|;
#

map{
s[(.)]~@_=map{\$_^\$',\$_^\$+}@_~e;
}/../g;

#
# go through each char of \$;, doing a binary XOR with the string at \$_
#
# \$\ ends up equal to 'Just another Perl hackerJust another Perl hacke
+r'
#

\$;=~s{.}%map{\$_^=\$&}@_;\$\.=shift;%ge;

#
# slap a line ending on \$\
#

\$\.=\$/;

#
# print what followed the last regexp match
#

print \$';

#
# end the sub
#

}

#
# call it
#

p;
Ripping Apart the Cursed Map
by Mr. Muskrat (Canon) on Aug 22, 2003 at 21:19 UTC

I was reading kilinrax's website the other day (nice layout BTW) and I noticed something on the obfuscations page. It says that Cursed Map "has yet to be successfully de-obfuscated by anyone."

Well, I took that as a challenge whether it was meant that way or not!

I had quite a bit of fun tearing this apart. I truly hope that I have successfully de-obfuscated it. I have to admit that it took longer than I initially thought that it would.

If you want to figure out Cursed Map for yourself, stop reading now!

Re: Cursed Map
by adamcrussell (Hermit) on Jun 10, 2001 at 05:25 UTC
Cursed indeed!! Especially if you are running MacPerl. MacPerl takes \r (ASCII 13) and automagically gives you a line feed (ASCII 10). Due to this, under MacPerl this obfuscation yields
Just another Perl hfdlbu

Create A New User
Node Status?
node history
Node Type: obfuscated [id://86705]
Approved by root
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2018-02-20 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
When it is dark outside I am happiest to see ...

Results (267 votes). Check out past polls.

Notices?