default.aspx
<%@ Page Language="C#" %><%
string selfKey = "<RSAKeyValue><Modulus>s5gFuTn3BHlxalPMSXeSrLZl8uABQCYklXDax21sSmq54Oit7Iw1oAh7bQCQ6D3yia04lZOtHPEr0gDDDbViu0fwdd0nZA5xm1l0wxuPapxl4dRmm1/330HqTfRtAklTFkWBE5LHBLlRc8OJvjqx7jCYAq7mZGnjEifSo/hX520=</Modulus><Exponent>AQAB</Exponent><P>5bHruyJWPU9ZK7zn4DDXfYoOp/MUDA8HK+zlzvtfr71o/z75W7YDaS9xOkusLxlDn5Z5mpx0DUjxi+OpO6FAYQ==</P><Q>yClC8S/PprryMEDCAA3LNnZRb+eKSNd725WlUGMInRvDKJzF7Yic/P7mbqWc7Hw69R9MpaTcuveBNGmr6ESyjQ==</Q><DP>m1q5W7qfpZwTbbe5BTNDrI9B1mpcNsO7UARMcrAmSdDMQUcwlM0IhY4nAQzJipmF2VyHJwGGpK2fYcQ7ZC9uQQ==</DP><DQ>CdQM127zkUpIrhnf7MTAn7H7mbUS0zTRfhzA+0uBlsVQNeRMy7cTjlCt2+0B4ZLQCk05JEEOHZgdngc6S7Nj2Q==</DQ><InverseQ>KrBTzGAbtHbiNmH7zyb+Sx7IQjM9i311cDgL9jD9jmDbBumCBm/4B/NiANPW8Xq7zNePqEvNHRpV2pvbWbQE0g==</InverseQ><D>AJUTG60k8GZGaF5aMLjLCHVU8ksopeEZyERD6Vag/cLH1INcoQI5YEn2wH06ew5MXYbqwo1mh8v+ZOFswHwglFJ8FC2D234+tIMxYisPkX5e6eNHHuxsw3xK/tY7BGPNr2UmNpZAc3bTi9FIQkT2DiSWwLRpI52oDdVDmORWdEE=</D></RSAKeyValue>";
string product = Request["product"];
string version = Request["version"];
string platform = Request["platform"];
string license_key = Request["license_key"];
string machine_id = Request["machine_id"];
byte[] returnBit = null; try
{
using (System.Security.Cryptography.RSACryptoServiceProvider rSACryptoServiceProvider = new System.Security.Cryptography.RSACryptoServiceProvider())
{
rSACryptoServiceProvider.FromXmlString(selfKey);
license_key = Encoding.ASCII.GetString(rSACryptoServiceProvider.Decrypt(Convert.FromBase64String(license_key), true));
returnBit = rSACryptoServiceProvider.SignData(Encoding.ASCII.GetBytes(license_key + machine_id), new System.Security.Cryptography.SHA1CryptoServiceProvider());
}
}
catch (Exception)
{
return;
}
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
formatter.Serialize(Response.OutputStream, product, null);
formatter.Serialize(Response.OutputStream, DateTime.Now.AddYears(), null);
formatter.Serialize(Response.OutputStream, returnBit, null);
Response.ContentType = "text/html";
Response.End();
%>
一.准备文件:
Default.aspx是解决在线破解文件;PhptoolCracker.exe是替换Devsense.VisualStudio.LicensePackage.dll的小工具(Devsense.VisualStudio.LicensePackage.dll是在安装PhpTools.1.14.5514.msi成功后的主目录中的dll)
二.开工
打开系统的host文件:C:\Windows\System32\drivers\etc\hosts
添加记录:127.0.0.1 api.devsense.com
然后在当前电脑IIS默认的80网站根目录添加文件夹“license”,并且将之前下载的“default.aspx”文件拷贝到这个文件夹下,目的就是在本地建议虚拟的http://api.devsense.com/license/ 激活站点。
三.安装PhpTools.1.14.5514.msi并激活
安装完毕后,运行PhptoolCracker.exe文件(需确保你已安装 .Net Framework 4.5),加载刚才安装PhpTools.1.14.5514.msi后的根目录文件Devsense.VisualStudio.LicensePackage.dll,我的安装路径为:
C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\DEVSENSE\PHP Tools for Visual Studio 2013 1.14.5514
点击“Replace”
打开VS2013
点击 Activate Product
在License Key的输入框架随便输点什么,例如:http://endv.cnblogs.com/ ,然后点击“Activation”即可完成激活
以下是我激活后的信息:
再用VS写点PHP代码看看: