歡迎跟我連絡
免安裝程式...哈哈 歡迎聊天
2008年7月8日 星期二
2008年7月7日 星期一
Obfuscator (混淆器)
各為將來有機會寫程式賣錢的話,但是對方不打算買Source Code(買Source Code要付出數倍價錢),
然後透過反組譯程式取得你的 Source Code(.NET 程式 相當容易被反組譯)
可以透過Obfuscator (混淆器),複雜化你的程式碼,反組譯後,讓對方一頭霧水,想要Source Code乖乖付錢吧!
例如
using System;
struct Module1
{
private string str = "Hello World! Today is:";
private System.DateTime today = Now;
void Main()
{
Console.WriteLine(str + System.Convert.ToString(today));
}
}
透過Obfuscator後
.class private auto ansi sealed beforefieldinit Module1
extends [mscorlib]System.Object
{
.custom instance void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.
StandardModuleAttribute::.ctor() = ( 01 00 00 00 )
.field private static string str
.field private static valuetype [mscorlib]System.DateTime today
.method private specialname rtspecialname static
void .cctor() cil managed
{
.maxstack 8
IL_0000: ldstr "Hello World! Today is:"
IL_0005: stsfld string ConsoleApplication1.Module1::str
IL_000a: call valuetype [mscorlib]System.DateTime [Microsoft.VisualBasic]Microsoft.
VisualBasic.DateAndTime::get_Now()
IL_000f: stsfld valuetype [mscorlib]System.DateTime ConsoleApplication1.Module1::today
IL_0014: nop
IL_0015: ret
} // end of method Module1::.cctor
.method public static void Main() cil managed
{
.entrypoint
.custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 )
.maxstack 8
IL_0000: nop
IL_0001: ldsfld string ConsoleApplication1.Module1::str
IL_0006: ldsfld valuetype [mscorlib]System.DateTime ConsoleApplication1.Module1::today
IL_000b: call string [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.StringType::
FromDate(valuetype [mscorlib]System.DateTime)
IL_0010: call string [mscorlib]System.String::Concat(string,
string)
IL_0015: call void [mscorlib]System.Console::WriteLine(string)
IL_001a: nop
IL_001b: nop
IL_001c: ret
} // end of method Module1::Main
} // end of class Module1
夠酷吧....
這裡有免費軟體提供:http://www.xmlfox.com/freeware_obfuscator.htm