Ext.NET 4.1 最新版本破解

今天在将Ext.NET 4.1版本的程序发布到公网时居然要license(localhost和127.0.0.1不收费),而且一年$4999,突然间觉得这是什么鬼,居然还收费!如图:

大大的一个UNLICENSED!

网上搜索破解方法,好像都没什么用,唯一有启发的是这篇文章(虽然不能解决我的问题):

http://blog.csdn.net/xyun52/article/details/24011507

下面就具体说下我是如何破解该问题的:

右键查看了一下源码,license多了以下两个:

<link type="text/css" rel="stylesheet" href="/ExtTest/extnet/unlicensed/css/un-embedded-css/ext.axd?v=4.1.0" />
<script type="text/javascript" src="/ExtTest/extnet/unlicensed/un-js/ext.axd?v=4.1.0"></script>

一个样式文件,一个js文件。

为了一探究竟我打算用Reflector反编译看看究竟Ext.Net.dll里对License封装了什么,

由于内容较多,我直接搜索”License”,结果还是挺满意的:

看Resouces,正好一个样式文件,一个js文件。

先看看Resources部分:

1.先看中间图片:Ext.Net.Build.Ext.Net.extnet.unlicensed.images.attention.png

这就是图1里显示警告的图。

2.再来看js方法:Ext.Net.Build.Ext.Net.extnet.unlicensed.un.js
Ext.onReady(function () {
Ext.Function.defer(function () {
var el = Ext.DomHelper.append(document.body, {
tag: "div",
id: "unlicensed",
children: [{
tag: "div",
class: "ul-title-icon",
children: [{
tag: "img",
width: 48,
height: 48,
src: Ext.net.ResourceMgr.resolveUrl("~/extnet/unlicensed/images/attention-png/ext.axd")
}]
}, {
tag: "div",
class: "ul-title",
html: "UNLICENSED!"
}, {
tag: "hr",
class: "ul-hr"
}, {
tag: "div",
class: "ul-body",
html: "Your copy of Ext.NET is unlicensed!<br />Ext.NET can be used without a license only on a local development environment."
}, {
tag: "a",
class: "ul-btn",
href: "http://ext.net/store/",
target: "_blank",
html: "PURCHASE LICENSE"
}, {
tag: "div",
class: "ul-footer",
html: "Free Minor Version Upgrades Included!"
}]
}, true); el.alignTo(document, "br-br", [-20, -20]);
el.slideIn("b", {
listeners: {
afteranimate: function () {
Ext.Function.defer(function () {
el.slideOut("b", {
listeners: {
afteranimate: function () {
Ext.Function.defer(el.destroy, 100, el);
}
}
});
}, 20000);
}
}
});
}, 500, window);
});

图1里的警告信息就是来自于这里。

再来看看ResourceManager部分:

下面来分析LicenseKey和IsValidLicenseKey:

LicenseKey反编译代码:

[DefaultValue(""), Description("")]
public virtual string LicenseKey
{
get
{
if (this.licenseKey != null)
{
return this.licenseKey;
}
if (base.DesignMode)
{
return "";
}
if (Globals.Context != null)
{
string name = "Ext.Net.LicenseKey";
object obj2 = Globals.Application[name];
if (obj2 == null)
{
obj2 = Session(name);
}
if ((obj2 != null) && (obj2 is string))
{
return (string) obj2;
}
}
return GlobalConfig.Settings.LicenseKey;
}
set
{
this.licenseKey = value;
}
}

这段代码的功能就是获取LicenseKey的值:从某个地方读取(比如session)名称为” Ext.Net.LicenseKey”的值。

IsValidLicenseKey反编译代码:

