试用elasticsearch
Dockerfile
ARG VERSION FROM docker.elastic.co/elasticsearch/elasticsearch:${VERSION} AS Baseline FROM openjdk:17-jdk-buster ARG VERSION ARG HTTP_PROXY ARG HTTPS_PROXY ENV VERSION=${VERSION} WORKDIR /crack COPY --from=Baseline /usr/share/elasticsearch/lib /usr/share/elasticsearch/lib COPY --from=Baseline /usr/share/elasticsearch/modules/x-pack-core /usr/share/elasticsearch/modules/x-pack-core COPY build_crack_jar.sh /crack RUN apt update && apt install -y zip CMD [ "bash", "build_crack_jar.sh" ]
crack.sh
#!/bin/bash if [ ! "$1" ] ;then echo "You have not entered a version" exit fi version=$1 echo -e "\033[36mRun for version: ${version}\033[0m" service_name="elastic-crack" docker stop ${service_name} docker rm ${service_name} docker build --no-cache -f Dockerfile \ --build-arg VERSION="${version}" \ --tag ${service_name}:${version} . docker run -it --rm \ -v $(pwd)/output:/crack/output \ ${service_name}:${version}
获取新文件
# version=8.8.2
# bash crack.sh $version
# ls -lh output/
total 8.8M
-rw-r--r-- 1 root root 1.5K Jul 6 12:27 LicenseVerifier.class
-rw-r--r-- 1 root root 2.1K Jul 6 12:27 LicenseVerifier.java
-rw-r--r-- 1 root root 1.5K Jul 6 12:27 XPackBuild.class
-rw-r--r-- 1 root root 2.2K Jul 6 12:27 XPackBuild.java
-rw-r--r-- 1 root root 4.5M Jul 6 12:27 x-pack-core-8.8.2.crack.jar
-r--r--r-- 1 root root 4.4M Jul 6 12:27 x-pack-core-8.8.2.jar
elastic8.json
{ "license": { "uid": "d177620f-46ef-4389-8694-4f1d1cb232f0", "type": "platinum", "issue_date_in_millis": 1682640000000, "expiry_date_in_millis": 4081372171000, "max_nodes": 1000, "issued_to": "elastic", "issuer": "elastic", "signature": "AAAAAwAAAA1Mj/kViFP0DDokihMTAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxaktJRVl5MUYvUWh3bHZVUTllbXNPbzBUemtnbWpBbmlWRmRZb25KNFlBR2x0TXc2K2p1Y1VtMG1UQU9TRGZVSGRwaEJGUjE3bXd3LzRqZ05iLzRteWFNekdxRGpIYlFwYkJiNUs0U1hTVlJKNVlXekMrSlVUdFIvV0FNeWdOYnlESDc3MWhlY3hSQmdKSjJ2ZTcvYlBFOHhPQlV3ZHdDQ0tHcG5uOElCaDJ4K1hob29xSG85N0kvTWV3THhlQk9NL01VMFRjNDZpZEVXeUtUMXIyMlIveFpJUkk2WUdveEZaME9XWitGUi9WNTZVQW1FMG1DenhZU0ZmeXlZakVEMjZFT2NvOWxpZGlqVmlHNC8rWVVUYzMwRGVySHpIdURzKzFiRDl4TmM1TUp2VTBOUlJZUlAyV0ZVL2kvVk10L0NsbXNFYVZwT3NSU082dFNNa2prQ0ZsclZ4NTltbU1CVE5lR09Bck93V2J1Y3c9PQAAAQB+UgXp8+9jDR7U2Roxj4caOUYvtO3+GEU/AGVgrC7LHZTKDQkD8h36pneSK1Iwh0HTvi9kKmdWmqU6DiSwiOMW/Bu+ouItG5XlG+THiC1vDzVmknWU+MKIr9agGaEz4bsaqv70rO8MaivOLgEsj61cgDbpNL4jfLuCpiHbMB/X8XaftLCl70URcRnNTJ64PhobBFwHg0XV344FLInlRSpOWeQr29Nh94iB5bxBeKsXwhmoP9O1NtKAmPoKJUttBXQ757/BnyzruK8+sxGOv8XVCkC+xjVTqeyd3Lp5WUNw7jm4Bb7XspDWWjjRDYh4Omci94VetP+QtcoQmAiBarKi", "start_date_in_millis": 1682640000000 } }
参考:
https://github.com/wolfbolin/crack-elasticsearch-by-docker
https://songxwn.com/Elasticsearch-x-pack-core/
https://github.com/Songxwn/crack-elasticsearch-by-docker
Copyright © 2024 Primzahl. All rights reserved.