X-pack 6.4.0 破解
X-package 6.4.0 破解
获取x-pack-core-6.4.0.jar
下载 elasticsearch
下载页面:https://www.elastic.co/downloads/elasticsearch
下载下来,解压压缩包,x-pack-core-6.4.0.jar 就位于 elasticsearch-6.4.0/modules/x-pack-core 目录下面
使用luyten反编译x-pack-core-6.4.0.jar
下载 luyten
下载页面:https://github.com/deathmarine/Luyten/releases
软件下载下来,打开软件,把x-pack-core-6.4.0.jar 丢进去,就能看到我们jar包的源代码了。
我们需要把2个文件提取出来进行修改。
org.elasticsearch.license.LicenseVerifier
org.elasticsearch.xpack.core.XPackBuild
1、修改LicenseVerifier
LicenseVerifier 中有两个静态方法,这就是验证授权文件是否有效的方法,我们把它修改为全部返回true.
package org.elasticsearch.license;
import java.nio.*;
import org.elasticsearch.common.bytes.*;
import java.util.*;
import java.security.*;
import org.elasticsearch.common.xcontent.*;
import org.apache.lucene.util.*;
import org.elasticsearch.core.internal.io.*;
import java.io.*;
public class LicenseVerifier
{
public static boolean verifyLicense(final License license, final byte[] encryptedPublicKeyData) {
return true;
}
public static boolean verifyLicense(final License license) {
return true;
}
}
2、修改XPackBuild
XPackBuild 中最后一个静态代码块中 try的部分全部删除,这部分会验证jar包是否被修改.
package org.elasticsearch.xpack.core;
import org.elasticsearch.common.io.*;
import java.net.*;
import org.elasticsearch.common.*;
import java.nio.file.*;
import java.io.*;
import java.util.jar.*;
public class XPackBuild
{
public static final XPackBuild CURRENT;
private String shortHash;
private String date;
@SuppressForbidden(reason = "looks up path of xpack.jar directly")
static Path getElasticsearchCodebase() {
final URL url = XPackBuild.class.getProtectionDomain().getCodeSource().getLocation();
try {
return PathUtils.get(url.toURI());
}
catch (URISyntaxException bogus) {
throw new RuntimeException(bogus);
}
}
XPackBuild(final String shortHash, final String date) {
this.shortHash = shortHash;
this.date = date;
}
public String shortHash() {
return this.shortHash;
}
public String date() {
return this.date;
}
static {
final Path path = getElasticsearchCodebase();
String shortHash = null;
String date = null;
Label_0157: {
shortHash = "Unknown";
date = "Unknown";
}
CURRENT = new XPackBuild(shortHash, date);
}
}
编译修改后的java文件
javac -cp ".:./x-pack-core-6.3.2.jar:./elasticsearch-6.4.0/lib/*" LicenseVerifier.java
javac -cp ".:./x-pack-core-6.3.2.jar:./elasticsearch-6.4.0/lib/*" XPackBuild.java
需要注意的是,编译这两个文件的时候 需要指定依赖包的位置 如果你的位置和我的有区别,注意修改。
将编译好的class文件重新压回x-pack-core-6.4.0.jar
解压x-pack-core-6.4.0.jar 会得到一个 x-pack-core-6.4.0目录,按照其位置将编译好的2个 class文件放到我们目录里面,替换老的。
将修改过的 x-pack-core-6.4.0目录重新压成jar包。
https://stackoverflow.com/questions/18146361/how-to-create-jar-file-with-package-structure
jar -cvf x-pack-core-6.4.0_new.jar -C x-pack-core-6.4.0 .
导入授权文件
1、 先从官网申请basic授权文件
https://license.elastic.co/registration
2、 授权文件修改
{
"uid": "6fb96d6b-938c-45ff-9ce7-6b53b39cd7dd",
"type": "platinum", # 修改授权为白金版本
"issue_date_in_millis": 1530489600000,
"expiry_date_in_millis": 2855980923000, #修改到期时间为2060-07-02
"max_nodes": 100, # 修改最大节点数
"issued_to": "xxxx",
"issuer": "Web Form",
"signature":"AAAAAwAAAA3PP60wKNtAvRmuCGdSAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxaktJRVl5MUYvUWh3bHZVUTllbXNPbzBUemtnbWpBbmlWRmRZb25KNFlBR2x0TXc2K2p1Y1VtMG1UQU9TRGZVSGRwaEJGUjE3bXd3LzRqZ05iLzRteWFNekdxRGpIYlFwYkJiNUs0U1hTVlJKNVlXekMrSlVUdFIvV0FNeWdOYnlESDc3MWhlY3hSQmdKSjJ2ZTcvYlBFOHhPQlV3ZHdDQ0tHcG5uOElCaDJ4K1hob29xSG85N0kvTWV3THhlQk9NL01V",
"start_date_in_millis": 1530489600000
}
时间戳、时间转换
https://tool.lu/timestamp
3.通过API接口上传
curl -u elastic:elastic -XPUT ‘http://es-ip:port/_xpack/license’ -H “Content-Type: application/json” -d @/tmp/license.json
X-pack 6.4.0 破解的更多相关文章
- 【转】Parallels Desktop 11.2.0 破解版 最佳Mac虚拟机软件
原文网址:http://www.macappstore.net/parallels-desktop-11-pojie-ban/ Parallels Desktop 11.2.0 破解版 最佳Mac虚拟 ...
- JetBrains IntelliJ IDEA for Mac 15.0 破解版 – Mac 上强大的 Java 集成开发工具
应网友要求更新. IntelliJ IDEA 是最强大的 Java IDE 之一,由知名的Jetbrainsg公司出品,最新版本增加了大量强大易用的特性,比如 Java 8 的Lambda 表达式调试 ...
- Source Insight 4.0 破解和使用
参考出处: https://blog.csdn.net/u011604775/article/details/81698062 https://blog.csdn.net/user11223344ab ...
- MyEclipse 2016 Stable 1.0破解教程
一.下载所需文件 1. Windows最新版: MyEclipse 2016 Stable 1.0离线安装包(文件大小:1.52GB)--完整安装包,无需在线下载http://pan.baidu.co ...
- StarUML 3.0 破解方法
首先在我这里下载 StarUML3.0 破解替换文件app.asar 链接:https://pan.baidu.com/s/1wDMKDQkKrE9D1c0YeXz0xg 密码:y65m 然后参照下 ...
- 三步完成Source Insight 4.0 破解安装(转)
转自:https://blog.csdn.net/biubiuibiu/article/details/78044232 三步完成Source Insight 4.0 破解安装 下载地址有更新,之 ...
- IBM appscan 9.0破解版分享
简介:IBM AppScan该产品是一个领先的 Web 应用安全测试工具,曾以 Watchfire AppScan 的名称享誉业界.Rational AppScan 可自动化 Web 应用的安全漏洞评 ...
- Loadrunner:安装LR11.0破解步骤及License
破解步骤: 1.关闭LR相关程序 2.运行LicenseDelete程序,清除LR原来的License 3.将lm70.dll和mlr5lprg.dll这两个文件复制并粘贴到LR安装目录下的bin文件 ...
- MyEclipse7.0破解下载
MyEclipse7.0 下载地址:downloads.myeclipseide.com/downloads/products/eworkbench/7.0M1/MyEclipse_7.0M1_E3. ...
随机推荐
- css 椭圆样式
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 基于Xamarin Android实现的简单的浏览器
最近做了一个Android浏览器,当然功能比较简单,主要实现了自己想要的一些功能……现在有好多浏览器为什么还要自己写?当你使用的时候总有那么一些地方不如意,于是就想自己写一个. 开发环境:Xamari ...
- springCloud feign使用/优化总结
基于springCloud Dalston.SR3版本 1.当接口参数是多个的时候 需要指定@RequestParam 中的value来明确一下. /** * 用户互扫 * @param uid 被扫 ...
- name 'reload' is not defined解决方法
今天在学习scrapy的时候,在网上找了一段代码,运行出了一点问题. 命令行报错: name 'reload' is not defined 原因是,python版本的问题 原代码如下: import ...
- java倒计时三种简单实现方式
写完js倒计时,突然想用java实现倒计时,写了三种实现方式 一:设置时长的倒计时: 二:设置时间戳的倒计时: 三:使用java.util.Timer类实现的时间戳倒计时 代码如下: package ...
- jquery各大学选择插件
地址:http://www.jq22.com/jquery-info5565 演示地址:http://www.jq22.com/yanshi5565
- [已解决]报错:Required request body is missing
问题代码: res = requests.post(getXxxxList_url, headers=headers, data={}) 对象网站: angular4 apache 通过验证 (coo ...
- spring boot(二):启动原理解析
我们开发任何一个Spring Boot项目,都会用到如下的启动类 @SpringBootApplication public class Application { public static voi ...
- Elastic Stack-Elasticsearch使用介绍(六)
一.前言 很久没有更新博客,实在对不住大家.从10月份假期以后我就开始优化程序,来应对双11,这段时间确实很忙,不好意思.好在优化效果还不错,我负责的模块在双11期间没有任何大问题,整体效果还 ...
- remote: Permission to user_name/Code.git denied to other_user_name. fatal: unable to access 'https://github.com/user_name/Code.git/': The requested URL returned error: 403
Error msg: $ git push remote: Permission to xxx/Code.git denied to xxxxxx. fatal: unable to access ' ...