问题
I have a problem with decompiling .net assembly. When I open the assembly in dotPeek there is class called frmMain with few hundred variables declared like this:
[SpecialName]
private static int \u0024STATIC\u0024SortByLengthAsc\u002402811241124\u0024xlen;
When i try to export it to project all those lines give errors (STATIC is not defined) even if I change all the \u0024 to $. Am I doing something wrong?
回答1:
No, the assembly has been obfuscated to prevent people (like you) to take a peek in the code and possibly 'steal' it. Those variable names are allowed in IL, but not in actual C# code, so that is why it fails.
The only remedy I know is a reverse-obfuscation tool that knows how the obfuscator obfuscates and tries to turn that around. Or you can do it by hand, which will take a lot of time usually, which proves obfuscation pays off.
来源:https://stackoverflow.com/questions/40405892/decompiling-net-assembly-with-dotpeek-gives-invalid-syntax