Decompiling .net assembly with dotPeek gives invalid syntax

我与影子孤独终老i 提交于 2019-12-12 15:13:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!