Developer Pack
Source Code Protection
Mpoware offers the only solution on the market which is able to protect the source code.
This innovative soltution allows you to obfuscate the source code directly in Visual Studio without using an external tool.
Other obfuscators on the market work only on the MSIL of the compiled code. Now, this method does not allow to protect the source code but also has the disadvantage of not being compatible with some .NET mechanisms such as reflection or the use of strong names for assemblies.
The obfuscation of source code is the only solution allowing to protect the intellectual property from the development environment and to allow a complete use of .NET classes and mechanisms. It is also the only solution to protect the intellectual property in the out-sourced/off-shored projects.
A dictionary used during the process of obfuscation allows the owner of the source code to be able to deobfuscate its source code to read again and to modify.
Note: the current tool supports the C# language.
Sample of source code obfuscation
Below, a simple source code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mpoware.CSharp.Parser.Tests
{
public class Test5_ClassModifiers
{
// Avec un commentaire une ligne
/*
** Small comment
** Delimited $$$
*/
public void Say(string message)
{
i = 0;
Console.WriteLine("Hello " + /*mon message*/ message);
}
}
}

Example of an obfuscated source code from the previous one (obfuscation algorithms are opened and you can add your owns):
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mpoware.CSharp.Parser.Tests
{
public class Test5_ClassModifiers
{
public void Say(string lCn)
{
int bFvkZBBQMMybaxvs;
bFvkZBBQMMybaxvs = 0;
if (bFvkZBBQMMybaxvs == 0) goto sdlfhsqdfmkjf;
fmkjdshfkjf: if (bFvkZBBQMMybaxvs == 1) { Console.WriteLine(GetString(new int[] { 2, 2, -3, 0, -1, 3 }) + lCn); goto end; }
sdlfhsqdfmkjf: ADDKSHFDDRH(bFvkZBBQMMybaxvs); bFvkZBBQMMybaxvs++; if (bFvkZBBQMMybaxvs == 1) { goto fmkjdshfkjf; } else { goto fmkjdshfkjf5; };
bFvkZBBQMMybaxvs = 0;
if (bFvkZBBQMMybaxvs == 0) goto sdlfhsqdfmkjf;
fmkjdshfkjf5: if (bFvkZBBQMMybaxvs == 1) { Console.WriteLine(GetString(new int[] { 2, 2, -3, 0, -1, 3 }) + lCn); goto end; }
sdlfhsqdfmkjf6: ADDKSHFDDRH(bFvkZBBQMMybaxvs); bFvkZBBQMMybaxvs++; goto fmkjdshfkjf;
end1: ;
bFvkZBBQMMybaxvs = 0;
if (bFvkZBBQMMybaxvs == 0) goto sdlfhsqdfmkjf;
fmkjdshfkjf1: if (bFvkZBBQMMybaxvs == 1) { Console.WriteLine(GetString(new int[] { 2, 2, -3, 0, -1, 3 }) + lCn); goto end; }
sdlfhsqdfmkjf2: ADDKSHFDDRH(bFvkZBBQMMybaxvs); bFvkZBBQMMybaxvs++; goto fmkjdshfkjf;
end2: ;
bFvkZBBQMMybaxvs = 0;
if (bFvkZBBQMMybaxvs == 0) goto sdlfhsqdfmkjf;
fmkjdshfkjf3: if (bFvkZBBQMMybaxvs == 1) { Console.WriteLine(GetString(new int[] { 2, 2, -3, 0, -1, 3 }) + lCn); goto end; }
sdlfhsqdfmkjf4: ADDKSHFDDRH(bFvkZBBQMMybaxvs); bFvkZBBQMMybaxvs++; goto fmkjdshfkjf;
end3: ;

end: return; ;
}

private int ADDKSHFDDRH(int bFvkZBBQMMybaxvs)
{
return bFvkZBBQMMybaxvs++;
}
private string GetString(int[] p)
{
StringBuilder s = new StringBuilder();
int[] al = new int[6] { 111, 108, 72, 32, 101, 34 };
int i = 0;
for (int k = 0; k < p.Length; k++)
{
i += p[k++]; s.Append((char)al[i]);
}
return s.ToString();
}
}
}

Also, it is very important to check that optimizations done by the C# compiler do not allow a better readibility thru MSIL. Below is an example of MSIL generated by the C# compiler on obfuscated source code:
public class Test5_ClassModifiers
{
// Methods
private int ADDKSHFDDRH(int bFvkZBBQMMybaxvs)
{
return bFvkZBBQMMybaxvs++;
}

private string GetString(int[] p)
{
StringBuilder s = new StringBuilder();
int[] al = new int[] { 0x6f, 0x6c, 0x48, 0x20, 0x65, 0x22 };
int i = 0;
for (int k = 0; k < p.Length; k++)
{
i += p[k++];
s.Append((char) al[i]);
}
return s.ToString();
}

public void Say(string lCn)
{
int bFvkZBBQMMybaxvs = 0;
if (bFvkZBBQMMybaxvs == 0)
{
goto Label_0041;
}
Label_0010:
if (bFvkZBBQMMybaxvs == 1)
{
Console.WriteLine(this.GetString(new int[] { 2, 2, -3, 0, -1, 3 }) + lCn);
goto Label_00A0;
}
Label_0041:
this.ADDKSHFDDRH(bFvkZBBQMMybaxvs);
bFvkZBBQMMybaxvs++;
if (bFvkZBBQMMybaxvs != 1)
{
if (bFvkZBBQMMybaxvs == 1)
{
Console.WriteLine(this.GetString(new int[] { 2, 2, -3, 0, -1, 3 }) + lCn);
goto Label_00A0;
}
this.ADDKSHFDDRH(bFvkZBBQMMybaxvs);
bFvkZBBQMMybaxvs++;
}
goto Label_0010;
Label_00A0:;
}
}