Related articles |
---|
Name obfuscation precompiler daveb_sharp@yahoo.ca (2004-01-22) |
Re: Name obfuscation precompiler ddw@missioncriticalit.com (2004-01-31) |
Re: Name obfuscation precompiler vbdis@aol.com (2004-02-01) |
From: | vbdis@aol.com (VBDis) |
Newsgroups: | comp.compilers |
Date: | 1 Feb 2004 12:49:18 -0500 |
Organization: | AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com |
References: | 04-01-135 |
Keywords: | tools, comment |
Posted-Date: | 01 Feb 2004 12:49:18 EST |
daveb_sharp@yahoo.ca (daveb_sharp@yahoo.ca) schreibt:
>Is there any sample compiler source code available that does
>anything remotely similar to the above or can anyone give me any
>suggestions on a quick proof of concept implementation of my own?
You may have a look at the cpp preprocessor of gcc. A simple
obfuscation then is possible by replacing all non-predefined symbols
(token "names") by other strings. Since the preprocessor doesn't
distinguish between identifiers for local and global identifiers, or
identifiers in different namespaces, the same name then is substituted
for e.g. a local variable "i" in every subroutine.
But why do you want obfuscation at all? When your code refers to
external (library) symbols, or exports symbols for use by other
applications, then you'll need at least a list of names which never
must be obfuscated. Then stripping all debug information from the
compiled files should provide the same results as your obfuscator. If
then still remain unwanted symbols in the compiled files, it may be
easier to tweak the name list in the object files, instead of
bothering with the source code.
DoDi
[The usual point of obfuscation is to be able to provide source code to
people running on systems for which you don't have a compiler without
giving them full access to the useful source code. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.