I have a C# program and i want to decompile it, i used [ILSpy & NetReflector] and everything worked fine the program was decompiled but the source was encrypted or protected in a way because all the .cs file doesn't content the exact code that i want. I tried the decompiling on other programs and the results was nice but only this file. and this is a picture for the encrypted .cs files
Asked
Active
Viewed 799 times
-5
-
2And your question? – L.B Nov 12 '16 at 20:56
-
1How does the cs file look? You just posted a picture of the solution folder – Nov 12 '16 at 20:57
-
*" the .cs file doesn't content the exact code that i want"* You do know that decompiling is not exact and will not produce the original source code? – UnholySheep Nov 12 '16 at 20:58
-
My question is how to decrypt the protected .cs file to see the correct codes?.. I know what the program do and i know some of codes must be shown – ASSAYYED Nov 12 '16 at 21:00
-
1@ASSAYYED a) it is not encrypted b) Your tools try the best they can. There isn't a way that can surely return the original code. ... c) If the author wanted you to do this, he/she would share the source with you.. – L.B Nov 12 '16 at 21:01
-
Ok thanks for answers! – ASSAYYED Nov 12 '16 at 21:06
-
That is called obfuscation, and is done to prevent people from easily decompiling code. It means that they do not want you to do it. – Chris Nov 12 '16 at 21:15
-
It is not thieving, just a help to restore lost source code because of virus – ASSAYYED Nov 12 '16 at 21:28
-
@ASSAYYED And that is why backups and source control is so important. Obfuscation is a security measure that protects against everyone - including people with good intentions. – Abion47 Nov 12 '16 at 22:42
1 Answers
2
The code you're trying to look at has been compiled with an obfuscator to discourage people from decompiling it. The obfuscator re-arranges and renames things in the code in such a way that the computer can still run them, but they're harder for a human to understand.
One of the steps in obfuscation is swapping all the nice human-readable variable and class and method names with jumbles of random characters. That's why your decompiled files have a crazy mixture of Chinese, Korean, Greek, Hindi etc letters in them. That step is irreversible, because they're not encrypted, they're just replaced with nonsense.

Robyn
- 1,334
- 10
- 12
-
and this meaning impossible to restore the codes?.... the compiled tool contents a code call "tool.exe" and i search for the name in all the files but no luck...should i understand from your answer even the tools names replace? – ASSAYYED Nov 12 '16 at 21:29
-
@ASSAYYED Class names, method names, field names, property names, event names... basically anything that isn't either a literal or keyword has been irreversibly replaced with random nonsense. – Abion47 Nov 12 '16 at 22:40
-
Ok i understood this but now while i'm trying i discovered that the exe is obfuscated by "Confuser" and now i'm trying to "de-confuser" it and succes but not fully.....do you now any good program to deobfuscate-confuser? – ASSAYYED Nov 12 '16 at 23:07
-
The best way to do it is to break into the office of the person who wrote the program and steal their hard drive. If you cannot do that for ethical or legal reasons, you should probably just quit. – Robyn Nov 21 '16 at 03:36