Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

My first Obfuscated Perl Attempt

by Daruma (Curate)
on Aug 06, 2002 at 06:51 UTC ( #187952=obfuscated: print w/ replies, xml ) Need Help??

Greetings!!

This is my first attempt at obfuscated perl. Sorry about the extra long line... I couldn't figure out a way to put whitespace in there for readability without breaking the pack apart.
$_=pack"B416","0111000001110010011010010110111001110100001000000111000 +001100001011000110110101100100000001000100100001000110011001100100010 +001000101100001000000010001000110000001100010011000100110000001100010 +011000000110001001100000011000000110001001100010011000000110000001100 +000011000000110001001100000011000100110001001100010011000000110000001 +100000011000000110000001100010011000100110000001100010011000000110000 +0011000000100010";eval$_;

Update:
Thanks for the help, jynx. I have reworked it a bit base upon your advice...

$_='&&&011100&&&&&&&000&&&&&&111001001101001011&&&&011&&&&&&&&&&&&100 &&&&&&&&111&&&&&&&010&000&&&&100&&&&&&&&&&&&&&000&&011&&&&&&&&&&&&100 &&&&&&&&000&&&&&110&&&&&000&&101&&&&&&&&&&&&&&100&&011&&&&&&&&&&&&011 &&&&&&&&010&&&&110&&&&&&&010&000&&&&&&&&&&&&&&000&&100&&&&&&&&&&&&010 &&&&&&&&010&&&&000&&&&&&&100&011&&&&&&&&&&&&&&001&&100&&&&&&&&&&&&110 &&&&&&&&010&&&&001&&&&&&&000&100&&&&&&&&&&&&&&010&&110&&&&&&&&&&&&000 &&&&&&&&100&&&&0000010001000&110000001100010011&&&&000100110000001100 &&&&&&&&010&&&&0110000001100&0100110000001100&&&&&&000011000100110001 &&&&&&&&001&&&&100&&&&&&&000&011&&&&&&&&&&&&&&&&&&&000&&&&&&&&&&&&000 &&&&&&&&110&&&&000&&&&&&&001&100&&&&&&&&&&&&&&&&&&&000&&&&&&&&&&&&011 &&&0&&&&001&&&&001&&&&&&&100&000&&&&&&&&&&&&&&&&&&&011&&&&&&&&&&&&000 &&10&&&&011&&&&000&&&&&&&100&110&&&&&&&&&&&&&&&&&&&001&&&&&&&&&&&&001 &&100&&&000&&&&011&&&&&&&000&000&&&&&&&&&&&&&&&&&&&110&&&&&&&&&&&&000 &&&&001100&&&&&000&&&&&&&011&000&&&&&&&&&&&&&&&&&&&000&&&&&&&&&&&&110 &&&&001001&&&&&100&&&&&&&010&011&&&&&&&&&&&&&&&&&&&000&&&&&&&&&&&&000 &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 11000100110000001100000011000000100010';s^\s|&^^g;eval pack"B416",$_;
Thanks for your support, Ovid. I hope this version is a wee more obfuscated. (Just looking at binary long enough makes my eyes cross...)

-Daruma

Comment on My first Obfuscated Perl Attempt
Select or Download Code
Re: My first Obfuscated Perl Attempt
by jynx (Priest) on Aug 06, 2002 at 19:19 UTC

    For further reference,

    There are many techniques for breaking up long lines, the two most common seem to be:

    • Concatenation
      Concatenating seperate lines together with the dot allows you to break things up, but it requires each seperate piece to be quoted.
    • Substitution
      You can also just run the string past a substitution that eliminates newlines, which seems to be the more common method for lines as long as what you have there.
    Applying each technique you could either get:
    # concatenation eval pack"B416","0111000001110010011010010110111001110100001000". "00011100000110000101100011011010110010000000100010010000100011". "00110011001000100010001011000010000000100010001100000011000100". "11000100110000001100010011000000110001001100000011000000110001". "00110001001100000011000000110000001100000011000100110000001100". "01001100010011000100110000001100000011000000110000001100000011". "000100110001001100000011000100110000001100000011000000100010";;; # -or- # substitution $_="011100000111001001101001011011100111010000100000011100000110 0001011000110110101100100000001000100100001000110011001100100010 0010001011000010000000100010001100000011000100110001001100000011 0001001100000011000100110000001100000011000100110001001100000011 0000001100000011000000110001001100000011000100110001001100010011 0000001100000011000000110000001100000011000100110001001100000011 000100110000001100000011000000100010";s;\s;;g;eval pack"B416",$_
    Please excuse my penchant for making each line of similar length :)

    jynx

Re: My first Obfuscated Perl Attempt
by Ovid (Cardinal) on Aug 07, 2002 at 00:26 UTC

    This is not a response to your obfu, but a general question for Monks: why is this being downvoted? Is it because it's not very obfuscated? I don't see that as being a great reason.

    Generally, when someone makes a "this is my first obfu" post, I give them a ++. Why? Because there's no need to be critical of the patience and love that someone's poured into their effort. If it was plagiarism or offensive, I could see a --, but it's neither. If you don't like it, just ignore it and move on.

    Side note: my first obfu's weren't very obfuscated either.

    Cheers,
    Ovid

    Update: while it's not immediately obvious now, the obfu was as -3 when I wrote this.

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Re: My first Obfuscated Perl Attempt
by mtve (Chaplain) on Aug 07, 2002 at 07:50 UTC
    silly variation:
    eval pack'B*','~___~$$$$###$~_~~_#$#$$#$##$###~~__#$#$~~~_~~~$$$#__~~~ +~~__ ~~~_~__~~~_#$##~_~_#$$#~~###$_~~~$#$$~_~_~_~$$#$~_##$$_~__~~~#$$#~_~~_ +__ _~_~_~_~~__$###~_~$$#$~~~~#$##~__#$$#~~____~###$_~$$#$~_~~~~_#$$#~_~_ ####_~_~_~$$$$~__$$$$$#$#$$#$$#_~##$$$#$#####$_~~_$$$$##$$$$#$#$$~~__~ +__~_ _#$$##$$$$$##_~~#$$$__~~~~~~##$$~$$$#_~~~~~~__~~~_$$##~~~_~~_#$$$~~~__ +~~~_'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2014-10-21 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (111 votes), past polls