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

First Obfu

by Petras (Friar)
on Jun 30, 2003 at 13:26 UTC ( #270164=obfuscated: print w/ replies, xml ) Need Help??

Can someone check for me if this works on *nix systems? It's my first obfu....
#! /usr/bin/perl/ use strict;my $string="~^^..o^.(_)^X.#^~^^..o^.//^X.#^~^^..o_r^.(_.^X. +#^~^^..o.r^.//^X.#^~^^..o_er^.(_.^X.#^~^^..o.er^.//^X.#^~^^..o_ker^.( +_.^X.#^~^^..o.ker^.//^X.#^~^^..o_cker^.(_.^X.#^~^^..o.cker^.//^X.#^~^ +^..o_acker^.(_.^X.#^~^^..o.acker^.//^X.#^~^^..o_hacker^.(_.^X.#^~^^.. +o.hacker^.//^X.#^~^^..o__hacker^.(_.^X.#^~^^..o._hacker^.//^X.#^~^^.. +o_l_hacker^.(_.^X.#^~^^..o.l_hacker^.//^X.#^~^^..o_rl_hacker^.(_.^X.# +^~^^..o.rl_hacker^.//^X.#^~^^..o_erl_hacker^.(_.^X.#^~^^..o.erl_hacke +r^.//^X.#^~^^..o_Perl_hacker^.(_.^X.#^~^^..o.Perl_hacker^.//^X.#^~^^. +.o__Perl_hacker^.(_.^X.#^~^^..o._Perl_hacker^.//^X.#^~^^..o_r_Perl_ha +cker^.(_.^X.#^~^^..o.r_Perl_hacker^.//^X.#^~^^..o_er_Perl_hacker^.(_. +^X.#^~^^..o.er_Perl_hacker^.//^X.#^~^^..o_her_Perl_hacker^.(_.^X.#^~^ +^..o.her_Perl_hacker^.//^X.#^~^^..o_ther_Perl_hacker^.(_.^X.#^~^^..o. +ther_Perl_hacker^.//^X.#^~^^..o_other_Perl_hacker^.(_.^X.#^~^^..o.oth +er_Perl_hacker^.//^X.#^~^^..o_nother_Perl_hacker^.(_.^X.#^~^^..o.noth +er_Perl_hacker^.//^X.#^~^^..o_another_Perl_hacker^.(_.^X.#^~^^..o.ano +ther_Perl_hacker^.//^X.#^~^^..o__another_Perl_hacker^.(_.^X.#^~^^..o. +_another_Perl_hacker^.//^X.#^~^^..o_t_another_Perl_hacker^.(_.^X.#^~^ +^..o.t_another_Perl_hacker^.//^X.#^~^^..o_st_another_Perl_hacker^.(_. +^X.#^~^^..o.st_another_Perl_hacker^.//^X.#^~^^..o_ust_another_Perl_ha +cker^.(_.^X.#^~^^..o.ust_another_Perl_hacker^.//^X.#^~^^..o_Just_anot +her_Perl_hacker^.(_.^X.#^~^^..o.Just_another_Perl_hacker^.(_)^X.#^~^^ +..o..Just_another_Perl_hacker^.(_)^X.#^~^^..o...Just_another_Perl_hac +ker^.(_)^X.#^~^^..o....Just_another_Perl_hacker^.(_)^X.#^~^^..o.....J +ust_another_Perl_hacker^.(_)^X.#^~^^..o......Just_another_Perl_hacker +^.(_)^X.#^~^^..o......Just_another_Perl_hacker^.(_)^X.#^~^^..o......J +ust_another_Perl_hacker^.(_)^X.#^~^^..o......Just_another_Perl_hacker +^.(_)^X.#^~^^..o......Just_another_Perl_hacker^.(_)^X.#^~^^..o......J +ust_another_Perl_hacker^.(_)^X.#^~^^..o......Just_another_Perl_hacker +^.(_)^X.#^~^^.........Just_another_Perl_hacker^^...^^";my $charToPrin +t;sub printIndividual { my $n = shift; $charToPrint=substr($string,$n +,1); if ($charToPrint eq ".") { print " ";}elsif($charToPrint eq "^") +{print "\n";}elsif ($charToPrint eq "~"){select (undef,undef,undef,.2 +);system (CLS); } else{print "$charToPrint";}if($n<length($string)){p +rintIndividual(($n+1));}}printIndividual (0);

Cheers!
Petras

Replies are listed 'Best First'.
Re: First Obfu
by teamster_jr (Curate) on Jun 30, 2003 at 17:25 UTC
    yep, and me on freebsd. except system (CLS) doesn't work - it works if you replace it with print "\ec"; (for vt100 systems) or system "clear". al
      Thanks. I'll roam the monestary looking for branching based on shell. At first I wondered why people bothered with obfu. It's actually a great way to learn. And to learn what you need to learn. Appreciate the cross-system pointer.
      Cheers,
      Petras
      Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.

      -Howard Aiken
Re: First Obfu
by zentara (Archbishop) on Jun 30, 2003 at 16:22 UTC
    Works for me on linux.
      Thanks for checking. I'm quite a bit far from civilization (places with Linux boxes!), so all my Perl learning has been in a one-OS environment. Thanks for letting me know.

      Cheers!
      Petras
      Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.

      -Howard Aiken
Re: First Obfu
by cored (Scribe) on Jul 02, 2003 at 14:03 UTC
    That code kick ass, i love it, and the trick for handling delays with the clear screen method :D, you have my eternal vote :D
      It's kind of a throw back to the C64 days when you actualy had to buy a book to know where to poke sprites into place, so Ascii graphics and clrscr was the thing for animation! I might do some more like this. For better obfu, though, I should probably look into regexes for ways to hide the repeating string, "Just_another_Perl_hacker."
      Cheers!
      Petras
      Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.

      -Howard Aiken

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2016-08-27 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (380 votes). Check out past polls.