From owner-freebsd-ports@FreeBSD.ORG Mon Aug 16 01:49:00 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7830A10656A3 for ; Mon, 16 Aug 2010 01:49:00 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 5986F8FC0C for ; Mon, 16 Aug 2010 01:49:00 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id o7G1mud4001720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 15 Aug 2010 18:48:56 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id o7G1muV8001719; Sun, 15 Aug 2010 18:48:56 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA01689; Sun, 15 Aug 10 18:35:01 PDT Date: Sun, 15 Aug 2010 18:39:32 -0700 From: perryh@pluto.rain.com To: frederic@culot.org Message-Id: <4c6896d4.3pdxwnrQ856zJXYK%perryh@pluto.rain.com> References: <20100815075812.GA15226@culot.org> In-Reply-To: <20100815075812.GA15226@culot.org> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: Feedback on wanted port: obskurator X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2010 01:49:00 -0000 Frederic Culot 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 > > 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 > > 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.