public bool IsValidLicenseKey
{
get
{
if (!this.isValidLicenseKey.HasValue)
{
this.isValidLicenseKey = false;
string licenseKey = this.LicenseKey;
if (licenseKey.IsNotEmpty())
{
try
{
licenseKey = licenseKey.Base64Decode();
}
catch (FormatException)
{
}
if (licenseKey.IsNotEmpty())
{
int num;
DateTime time;
string[] strArray = licenseKey.Split(new char[] { ',' });
if ((((strArray.Length == ) && int.TryParse(strArray[], out num)) && ((num >= ) && DateTime.TryParseExact(strArray[], "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out time))) && (time >= DateTime.Now))
{
this.isValidLicenseKey = true;
}
}
}
}
return this.isValidLicenseKey.Value;
}
}

这段代码的作用就是对LicenseKey的值进行校验,可以获取到LicenseKey值的信息为:

1. LicenseKey值是以逗号分隔的;

2.逗号分隔后,长度为3;

3.逗号分隔后,第2个值为数字,且大于等于4;

4. 逗号分隔后,第3个值为日期,且要大于当前时间,格式为"yyyy-MM-dd",可以猜测为这个值为有效期。

根据这些信息,LicenseKey的值很快可以构建出来,比如:“net,5,2018-11-11”

再注意到这行代码:

licenseKey = licenseKey.Base64Decode();

这就是LicenseKey的编码格式,也就是说传入的LicenseKey不能直接是“net,5,2018-11-11”这样的值,必须是经过转换后的,

跟进去看一下代码:

public static string Base64Decode(this string text)
{
Decoder decoder = new UTF8Encoding().GetDecoder();
byte[] bytes = Convert.FromBase64String(text);
char[] chars = new char[decoder.GetCharCount(bytes, , bytes.Length)];
decoder.GetChars(bytes, , bytes.Length, chars, );
return new string(chars);
}

使用的方法是:Convert.FromBase64String(text),很显然,编码方式给的很彻底,这里直接给出转换代码:

string LicenseKey = "net,5,2018-11-11";
byte[] b = Encoding.Default.GetBytes(LicenseKey);
LicenseKey = Convert.ToBase64String(b);
Session["Ext.Net.LicenseKey"] = LicenseKey;

最后以Session传值(只需要上面4行代码即可),搞定。

看,没有警告了,而且是真正通过验证了。

好了,破解就研究到这里吧。

大家可以将LicenseKey放到ResourceManager中,这样就可以通用了。

Ext.NET 4.1 最新版本破解的更多相关文章

  1. 最近做了一个通达OA的大料:20170905最新版本破解可改单位名称,无限制安装

    最近做了一个通达OA的大料:20170905最新版本破解可改单位名称,无限制安装 用户约七十家,总体不错,修改了两次注册授权文件,完美使用中 可联系麦枫http://www.mfsun.com管理员Q ...

  2. Avada v5.0.6 最新版本破解教程如下:

    Avada v5.0.6 最新版本破解教程如下: .找到\themes\Avada\includes\avada-envato-api.php文件,注释掉如下两行代码 $response_code = ...

  3. 2018-3 WebStorm最新版本破解方法

    今天重新打开WebStorm发现之前输入的License Server没法用了,不能通过WebStorm的检测,搜索良久,终于找到了最新版本WebStorm的破解方法. 在激活页面选择License ...

  4. Navicat15最新版本破解 亲测可用!!!

    1.下载Navicat Premium官网https://www.navicat.com.cn/下载最新版本下载安装 2.本人网盘链接:https://pan.baidu.com/s/1ncSaxId ...

  5. 资源:Navicat15最新版本破解 亲测可用(2020-11-14)

    1.下载Navicat Premium 官网https://www.navicat.com.cn/下载最新版本下载安装 2.网盘下载破解 本人网盘链接:https://pan.baidu.com/s/ ...

  6. Navicat15最新版本破解 亲测可用!!!(Navicat Premium 注册出现 No All Pattern Found! File Already Patched)

    1.下载Navicat Premium官网https://www.navicat.com.cn/下载最新版本下载安装 2.本人网盘链接:https://pan.baidu.com/s/1ncSaxId ...

  7. Navicat15 最新版本破解版操作步骤

    1.关于Navicat 15的安装版本以及破解机下载 分享的网盘连接:https://pan.baidu.com/s/12DaG0TmS9hXlYmJ_T5ytz2rA 提取码:7cg6 2.安装Na ...

  8. Reveal1.5破解,iOS_UI调试利器Reveal最新版本破解方法

    Reveal1.0.7破解 1.官网下载最新版Reveal,拖动应用程序中,运行一次2.下载16进制编辑器"0xED" for mac(http://dl.vmall.com/c0 ...

  9. idea2019 3.3最新版本破解安装教程

    直接给上神秘地址得了:(应该都可以破解) https://www.jianshu.com/p/c7bdc5819d31

随机推荐

  1. 用issnode+IIS来托管NodeJs Server

    用issnode+IIS来托管NodeJs Server之一:安装篇 用issnode+IIS来托管NodeJs Server之二:移植 用issnode+IIS来托管NodeJs Server之三: ...

  2. git常用命令-基本操作

    git常用命令-基本操作 1)      新增文件 新增了Test_1.java git add Test_1.java git commit –m “新增了Test_1.java” git push ...

  3. 使用dynamic类型改进反射

    首先还是声明一下,使用场景: 1.如果编译时函数名称确定,对象类型运行时确定,那么运用dynamic是一个好主意.2.如果编译时函数名称确定,对象类型在编译时也确定,那就既不需要反射也不需要dynam ...

  4. memcached命令

    memcached相对于redis来说,简直简单太多,命令也少很多,一般应用都是使用redis,但了解一下也还是不错的. 具体命令和用法很参见:http://www.runoob.com/memcac ...

  5. Nginx 301重定向的配置

    301重定向是很常见的需求,比如访问 fz1688.com,自动跳到 www.fz1688.com.或者倒过来,访问 www.fz1688.com 跳到 fz1688.com.Nginx 中配置 30 ...

  6. U-boot.lds文件分析

    OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ...

  7. 多条件动态LINQ 组合查询

    本文章转载:http://www.cnblogs.com/wangiqngpei557/archive/2013/02/05/2893096.html 参考:http://dotnet.9sssd.c ...

  8. MFC下调用控制台和控制台下MFC库的支持

    1.MFC下调用控制台 在CWinApp的InitInstance中对话框的DoModal之前加入 AllocConsole(); // 开辟控制台 SetConsoleTitle(_T(" ...

  9. Android SDK开发包国内下载地址

    不知道是因为最近kaihui还是怎么的,打开android sdk官方网站特别的慢,想下载最新版本的platform几乎变成不可能完成的任务,不知道为什么Google不像Apache那样在各国设立镜像 ...

  10. C#基础总结之六 DataTable (临时表/数据源) 和Datatable 名片练习

    #region DataTable (临时表/数据源) 存储数据 DataTable dataTable = new DataTable(); dataTable.Columns.Add(" ...