Home - Forums-.NET - Spices.Net - Partial Obfuscation using Spices.NET

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

Partial Obfuscation using Spices.NET
Link Posted: 23-Mar-2008 04:16
Is it possible to have the flexibility to obfuscate the methods ONLY and to leave the other members of all the classes (variables) without any changes?

Thanks in advance,
EA.

Example:

// sample code
namespace Test
{
    internal class First
    {
        public First()
        {
            aINT = 123;
            aString = "Blah Blah!";
        }
        private int aINT;
        public string aString;

        public string Function1(string strInput)
        {
            return strInput;
        }
    }

    internal class Second
    {
        public Second()
        {
            First aObj = new a();  
            aString = aObj.aString;
        }

        public string Function2(int intInput)
        {
            return intInput;
        }

        private string aString;
    }

    class Program
    {
        static void Main(string[] args)
        {
            Second bObj = new Second();
            return;
        }
    }
}


____________________________________________________________________________________________

// code after obfuscation
namespace Test
{
    internal class First
    {
        public .ctor()
        {
            aINT = 123;
            aString = "Blah Blah!";
        }
        private int aINT;
        public string aString;

        public string 0(string strInput)
        {
            return strInput;
        }
    }

    internal class Second
    {
        public .ctor()
        {
            First aObj = new a();  
            aString = aObj.aString;
        }

        public string 0(int intInput)
        {
            return intInput;
        }

        private string aString;
    }

    class Program
    {
        static void Main(string[] args)
        {
            Second bObj = new Second();
            return;
        }
    }
}
Link Posted: 23-Mar-2008 18:06
Yes, it's possible.
Just exclude Fields, Events, Properties options from ObfuscationOptions.Members to obfuscate methods only.