Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
On the last day of Christmas, Santa gave to me... an obfu to call my own

Ah, distinctly I remember, it was in the bleak December,... Gotta admit, he could've ment Christmas :)
Anyway, the idea has been spooking around in my head for several weeks now... I planned on posting it for my 500th post but I failed to complete it at that time...
#!/usr/bin/perl my$raven='print:unpack("u" ,q|=5&AE(%)A=F5N (&)Y ($5D9V%R($%L;& 5N( %!O90H`|);prin t: pack("H*","5 1 7 56f74682074 686 5 2072617665 6e203 a0a");ope n(LEN ORE,"<$0 ")||d ie$!;$b ird=q |never more| ;@say ing=sp lit( //,$bir d); <LENORE> ;< LENORE>;f o r(<LENORE> ){s|\S|\x3a |g;s|\x 20|$saying[i nt$t++ %9]|ge;p rint;}cl o s e (LENORE) ;';$_=$raven;$_=~s/\s//gx; $_=~s/\x3a/\x20/g;eval;;;;
And yes, this DOESN'T run under strict :)

The details
How I got here?
  1. Look for a picture of a bird on the net
  2. Scale it accordingly
  3. Use a perl script with GD to convert it to ascii art
  4. Think about obfu code
  5. Think about obfu code
  6. Think about obfu code
  7. Think about obfu code
  8. Think about obfu code
  9. Stuff obfu code in a file and test it
  10. Write perl script to fill obfu code into ascii art
  11. Cheat a bit til it fits properly
  12. write perl script to test obfu code
  13. Write perl script to post code to PM
  14. Wish EVERYONE a Merry Christmas and a happy new year!!
This is the snippet I used to shape the raven :)
#!/usr/bin/perl open(RAVEN,"<raven.txt"); # ASCII Art open(OBFU,"<obfu.pl"); #Store the obfu code here <OBFU>;<OBFU>; #ignore 2 lines $line=<OBFU>; #stff everything on 1 line please @stuff=split(//,$line); #split it up local $/=undef; $raven=<RAVEN>; #read ascii art $raven =~s/#/$stuff[$i++]/mge; #use # as marker for text open(OUT,">out.pl"); print OUT '#!/usr/bin/perl',"\n\n",$raven; #write it close(OUT);

Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.

In reply to The Raven by Beatnik

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found