X-pack破解教程用於5.x

X-pack破解教程用於5.x
1.
下載反編譯軟件JD-GUI
2.
進入/elasticsearch/plugins/x-pack,把自己版本你的x-pack-5.5.1.jar拷貝到自己電腦,順便備份一下現有版本
3.
打開x-pack-5.5.1.jar進入到org.elasticsearch/license/LicenseVerifier.class將LicenseVerifier.class反編譯保存爲LicenseVerifier.java主要修改的內容如下
public class LicenseVerifier
{
public static boolean verifyLicense(final License license, final byte[] encryptedPublicKeyData) {
return true;
}
public static boolean verifyLicense(final License license) {
return true;
}
}
4.
將LicenseVerifier.java上傳到一個新建的目錄,並且重新去編譯LicenseVerifier.class,使用到了自身elasticsearch去編譯
javac -cp "/opt/elk/elasticsearch5_1/lib/elasticsearch-5.5.1.jar:/opt/elk/elasticsearch5_1/lib/lucene-core-6.4.1.jar:/opt/elk/elasticsearch5_1/plugins/x-pack/x-pack-5.5.1.jar" LicenseVerifier.java
5.
將原來的/opt/elk/elasticsearch5_1/plugins/x-pack/x-pack-5.5.1.jar拷貝到一個新目錄,然後去解壓unzip x-pack-5.5.1.jar 用新生成的LicenseVerifier.class替換舊的class
6.
重新打包jar cf x-pack-5.5.1.jar ./*
7.
覆蓋原來的x-pack-5.5.1.jar
8.
申請一個有效的一個license,地址https://license.elastic.co/registration 可以修改一下這個json文件因爲名字太長了,然後修改裏面的內容type後面的basic爲platinum,即白金版,有所有功能,然後修改有效期expiry_date_in_millis後面的數字爲:1811254440000
9.
更新license:curl -XPUT -u elastic 'http://192.168.172.110:9201/_pack/license' -H "Content-Type: application/json" -d @xxxxxx.json
更新成功會返回:{"acknowledged":true,"license_status":"expired"}
10.
重啓elasticsearch打開kibana監控就可以看到elasticsearch有效期
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章