状态不好跑到服务器上update了一下,竟然没有写条件,结果发现这个库没有备份。。。然后悲剧发生了!!
因为是SQL2008,好多软件都不支持,最后找到 ApexSql Log ,非常好用,但是试用版除了14天限制外还限制了脚本导出,只能一条条导出么。。。汗,虽然几百条数据,但也够折腾的。。
就研究了下,取除了这个试用版导出条数的限制,看了下算法写注册机也比较简单,但是懒的写了,反正这东西基本上就用一次,几百刀买个正版当然不可能,我想着还有别人也可能用得到,就放上来。
版本是 2014.04.1133 目前官网最新版本。
http://pan.baidu.com/s/1c0BHafQ
注册程序的部分代码:
public static bool Manually(ActivationManager manager, string productKey, string activationCode) { bool flag; manager.WriteActivationInformation(new ActivationResponse(FileHelper.Unzip(activationCode.FromBase64String())).Serialize()); if (!(flag = manager.ActivationCodeIsValid || (manager.State == ActivationState.ExtendedEvaluation))) { string_1 = string.Format("Invalid activation code [{0}]", activationCode); return flag; } string_1 = "OK"; return flag; }
private void AnalyzeServerResponse(string serverResponse) { XmlDocument document = new XmlDocument(); document.LoadXml(serverResponse); XmlElement documentElement = document.DocumentElement; if ((documentElement != null) && ("ResponseInfo" == documentElement.Name)) { foreach (XmlNode node in documentElement.ChildNodes) { if ("ProductId" == node.Name) { this.ProductId = node.InnerText; } else if ("UnlockCode" == node.Name) { this.UnlockCode = node.InnerText; } else if ("HardwareId" == node.Name) { this.HardwareId = node.InnerText; } else if ("ActivationCode" == node.Name) { this.ActivationCode = node.InnerXml; if (node.FirstChild != null) { foreach (XmlNode node2 in node.FirstChild.ChildNodes) { if ("version" == node2.Name) { this.Version = node2.InnerText; } else if ("reginfo" == node2.Name) { this.RegistrationInfo = node2.InnerText; } else if ("licenseNum" == node2.Name) { this.LicenceNumber = node2.InnerText; } else if ("trialExpiry" == node2.Name) { this.TrialExpire = node2.InnerText; } else if ("licenseExpiry" == node2.Name) { this.LicenceExpire = node2.InnerText; } else if ("signature" == node2.Name) { this.Signature = node2.InnerText; } else if ("activationKey" == node2.Name) { this.ProductKey = node2.InnerText; } } } } else if ("ReasonCode" == node.Name) { this.ReasonCode = node.InnerText; } else if ("Reason" == node.Name) { this.Reason = node.InnerText; } else if ("Reactivation" == node.Name) { this.Reactivation = node.InnerText; } else if ("Explanation" == node.Name) { this.Explanation = node.InnerText; } else if ("Resolution" == node.Name) { this.Resolution = node.InnerText; } } } }
public virtual void WriteActivationInformation(string activationData) { LicenceManager manager = new LicenceManager(this.apexSQLProducts_0, this.string_1); ActivationResponse response = ActivationResponse.Deserialize(activationData); this.activationInfo_0.HardwareID = response.HardwareId; this.activationInfo_0.Version = int.Parse(response.Version); this.activationInfo_0.NumberOfLicenses = int.Parse(response.LicenceNumber); this.activationInfo_0.RegistrationInformation = response.RegistrationInfo; this.activationInfo_0.ProductKey = response.ProductKey; this.activationInfo_0.TrialExpiryDate = DateTime.ParseExact(response.TrialExpire, "MM-dd-yyyy", CultureInfo.InvariantCulture); this.activationInfo_0.LicenseSubscriptionExpiryDate = DateTime.ParseExact(response.LicenceExpire, "MM-dd-yyyy", CultureInfo.InvariantCulture); this.activationInfo_0.Signature = response.Signature; if (!manager.SaveLicenceFile(this.activationInfo_0)) { throw new Exception("Unable to save license file."); } this.Refresh(); }
看起来还是蛮简单的,只要对XML字符串进行ZIP算法压缩(程序中有)再进行base64,然后在验证方法直接返回TRUE基本上就OK了。
当然这样比较暴力,不符合俺一向认真负责的态度~~~但是不暴力的话就得更改下publickey……
然后。。就没有然后了,如果以后有时间,还可以再研究一下。
时间: 2024-10-12 04:52:47