Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Spiro Japh 2

by ruoso (Curate)
on Sep 13, 2005 at 18:48 UTC ( [id://491660]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Spiro Japh 2
in thread Spiro Japh 2

Spoiler...

There is no much complicated obfuscation here, except by creating unnecessary subroutines and using weird names, such as "::" and "sub", and weird-looking names such as "O123" and "l234"... With only method and variable names modifications, I could use the code with use strict; and use warnings; without errors.

The clean version of the code:

#!/usr/bin/perl use warnings; use strict; $|= 1; # This is usefull and required only on win32 machines eval{require Win32::Console::ANSI;}; # number of JAPHs per graph my $counter; # define the parameters for the graph my ($u,$v); # a way to slow the counter decrease, see below my ($a,$b); while(1) { unless ($counter) { # choose a random color printf("\e[1;%dm", 30+rand(7)); # clear the screen printf("\e[%d;%dH%s",1,1,"\e[J"); $u = rand 39/999; $v = rand 39/999; $counter = 3999; $b=qw/19 9 1/[int rand 3]; }; # print J A P H, on the given position printf ( # the ansi code mask "\e[%d;%dH%s", # X 11*sin($v*$counter) + 13, # Y 39* cos($u*$counter) + 41, # one of the four letters qw/J A P H/[$counter%4] ); # here is how $a and $b are used. ($a++%$b) or $counter--; }
daniel

Replies are listed 'Best First'.
Re^4: Spiro Japh 2
by liverpole (Monsignor) on Sep 15, 2005 at 01:25 UTC
    Muito bem ruoso.   A very nicely crafted analysis!  Abrigado...

    But you know, I readily admit that in all of my submissions "there is no much complicated obfuscation".

    So I eagerly await your own obfuscation.  I think you will be very good at them! (I don't promise to be able to analyze it as well as you did mine, though -- I still have a lot to learn from the obfuscated code examples).

      Hmmmm... I never made anyone... And actually, this was the first I could understand :)...

      Anyway, seems like a interesting challenge... I think I'll try something, but I need to think of what...

      daniel

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://491660]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-03-28 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found