Perl: the Markov chain saw PerlMonks

### Easier than it seems

by Hue-Bond (Priest)
 on May 07, 2006 at 16:22 UTC Need Help??

```use warnings; use strict;                                   "ad space
+available"
=~/(.){6}\S+ a(.){6}/;%}=(\$=/=(\$=/\$+[++\$|]),\$.=(\$;=\$=/(\$,=++\$|+\$|))-\$,
+,\$;,\$=,\$,,
\$;,\$.,\$,,\$=+\$.,\$|--);sub e{my(\$s,\$w,\$x,\$y,\$z,\$c)=((join'',map{chr}\$}{\$
+;}*\$}{\$;}*
\$}{\$}{\$.}}+\$}{\$}{\$}{\$.}}}+\$}{\$=},\$}{\$}{\$,}}*\$}{\$}{\$,}}*\$}{\$}{\$.}}+\$}{\$
+;}+\$}{\$=}-
\$}{\$}{\$.}},\$}{\$;}*\$=*\$}{\$,}+\$}{\$;}+\$}{\$=}-\$}{\$}{\$.}}+\$}{\$.},\$}{\$;}*\$}{
+\$;}*\$}{\$,}
-\$}{\$}{\$.}},\$=*\$}{\$;}*\$}{\$,}-\$}{\$,}+\$}{\$}{\$.}}+\$}{\$.},\$}{\$;}*\$}{\$;}*\$}
+{\$,}+\$,*\$}
{\$,}+\$}{\$.},\$}{\$}{\$,}}*\$}{\$;}*\$}{\$,}-\$}{\$}{\$,}},\$}{\$;}*\$}{\$}{\$,}}-\$}{\$
+.}-\$}{\$.},
\$}{\$}{\$,}}*\$}{\$;}*\$}{\$,}+\$}{\$}{\$,}}-\$}{\$=},\$}{\$.}**(\$}{\$;}+\$}{\$=})-\$}{
+\$,}-\$}{\$=}
,\$}{\$;}*\$}{\$}{\$,}}+\$}{\$=},\$}{\$;}*\$}{\$}{\$,}}*\$}{\$,}+\$}{\$}{\$,}}+\$}{\$=},\$
+}{\$}{\$,}}*
\$}{\$;}+\$}{\$=},\$}{\$;}*\$}{\$}{\$,}}*\$}{\$,}+\$}{\$}{\$,}}+\$}{\$=},\$}{\$;}*\$}{\$}{
+\$,}}+\$}{\$=
},\$}{\$;}*\$}{\$}{\$,}}*\$}{\$,}+\$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=}}}}\$g;

--
David Serrano

Replies are listed 'Best First'.
Re: Easier than it seems
by teamster_jr (Curate) on May 08, 2006 at 13:11 UTC
I couldn't sleep last night and started deobfuscating this. This is very rough and i haven't investigated too closely how it actually does stuff - just ran perltidy, then dropped some basic substitutions and dropped prints in certain places but of course i could be wrong :)
a
(ie the third and fourth arguments with "e" in the middle)

Yes. I wanted to insert some dummy code that used the other variables but forgot it :^). Now I think it was a good thing because otherwise that code would stand out among the rest. I also wanted to give the code a dollar shape, but didn't (and don't) know how.

As for the generation of the code, turo, it wasn't automatic. Just search and replace here and there.

--
David Serrano

no automation? ... umm, maybe you're the automated machine :-P
good obfuscation though!

cheers

perl -Te 'print map { chr((ord)-((10,20,2,7)[\$i++])) } split //,"turo"'
Re: Easier than it seems
by turo (Friar) on May 08, 2006 at 12:39 UTC

is a new ciphering method?, you made it at hand or was another script of yours who made it?

oh my god! is chaotic!

perl -Te 'print map { chr((ord)-((10,20,2,7)[\$i++])) } split //,"turo"'

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2018-02-23 06:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
When it is dark outside I am happiest to see ...

Results (300 votes). Check out past polls.

Notices?