selective class member renaming with ObfuscationAttribute

Issues related to VMProtect
Post Reply
weloveayaka
Posts: 58
Joined: Wed Jul 05, 2023 6:21 am

selective class member renaming with ObfuscationAttribute

Post by weloveayaka »

Currently, the "Strip the debug information" option is a global setting that disables the renaming function. While we have numerous classes in our assembly, we only intend to rename the members of a select few.

When "Strip the debug information" is disabled, the [Obfuscation(Exclude = false, Feature = "renaming")] attribute doesn't function as intended. Is it possible to enable this attribute selectively for specific classes without enabling "Strip the debug information" and adding hundreds of [Obfuscation(Exclude = true, Feature = "renaming")] attributes?
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: selective class member renaming with ObfuscationAttribute

Post by Admin »

It seems you need something like this:

Code: Select all

[assembly:Obfuscation(Feature = "renaming", Exclude = true)]

[Obfuscation(Feature = "renaming", Exclude = false, ApplyToMembers = true)]
class Foo {
...
weloveayaka
Posts: 58
Joined: Wed Jul 05, 2023 6:21 am

Re: selective class member renaming with ObfuscationAttribute

Post by weloveayaka »

Thank you! It works.
Post Reply