Dotfuscator có vẻ như không tuân theo việc đổi tên RegEx (Dotfuscator Seems Not Adhering To Renaming Exclusion RegEx)


問題描述

Dotfuscator có vẻ như không tuân theo việc đổi tên RegEx (Dotfuscator Seems Not Adhering To Renaming Exclusion RegEx)

We have decided to use the Dotfuscator to obfuscate our code. Ours is a Windows Phone application and we are using Dotfuscator Windows Phone Edition Version 4.9.7000.29303. We learnt that System.Reflection.ObfuscationAttribute class is not available in Silverlight, so it is not possible to use exclusion attributes on some types we need to exclude. We are now planning to use Rename>Exclude tab in dotfuscator and exclude types with some specific suffixes. Before implementation we created a trial project and tested obfuscation on it. We found in our testing that the output is not adhering to execution rules. Though the preview window is showing expected result but output still includes those types which should have been excluded. Please see the screen shot of the Dotfuscator window below. Preview window on the left hand side of the arrow is correctly displaying the shaded type which would be excluded from obfuscation, but on the right hand side of the arrow, output of the same still obfuscated those types. What is happening?


參考解法

方法 1:

I don't entirely understand what you're trying to accomplish with the regular expression, but as far as using attributes to control obfuscation, there is a library you can include. 

The library to include is typically in

C:\Program Files(x86)\PreEmptive Solutions\Dotfuscator (version and edition)\Attributes\Windows Phone\PreEmptive.ObfuscationAttributes.dll

Here is an example on how to exclude something from renaming for instance:

[Obfuscation(Feature = "renaming", Exclude = true)]
public int Foo{get;set;}

You can find more details about it controlling obfuscation with attributes at this link and the general users guide is available here

If you want to go the regex route instead, you can also look at the documentation for creating custom rules. You'll have to provide a bit more info for me to understand what you're trying to do for me to be able to help though. Given your screenshot, everything appears to be what I'd expect.  

(by amrahsEarlz)

參考文件

  1. Dotfuscator Seems Not Adhering To Renaming Exclusion RegEx (CC BY‑SA 3.0/4.0)

#dotfuscator #windows-phone-7 #obfuscation






相關問題

如何在構建中自動化 Dotfuscator (How to automate Dotfuscator in build)

Dotfuscator 命令行 (Dotfuscator command line)

Dotfuscator có vẻ như không tuân theo việc đổi tên RegEx (Dotfuscator Seems Not Adhering To Renaming Exclusion RegEx)

如何使用 dotfuscator 合併多個本地化文件? (How can I use dotfuscator to merge multiple localization files?)

在混淆的 Windows 應用商店應用程序中,包含公共調試符號是否有任何危險? (In an obfuscated Windows Store App, is there any danger in including the Public Debug Symbols?)

無法加載混淆程序集 (Cannot load obfuscated assembly)

混淆 .NET Microsoft Office 插件的工具 (Tools that Obfuscate .NET Microsoft Office Add-in)

Dotfuscator 社區版 (Dotfuscator community edition)

Dotfuscator 構建後事件退出,代碼 1 (Dotfuscator Post-Build Event Exited With Code 1)

如何防止重命名所有類,dotfuscator 中的接口 (How to prevent renaming of all classes, interface in dotfuscator)







留言討論