VisualSVN一般情况下使用不需要破解,可以直接使用社区授权。但是社区授权不支持域用户。
如果要再域下面使用就需要破解了。
原版的VisualSVN和破解后的DLL已打包上传(仅供学习使用)
破解方法:
1、安装原版VisualSVN
2、打开“C:Program Files (x86)VisualSVNin”
3、替换“VisualSVN.Core.dll”
4、打开VS,VisualSVN,About VisualSVN,LicenseType是Professional就成功了。
附上破解的制作过程:
1、反编译原版“VisualSVN.Core.dll”
2、修改“VisualSVN.Core.Protector”
using System;
using System.Runtime.CompilerServices;
using System.Threading;
using VisualSVN.Core.Licensing;
using VisualSVN.Utils;
namespace VisualSVN.Core
{
public class Protector : IProtector
{
public Protector(ILicenseStorer privateStorer, ILicenseStorer publicStorer, IDecoder decoder, IDomainJoinChecker domainJoinChecker) { }
public License GetCurrentLicense()
{
return new License()
{
Version = 2,
Type = LicenseType.Professional,
Binding = LicenseBinding.User,
Capacity = 1,
EndTime = DateTime.MaxValue,
StartTime = DateTime.MinValue,
PurchaseDate = DateTime.MinValue
};
}
public DomainJoinStatus GetDomainJoinStatus()
{
return DomainJoinStatus.Joined;
}
public bool IsRegistered()
{
return true;
}
public License ParseKey(string key)
{
return GetCurrentLicense();
}
public bool RegisterKey(string key)
{
if (this.RegistrationChanged != null)
{
this.RegistrationChanged(this);
}
return true;
}
public event RegistrationChangedEventHandler RegistrationChanged;
}
}
3、重新编译DLL,失败。没关系,继续。
4、删除编译失败的部分,只要保证“Protector”这个类能顺利编译通过即可。
5、用“ildasm VisualSVN.Core.dll /out=VisualSVN.Core.txt”这条命令生成IL
6、打开“VisualSVN.Core.txt”搜索如下内容
“.class public auto ansi beforefieldinit VisualSVN.Core.Protector”
从“.class”开始复制到下面的“} // end of class VisualSVN.Core.Protector”
7、用同样的方法生成原版“VisualSVN.Core.dll”的IL(最好新建一个文件夹生成,会出来很多资源文件。)
8、替换原版“VisualSVN.Core.dll”生成的IL中的“VisualSVN.Core.Protector”(就是先前复制的那段)
9、用“ilasm VisualSVN.Core.txt /dll”生成破解后的DLL。
ildasm路径:C:Program Files (x86)Microsoft SDKsWindowsv7.0ABinildasm.exe
ilasm路径:C:WindowsMicrosoft.NETFramework64v2.0.50727ilasm.exe
附件地址:http://download.csdn.net/detail/jsj30651/8167577#comment