有不少网友问我怎么样混淆asp.net程序的,他自己混淆的时候根本就用不了。
关键是他混淆了不应该混淆的代码了。
一、 网页的后台代码的类名不能混淆,因为在.aspx网页上面面还有<%@ Page Language="c#" Inherits="TopWinCMS.WebUI.Admin.Admin_Index_Main" CodeFile="Index_Main.aspx.cs" %>
对类的明码引用。
二、网页里面的明码调用后台的方法,方法名称不能混淆。例如.aspx里面有<%=ShowXP_Path()%>,那么.cs文件里面的
public string ShowXP_Path()
{
return "******";
}
方法名不能混淆!
三、被反射的类不能混淆类名。
/// <summary>
/// 反射接口
/// </summary>
/// <param name="ClassName"></param>
/// <returns></returns>
public static object ReflectionInterface(string strClassName)
{
Type _type = Type.GetType(strClassName, true);
return Activator.CreateInstance(_type);
}
public static ITable CreateTable()
{
string strClassName = "winner.DAL." + LoginInfo.DbType + ".DAL_Table";
object obj = ReflectionInterface(strClassName);
return (ITable)obj;
}
如果你混淆了winner.DAL.Access.DAL_Table 将不能反射
四、在asp.net 2.0里面连事件相关的代码也不能混淆
比如我的GridView控件用到了
protected void GV_List_RowCommand(object sender, GridViewCommandEventArgs e)
{
}
那么就不能混淆GV_List_RowCommand了。
总结,被定死用明码调用代码的地方就不能混淆。
如果是winfrom 的程序就方便多了。注意被反射的地方不要混淆就差不多了。
这篇文章对于所有的混淆适用
xenocode 2006 零售版(免注册,比破解版还爽)
http://www.mytopwin.com/SoftShow.aspx?ID=26