Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Code to a Reaped Node

by magnus (Pilgrim)
on Feb 22, 2001 at 19:20 UTC ( #60213=obfuscated: print w/replies, xml ) Need Help??

okay, okay, so as a first attempt at obfuscation, it's not perfect...

however, when run it will produce the Ode to a Reaped Node to be found in the poetry section

...and just to make it more interesting, running the program will randomly give either one of the four verses, or the whole thing...

i know my time may come with the NodeReaper, so i'm just doing all i can to ease that transition...

this was an exersise in making code obfuscated by adding WAY more code than was necessary, instead of the reverse...

hope y'all enjoy, and let me know of any bugs...


#!/usr/local/bin/perl %p=(1,"ou", 2,"ing",3,"it", 4,"ev",5,"or",6,"of", 7,"th",8,"st",9,"be",10, "ode", 11,"ack",12, "er", 13,"ed",14, "to", 15,"as",16, "an", 17,"en",18, "in", 19,"ip",20, "w", 21,"y",22, "m", 23, "j",24, "l", 25," ",26, "\n", 31, "!",32,"v",33, "k" ,34, ":" ) ;sub a {$p {1 } =~ /\w/;$l{c1} =$& ; $p{1}=~/\w$/ ;$l { c2}=$&;$p{2}=~ /\w$/; $l{c3}=$&;$p{4} =~/\w/; $l{c4}=$&;$p{5}=~ /\w$/;$l{ c5}=$&;$p{6}=~/\w$/; $l{c6}=$&; $p{7}=~/\w$/;$l{c7}= $&; $p{9} =~/\w/;$l{c8}=$&;$p{11 }=~ /\w/ ;$l{c9}=$&;$p{11}=~/c/;$l { c10}= $&;$p{13}=~/\w$/;$l{c11}=$&; $p{14} =~/\w/;$l{c12}=$&;$p{15}=~/\w$/ ;$l{c13 }=$&;$p{17}=~/\w$/;$l{c14}=$&;$p{ 19}=~/\w/;$l{c15}=$&;$p{19}=~/\w$/;$l{c16} =$&;$p{27}=reverse$p{3};$p{28}=reverse$p{ 12};$p{29}=reverse$p{15};$p{30}=reverse$p {19};return(%l) ; }sub b { $s1="$l{c1}" . "$p{25}$p{20}$l{c1}$l{c4}$p{31}$p{25}" . "$p{14}$p{25}$p{21}". "$p{1}$p{25}$p{16}" ."$l{c11}$p{25}$p{14}$p{25}$p{21}$p{1}". "$l{c5}$p{25}$l{c14}$p{10}$p{26}";$s2 = "$p{6}$p{25}$p{22}$p{13}$p{3}$l{c9}" . "$p{27}$l{c1}$l{c14}$p{25}$p{5}$p{25}". "$l{c8}$p{3}$l{c13}$p{25}$p{6}$p{25}". "$l{c10}$p{10}$p{26}$p{26}";print"$s1"; print"$s2";}sub c {$s3= "$l{c6}$p{5}". "$p{25}$p{4}$p{17}$p{25}"."$l{c15}$l{c6}". "$p{25}$p{3}$l{c13}$p{25}$l{c5}$p{19}$l{c4}". "$p{25}$p{20}$p{3}$l{c7}$p{25}"."$l{c7}$p{11}". "$p{2}$p{26}";$s4="$p{3}$p{25}$p{20}$p{15}$p{25}". "$p{23}$l{c2}$l{c11}"."$l{c3}$p{13}$p{25}$l{c8}$p{21}". "$p{25}$l{c1}$p{7}$p{12}$l{c13}$p{25}$p{15}$p{25}$l{c13}". + "$p{4}". "$p{12}$p{24}$p{21}$p{25}$p{24}$p{11}$p{2}$p{26}$p{26}";pri +nt "$s3";print "$s4"; }sub d {$s5="$p{28}$l{c3}$l{c9}$l{c5}"."$l{c11}$p{24} +". "$l{c4}$l{c13}". "$l{c13}"."$p{25}$p{6}$p{25}$l{c14}$l{c1}$p{32}$l{c15}$l{c10} +". "$l{c4}$p{25}". "$p{5}$p{25}$p{29}$p{18}$l{c12}$p{25}$l{c2}$l{c16}$p{25}$l{c7} +" . "$l{c15}$l{c3}". "$l{c7}$p{26}"; $s6 = "$p{21}$p{1}$l{c5}$p{25}$l{c16}$l{c1}$p{8 +}" . "$p{2}"."$p{25}". "$l{c15}$l{c13}$p{25}$p{23}$l{c2}$p{8}$p{25}$p{16}$l{c1}$p{7}$p{ +12}". "$p{25}$l{c10}". "$l{c7}$p{12}$l{c5}$p{21}$p{25}$p{30}$l{c4}$p{26}$p{26}";print"$s +5";print"$s6";}sub e { $s7="$l{c13}$l{c1}$p{25}$p{7}$p{1}$l{c3}$l{c7}$p{25}$p{18}$p{25}$l{c1 +6}$p{12}$p{24}$p{25}". "$p{3}$p{25}$p{22}$l{c9}$p{21}$p{25}$p{9}$p{25}"."$p{8}$l{c4}$l{c4}"." +$l{c16}$p{13}$p{26}";$s8= "$l{c12}$l{c9}$p{33}$l{c4}$p{25}$l{c9}$p{25}$l{c3}$p{16}$l{c11}$p{12}$ +p{34}"."$p{25}$p{21}$p{1}". "$l{c5}$p{25}$l{c14}$p{10}$l{c13}$p{25}$p{9}$p{17}$p{25}$p{28}$l{c9}$l +{c16}$p{13}$p{31}$p{26}"; print"$s7";print"$s8";}%l=&a();srand;$n=int(rand 5);if($n==0){&b;}elsi +f($n==1){&c;}elsif($n==2){ &d;}elsif($n==3){&e;}else{&b;&c;&d;&e;}

Replies are listed 'Best First'.
Re: Code to the Reaped Node
by bobione (Pilgrim) on Feb 22, 2001 at 20:45 UTC
    Your obfuscated is very good but I found a syntax error at the end near :
    $n=int(rand 5)if($n==0)
    Which should be :
    $n=int(rand 5);if($n==0)

    BobiOne (PERL bless me)
      thanks... corrected

Re: Code to a Reaped Node
by TStanley (Canon) on Feb 22, 2001 at 21:03 UTC
    This ROCKS!! Great job magnus!

    In the end, there can be only one!
Re: Code to a Reaped Node
by Animal (Sexton) on Mar 05, 2001 at 12:08 UTC
    wow..... this rocks!! quite the artiste :)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2022-05-23 10:38 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (81 votes). Check out past polls.