<?xml version="1.0" ?>
<notes>
<em>CScout</em> can convert a workspace into an obfuscated version.
The obfuscated version of the workspace can be distributed instead
of the original C source, and can be compiled on different processor
architectures and operating systems,
hindering however the code's reverse engineering and modification.
<p />
Each source code file is obfuscated by
<ul>
<li> Giving meaningless names to all identifiers: macros, arguments, ordinary identifiers, structure tags, structure members, and labels.</li>
<li> Removing comments.</li>
<li> Removing extraneous whitespace.</li>
</ul>
<p />
Before running <em>CScout</em> to obfuscate, make a complete backup copy of
your source code files, and store them in a secure place;
preferably off-line.
Once the source code files are obfuscated and overwritten, there is no
way to get back their original contents.
<p />
To obfuscate the workspace, first ensure that <em>CScout</em> can correctly
process the complete set of its source code files.
Use the "unprocessed lines" metric of each file to verify that no
parts of a file are left unprocessed;
unprocessed regions will not be obfuscated.
You can easily increase the coverage of <em>CScout</em>'s processing by
including in the workspace multiple projects with different defined
directives.
<p />
Also ensure that all your project's files are considered writable, and no
files outside your project (for example system headers) are considered writable.
This will allow <em>CScout</em> to rename your identifier names, but
keep the names of library-defined identifiers (for example <code>printf</code>)
unchanged.
<p />
Finally, run <em>CScout</em> with the switch <code>-o</code>.
For each writable workspace file <em>CScout</em> will create a file ending
in <code>.obf</code> that will contain the obfuscated version of its
contents.
The files are not overwritten, providing you with another countermeasure
against accidentally destroying them.
To overwrite the original source with the obfuscated one,
use the following Unix command:
<fmtcode ext="sh">
find . -name '*.obf' |
sed 's/\\/\//g;s/\(.*\)\.obf$/mv "\1.obf" "\1"/' |
sh
</fmtcode>
You can then compile the obfuscated version of your project,
to verify the obfuscation's results.
</notes>
