If only slaps could be handed out over the interwebs, most of this forum would have red arses.
A C# compiler is really only a "method compiler". Every method is compiled separately, resulting in short, straightforward sections of code that are usually easy to decompile. Code optimisations and such result in decompiled code which isn't exactly the same as the source code, but functionally equivalent.
If you remove the modularity from your code, you can probably get some CIL which is not so straightforward to decompile, and will cause trouble for most decompilers - but it doesn't stop one from reading, and understanding the CIL that isn't decompiled.
You can get some of the best obfustication by using languages which don't use the same OOP concepts that C# and CIL follow, for example, using F# produces code which looks very odd in CIL, and almost meaningless if you try to decompile it to C#. The code can be decompiled though - it's just that there's no "F# decompiler", afaik.
The problem here is when the person doing the reversing is more knowledgeable than the one attempting to add protection. It takes longer to protect something than to break the protection.Quote:
tao, ofcourse it can, but do you really think any one will spend all that money and/or time to decompile a private server or something like that?
CIL is structurally identical to C#. Even without decompiling back to C#, you can still view the CIL for any program, which is both readable, and follows the same class hierarchy as the uncompiled code. The only difference is the content of each method - The C# compilation is a "non-reversable" process.Quote:
The way I'm doing it cannot be decompiled, you CAN NOT get the sourcecode out of that exe, simple as that, and as it isn't really a obfuscator (is that even a word?) , there are no programs to decompile the exe.
A C# compiler is really only a "method compiler". Every method is compiled separately, resulting in short, straightforward sections of code that are usually easy to decompile. Code optimisations and such result in decompiled code which isn't exactly the same as the source code, but functionally equivalent.
If you remove the modularity from your code, you can probably get some CIL which is not so straightforward to decompile, and will cause trouble for most decompilers - but it doesn't stop one from reading, and understanding the CIL that isn't decompiled.
You can get some of the best obfustication by using languages which don't use the same OOP concepts that C# and CIL follow, for example, using F# produces code which looks very odd in CIL, and almost meaningless if you try to decompile it to C#. The code can be decompiled though - it's just that there's no "F# decompiler", afaik.