hmm... you could take a look at the obfuscated area, read
the comments to get an idea what is considered "good" ofuscation.
have a look at the winners of the annual perl journal's obfuscation
contest. go to tpj.com and search for
obfuscated.
but then, the best obfuscation (imho) is to do something no
one has done before you. just copy/pasting from other obfuscated
code aint fun.
general guidelines? hm... what comes to my mind is:
- use functions and variables that are seldomly used
- use strange side effects
- remove white space
- don't use variable names that make any sense
- mislead the reader of your code (make it looking like something it isn't)
- have fun!
just my 2 cents
sc
:wq | [reply] |
You forgot obfuscated logic!
I usually print backspace characters in loops just to keep it tricky. I think obfuscated code shouldn't only be hard to read, but it should be hard to follow as well!
And that's my R$ 0.02 (Brazilian cents)...
| [reply] |
so perl obfuscation is something like not following the
standard pattern of programming.... and probably it's purpose
is to mislead the reader of the code w/c also happend to me.
well thanks, i guess there is no such thing as guidelines on
how to write obfuscated codes in perl.
| [reply] |
While I can't answer for sure as to guides, I can tell you that if you are beginning programming, obfuscation is not something you want to get into. First learn to write clear, concise, functioning, commented code; then later if you're still interested, reverse all of those things, and you'll have obfuscated code. | [reply] |
Well, reverse all of them except the "functioning" part :) You do still need that.
| [reply] |
| [reply] |
Try to avoid using pack and ord too obviously.
There are a too many 'obfuscated' examples out there
using that method already.
| [reply] |