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. nodejs express 框架解密2-如何创建一个app

    本文是基于express 3.4.6 的 1.在我们的app.js 文件里面有这么几行 http.createServer(app).listen(app.get('port'), function( ...

  2. 【Cocos2d-Js基础教学(2)类的使用和面向对象】

    类的使用和面向对象 大家都知道在cocos2d-x 底层是C++编写的,那么就有类的概念和继承机制. 但是在JS中,是没有类这个概念的,没有提供类,没有C++的类继承机制. 那么JS是通过什么方式实现 ...

  3. iOS10 CoreData新特性

    原文地址:What's New in Core Data in macOS 10.12, iOS 10.0, tvOS 10.0, and watchOS 3.0 翻译者:肖品,原创文章转载请著名出处 ...

  4. 【特别推荐】8个富有创意的jQuery/CSS3插件

    现在的互联网上什么都有,但是真正好的创意却非常稀缺,包括WEB界面也是如此,今天我们要特别推荐8个富有创意的jQuery/CSS3插件,也许这几个插件能让你的WEB界面更加富有创意和人性化. 1.jQ ...

  5. JS - Cookie: getCookie, setCookie

    JS function for Cookie 如果cookie未设置,判断时与空字符串‘’比较: function setCookie(cname, cvalue, exdays) { var d = ...

  6. LeetCode:5_Longest Palindromic Substring | 最长的回文子串 | Medium

    题目: Given a , and there exists one unique longest palindromic substring. 解题思路:1.简单思路:暴力破解法,时间复杂度O(n^ ...

  7. 【cs229-Lecture17】离散与维数灾难

    主要内容: 解决MDP问题的算法: 离散化: 模型MDP的同化型: (model/similator) 拟合值迭代算法: Q函数: 近似政策迭代: 笔记转自:http://blog.csdn.net/ ...

  8. 贴近用户体验的jQuery日期选择插件

    分享一款贴近用户体验的jQuery日期选择插件.这是一款双日历jQuery日期选择时间插件pickerDateRange.效果图如下: 在线预览   源码下载 var dateRange = new ...

  9. How ADB works

    ADB (Android Debug Bridge): How it works? 2012.2.6 early draft Tetsuyuki Kobayashi What is ADB? If y ...

  10. Python 闭包

    什么是闭包? 闭包(closure)是词法闭包(lexical closure)的简称.闭包不是新奇的概念,而是早在高级程序语言开始发展的年代就已产生. 对闭包的理解大致分为两类,将闭包视为函数或者是 ...