Return to Snippet

Revision: 23708
at February 11, 2010 13:59 by pckujawa


Initial Code
"c:\Program Files\Babel\babel.exe" --types --events --methods --properties --fields --stringencrypt $(TargetPath)

Initial URL
http://www.csharp411.com/net-obfuscators/

Initial Description
If you weren't already aware, you can use a product like [Reflector.NET](http://www.red-gate.com/products/reflector/) to see all of the source code (that's right, the code) of a .NET assembly (DLL, EXE, etc). This is a real problem when your code is proprietary, especially when you might have security implementations in the code. Thus, there is often a need to hide the implementation details - enter obfucation.

There is a [article on and list of obfuscators from C# 411](http://www.csharp411.com/net-obfuscators/) which explains the situation better. From my research, I decided to settle on the free and open source [Babel Obfuscator](http://code.google.com/p/babelobfuscator/). Part of the decision process was seeing it in action, which is especially easy when you install the [Babel add-in for Reflector](http://www.jasonhaley.com/blog/post/2009/08/18/ReflectorBabel-Addin.aspx).

Once you've decided that Babel is for you, the code below automates the process when added to the post-build event of your assembly. The parameters and settings are up to you, but this baseline should do everything you'll need.

Initial Title
Obfuscating .NET code so as to hide implementation details from public view (using BabelObfuscator)

Initial Tags
security

Initial Language
C#