javassist fr8.0破解

 

主要是破解连接数的.

已破解的jar:http://download.csdn.net/download/wolf12/9834152

public static void main(String[] args) {
// TODO Auto-generated method stub

//这个是得到反编译的池
ClassPool pool = ClassPool.getDefault();
try {
//取得需要反编译的jar文件,设定路径
pool.insertClassPath("C:\\FineReport_8.0\\WebReport\\WEB-INF\\fr-core-8.0.jar");
//取得需要反编译修改的文件,注意是完整路径
CtClass cc1 = pool.get("com.fr.web.core.SessionDealWith");
//取得需要修改的方法
//todo 修改验证是否注册方法
CtMethod method = cc1.getDeclaredMethod("authenticateLicense");
//插入修改项,我们让他直接返回(注意:根据方法的具体返回值返回,因为这个方法返回值是void,所以直接return;)
method.insertAfter("{ registed = true;}");

//修改验证是否超过并发数据方法
CtMethod dealWithOverFlow=cc1.getDeclaredMethod("isAddressOverFlow");
dealWithOverFlow.insertBefore("{ return false;}");
//写入保存
cc1.writeFile();
} catch (NotFoundException e) {
e.printStackTrace();
} catch (CannotCompileException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

}

 

压缩在指定目录
jar -uvf jarname.jar com\3\licensing\a\B.class

还有其他的工具可以修改class:jclasslib_windows_3_0,Java Class File Editor 等.

posted on 2017-05-05 10:55  wolf12  阅读(512)  评论(0编辑  收藏  举报