當前位置:編程學習大全網 - 編程語言 - 教妳如何破解VisualSVN

教妳如何破解VisualSVN

剛從官方下載了最新的VisualSVN Pre-Version,結果GOOGLE了壹圈竟然沒找到破解版本,無奈只好自己動手破解。 VisualSVN用.net編寫,並且沒有進行任何代碼混淆,因此很容易通過反射工具直接修改IL代碼。VisualSVN的破解方法也是多種多樣,自己跟代碼找到關鍵位置,修改壹下即可。如果不懂IL代碼的話建議看壹下網上教程,對於懂得.NET編程的很容易學習。 我找到的是位於bin目錄下的VisualSVN.Core.L.dll,使用.NET Reflector 加載Assembly,找到VisualSVN.Core.Licensing.LicenseConverter類中的方法KeyToLicenseUnsafe(IDecoder, String):License 下面是未修改的IL代碼.method public hidebysig static class VisualSVN.Core.Licensing.License KeyToLicenseUnsafe(classVisualSVN.Core.IDecoder decoder, string key) cil managed { .maxstack 3 .localsinit ( [0] charch, [1] stringstr, [2] classVisualSVN.Core.Licensing.PlainLicenseSerializerserializer, [3] classVisualSVN.Core.Licensing.OldLicenseSerializerserializer2, [4] classVisualSVN.Core.Licensing.NewLicenseSerializerserializer3, [5] charch2) L_0000: ldarg.1 L_0001: ldloca.sch L_0003: callstringVisualSVN.Core.Licensing.LicenseConverter::ExtractKeyBody(string, char&) L_0008: stloc.1 L_0009: ldloc.1 L_000a: brtrue.s L_000e L_000c: ldnull L_000d: ret L_000e: ldloc.0 L_000f: stloc.sch2 L_0011: ldloc.sch2 L_0013: ldc.i4.s0x43 L_0015: beq.s L_003d L_0017: ldloc.sch2 L_0019: ldc.i4.s0x4e L_001b: sub L_001c: switch (L_004c, L_005d, L_002f) L_002d: br.s L_005d L_002f: newobjinstancevoidVisualSVN.Core.Licensing.PlainLicenseSerializer::.ctor() L_0034: stloc.2 L_0035: ldloc.2 L_0036: ldloc.1 L_0037: callvirtinstanceclassVisualSVN.Core.Licensing.LicenseVisualSVN.Core.Licensing.PlainLicenseSerializer::Deserialize(string) L_003c: ret L_003d: newobjinstancevoidVisualSVN.Core.Licensing.OldLicenseSerializer::.ctor() L_0042: stloc.3 L_0043: ldloc.3 L_0044: ldloc.1 L_0045: ldarg.0 L_0046: callvirtinstanceclassVisualSVN.Core.Licensing.LicenseVisualSVN.Core.Licensing.OldLicenseSerializer::Deserialize(string, classVisualSVN.Core.IDecoder) L_004b: ret L_004c: newobjinstancevoidVisualSVN.Core.Licensing.NewLicenseSerializer::.ctor() L_0051: stloc.sserializer3 L_0053: ldloc.sserializer3 L_0055: ldloc.1 L_0056: ldarg.0 L_0057: callvirtinstanceclassVisualSVN.Core.Licensing.LicenseVisualSVN.Core.Licensing.NewLicenseSerializer::Deserialize(string, classVisualSVN.Core.IDecoder) L_005c: ret L_005d: ldnull L_005e: ret } 翻譯壹下得到public static License KeyToLicenseUnsafe (IDecoder decoder, string key) { char ch; string str = ExtractKeyBody(key, out ch); if (str != null) { switch (ch) { case 'N': { NewLicenseSerializer serializer3 = new NewLicenseSerializer(); return serializer3.Deserialize(str, decoder); } case 'P': { PlainLicenseSerializer serializer = new PlainLicenseSerializer(); return serializer.Deserialize(str); } case 'C': { OldLicenseSerializer serializer2 = new OldLicenseSerializer(); return serializer2.Deserialize(str, decoder); } } } return null; } 看完代碼就很好做了,自己創建壹個License對象,使用返回該對象即可。要改的代碼如下:public static License KeyToLicenseUnsafe(IDecoder decoder, string key) { License license2 = new License { StartTime = DateTime.MinValue, Binding = LicenseBinding.Seat, Capacity = 0x7ffffffe, EndTime = DateTime.MaxValue, Type = LicenseType.Corporate, PurchaseId = "100", LicensedTo = Environment.UserName }; License license = license2; license.PurchaseDate = license.StartTime; return license;}由於要修改IL代碼,因此需要編寫成IL代碼,如下:.method public hidebysig static class VisualSVN.Core.Licensing.License KeyToLicenseUnsafe(class VisualSVN.Core.IDecoder decoder, string key) cil managed { .maxstack 2 .localsinit ( [0] class VisualSVN.Core.Licensing.License license, [1] class VisualSVN.Core.Licensing.License license2, [2] class VisualSVN.Core.Licensing.License license3) L_0000: nop L_0001: newobj instance void VisualSVN.Core.Licensing.License::.ctor() L_0006: stloc.1 L_0007: ldloc.1 L_0008: ldsfld value type [mscorlib]System.DateTime [mscorlib]System.DateTime::MinValue L_000d: stfld value type [mscorlib]System.DateTimeVisualSVN.Core.Licensing.License::StartTime L_0012: ldloc.1 L_0013: ldc.i4.1 L_0014: stfld value typeVisualSVN.Core.Licensing.LicenseBindingVisualSVN.Core.Licensing.License::Binding L_0019: ldloc.1 L_001a: ldc.i40x7ffffffe L_001f: stfldint32VisualSVN.Core.Licensing.License::Capacity L_0024: ldloc.1 L_0025: ldsfldvaluetype [mscorlib]System.DateTime [mscorlib]System.DateTime::MaxValue L_002a: stfldvaluetype [mscorlib]System.DateTimeVisualSVN.Core.Licensing.License::EndTime L_002f: ldloc.1 L_0030: ldc.i4.2 L_0031: stfldvaluetypeVisualSVN.Core.Licensing.LicenseTypeVisualSVN.Core.Licensing.License::Type L_0036: ldloc.1 L_0037: ldstr"100" L_003c: stfldstringVisualSVN.Core.Licensing.License::PurchaseId L_0041: ldloc.1 L_0042: callstring [mscorlib]System.Environment::get_UserName() L_0047: stfldstringVisualSVN.Core.Licensing.License::LicensedTo L_004c: ldloc.1 L_004d: stloc.0 L_004e: ldloc.0 L_004f: ldloc.0 L_0050: ldfldvaluetype [mscorlib]System.DateTimeVisualSVN.Core.Licensing.License::StartTime L_0055: stfldvaluetype [mscorlib]System.DateTimeVisualSVN.Core.Licensing.License::PurchaseDate L_005a: ldloc.0 L_005b: stloc.2 L_005c: br.s L_005e L_005e: ldloc.2 L_005f: ret} 做完以上工作,只需要使用微軟自帶的IL編譯和反編譯工具即可。

  • 上一篇:關於雷鋒的名言和故事(否則不同)
  • 下一篇:用Java定義壹個復數類complex,它的內部具有兩個實例變量:realPart和imagPart,分別代表復數的實部和虛部
  • copyright 2024編程學習大全網