Home - Forums-.NET - Spices.Net - Obfuscating Web Application Project

Spices.Net

NET code security, tools to protect, obfuscate, tamper defense, code and data safety, recover, convert, optimize, explore, browse and analyze .Net software.

This forum related to following products: Spices.Net Suite, Spices.Net Obfuscator, Spices.Net Decompiler

Obfuscating Web Application Project
Link Posted: 24-Apr-2007 22:05
Is there any way to obfuscate Web Application Project.
I have a Web Application, 1 DLL with all .cs files and a bunch of .aspx files.
     When i obfuscate the DLL i got error, because there are references to a functons and properties from aspx files by their name(which have been obfuscated)
For example:

wheer ctrl and SomeFunc() in DLL are now something like ♀ and ʎ☺☼()

I know i can excluede then from obfuscation list but there are too much of them to exclude, and some of the functions contain source which i don't want to share.

Thanks in advance.
Link Posted: 25-Apr-2007 06:47
To obfuscate Web Application project please use Default or DefaultImproved modes of ObfuscationOptions.Members (these mode don't obfuscate public members of your assembly).
Link Posted: 25-Apr-2007 19:39
Event handlers are \"protected\" by default, and i cannot exclude all \"protecteds\" because there are some other \"protected\" memebers in assembly which should be obfuscated.
And i cannot change all handlers to public, because there are too many of them, also because of this i cannot add all of them to excludes.

If i compile the project in one assembly using Web Deployment Project then it seems all pages will be comiled in as resources. Do your obfuscater is able to process resources as well? I mean if it changes OnSmth_Click in the code, will it change in the pages comiled in all calls to ths function, e.g. onclick=\"OnSmth_Click()\" ?
Link Posted: 25-Apr-2007 19:50
Event handlers are \"protected\" by default, and i cannot exclude all \"protecteds\" because there are some other \"protected\" memebers in assembly which should be obfuscated.
And i cannot change all handlers to public, because there are too many of them, also because of this i cannot add all of them to excludes.

There are several ways to solve this problem:
1. Mark event handlers that should be exluded from obfuscation by NotObfuscate attribute (source of attributes and service NineRays.ObfuscationAttributes.dll assembly you can find in the SDK\\Obfuscation Attributes. You can add source or this assembly to your project to mark members by obfuscation control attributes).
2. Use ExclusionPatterns collection to exclude these members from obfuscation, by using regular expressions, for example On* pattern will exlude all members that start with On

If i compile the project in one assembly using Web Deployment Project then it seems all pages will be comiled in as resources. Do your obfuscater is able to process resources as well? I mean if it changes OnSmth_Click in the code, will it change in the pages comiled in all calls to ths function, e.g. onclick=\"OnSmth_Click()\" ?

Yes, if these compiled pages assembly is included to obfuscated project. Spices.Obfuscator will obfuscate all references to obfuscated members (cross-obfuscated).