Feedback on wanted port: obskurator

perryh at pluto.rain.com perryh at pluto.rain.com
Mon Aug 16 01:49:00 UTC 2010


Frederic Culot <frederic at 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.


More information about the freebsd-ports mailing list