Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Aug 2010 18:39:32 -0700
From:      perryh@pluto.rain.com
To:        frederic@culot.org
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Feedback on wanted port: obskurator
Message-ID:  <4c6896d4.3pdxwnrQ856zJXYK%perryh@pluto.rain.com>
In-Reply-To: <20100815075812.GA15226@culot.org>
References:  <20100815075812.GA15226@culot.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Frederic Culot <frederic@culot.org> wrote:

> Following the links on the ports tasks wiki page I found
> 'obskurator' to be a wanted port ... so I gave it a try
> and report about it here.
>
> obskurator is supposed to obfuscate source code by changing
> variable names ...
> I believe the software itself is unusable and should not be
> added to the ports tree in its current state. Indeed, I wrote a
> simple code to test the resulting obfuscated program generated
> by obskurator and it would not compile.
>
> Here is my test code:
>
> -----
> #include <stdio.h>
>
> int my_int1;
>
> int
> main (void)
> {
>   char *my_txt1 = "Hello world";
>
>   printf ("first var: %d\n", my_int1);
>   printf ("second var: %s\n", my_txt1);
>
>   return 0;
> }
> -----
>
> and obskurator transformed it into the following:
>
> -----
> #include <stdio.h>
>
> int my_int1;
>
> int
> main (void)
> {
>   char *x1 = "Hello world";
>
>   x2 ("first var: %d\n", my_int1);
>   x2 ("second var: %s\n", x1);
>
>   return 0;
> }
> -----
>
> That is obskurator believed printf(3) was a user-defined variable
> and replaced it with 'x2', which makes the resulting program
> impossible to compile.

Does it by any chance work properly if you provide the prototype
for printf in the source file, instead of depending on the one
that should be provided by the #included header file?  If it does,
a possible w/a might be to run the program through CPP first, and
then through obskurator.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4c6896d4.3pdxwnrQ856zJXYK%perryh>