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