All method names and fields in DLL are not obfuscated
javiersanag
Posts: 5
Hi!
I'm trying to obfuscate a DLL that contains some WPF and some public methods. On these classes, all method names and signatures remain intact, even when they are internal or private. Also, all fields keep their original name. I have set all options to maximum obfuscation.
I have also tried this solution: http://stackoverflow.com/questions/6863 ... bfuscation with the "ExcludePublicMembers="0"" parameter.
Nothing has worked so far. Any way I can force field name mangling on private and internal methods and fields?
PS: I'm using ILSpy to disassemble the DLL.
I'm trying to obfuscate a DLL that contains some WPF and some public methods. On these classes, all method names and signatures remain intact, even when they are internal or private. Also, all fields keep their original name. I have set all options to maximum obfuscation.
I have also tried this solution: http://stackoverflow.com/questions/6863 ... bfuscation with the "ExcludePublicMembers="0"" parameter.
Nothing has worked so far. Any way I can force field name mangling on private and internal methods and fields?
PS: I'm using ILSpy to disassemble the DLL.
Comments
<Obfuscation ExcludePublicMembers="0" Obfuscate="1">
invalid, I'm afraid. I've opened a bug for this with reference SA-1389 .
In the meantime, you could downgrade to version 6.6 which I've found still works: http://downloads.red-gate.com/checkforu ... 6.4.95.exe
Sorry for this inconvenience!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
All my DLLs are merged into the main assembly, so I don't understand why they are not obfuscated in the expected way. It is especially worrying that the internal and private members keep their original names. Even the main .exe file has most private and internal members unchanged after obfuscation (this I don't understand why).
I hope something like this can be solved in the next version of SmartAssembly.
· Any type with the Serializable attribute specified will not be obfuscated
· Any type with a base class of System.MulticastDelegate will not be obfuscated
· Any type with the System.ServiceModel.OperationContractAttribute specified will not be obfuscated
· Any type with the System.ServiceModel.ServiceContractAttribute specified will not be obfuscated
· Any method with the System.Reflection.DefaultMemberAttribute specified will not be obfuscated
· Any type with an attribute starting with System.Xml.Serialization. set will not be obfuscated
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
We're not dealing with any of those types. I have activated the logging functionality, and I get many of these messages:
class [PresentationFramework]System.Windows.Controls.Grid GridClose excluded from obfuscation: Has a special base type ([PresentationFramework]System.Windows.Window)
Is WPF not supported?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
It seems that SmartAssembly has important limitations with WPF (maybe Microsoft's fault). Behavior like the one described above means that we need to move most of the logic to other non-WPF classes, but in many cases this is either not possible or it complicates code in an unnecessary way...
I've come across a comment that the developers have made in regards to exclusions. Apparently, exclusions can vary depending on a whole host of factors such as the type of assemblies being processed, which combination of other features may be enabled, the CLR version being targetted and more. I apologize for any inconvenience this may cause!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
So, it turns out that the actual problem here is that I was having a moment of stupidity..:oops:
In version 6.7, the attribute is now KeepPublicMembersAccessible rather than ExcludePublicMembers
My deepest apologies for the confusion!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?