jrebel其实jrebel 破解很简单。用到的工具有 jd-gui 地址。jd-gui是 java 反编译工具,非常好用。破解方法

先做个广告,毕竟么,我支持收费。可惜鸡国不支持。

Why Use JRebel?

Reload Changes Instantly

Stop waiting for build & redeploy to fix a damn typo. Test changes in real time.


Change Anything

Afraid to make a change? Experiment freely to see what happens and revert anytime.


Finish Your Sprint Early

JRebel increases team velocity up to 40% (backed by surveys and case studies).

From:http://symphony.b3log.org/article/1358592244930

其实jrebel 破解很简单。用到的工具有 jd-gui   地址。jd-gui是 java 反编译工具,非常好用。

用  jd-gui 打开jrebel的jar就可以看到如图。这个UserLicense 类是,用来读取jrebel.lic 的,既然可以读取,反过来我们也可以重写License。

我们重写的license 包括以下内容就可以了。

Map testmap=new HashMap();
testmap.put("Name", "test");
testmap.put("Product", "JavaRebel");
testmap.put("Seats", "Unlimited");
testmap.put("override", "true");
testmap.put("Comment", " ####### ######");
testmap.put("enterprise", "true");
testmap.put("Organization", "test");
testmap.put("commercial", "true");
testmap.put("noBanner", "false");

不知道如何重写license 可以在jrebel 文件中查看  是如何读取文件的。

用我们重写过的license 替换原来的,启动 jrebel ,jrebel 会认为这个license是非法的。因为我们自己重写的license 是通不过jrebel的验证的。

解决办法就是取消jrebel的验证。这里要用到 javassist 去修改class文件。jrebel 的源代码是经过混淆处理的,很难看。

public byte[] getSignature()
{
return this.signature;
}

这个方法就是验证lic 是否有效,jd 收索 看哪里到用来这个方法,再修改那个方法直接返回true就可以了。应该可以看到多个地方有调用,我们只需要修改,调用getSignature的方法返回

类型是boolean 的修改就可以了。

修改完后,写到本地份文件,再用反编译工具查看是否正确。

再就是把修改过后的class 替换原来的就行了,替换方法 http://www.sdandroid.com/jar-update-file.html

 

javassist 的具体使用自行收索。

 

再启动jrebel 时就没有了非法的提示了。

 

这里就不提供源码的,实在有不懂的可以联系我。

=

=

=

+

=

=

=

猜你喜欢

转载自fantaxy025025.iteye.com/blog/2223788