GithubHelp home page GithubHelp logo

karlbrown87 / protector4j Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inaccel/protector4j

0.0 0.0 0.0 8 KB

Protect Java Code from Decompilation, beyond Obfuscation

License: Apache License 2.0

Dockerfile 12.77% Go 87.23%

protector4j's Introduction

What is Protector4J

VLINX Protector4J is a tool to prevent Java applications from decompilation. Protector4J provides a custom native ClassLoader by modifying the JVM. The Java classes are encrypted by AES and decrypted in the native ClassLoader.

Quick reference

How to use this image

You can run a VLINX Protector4J task by using this Docker image directly, passing the Java task parameters to docker run:

$ docker run -it --rm --name my-java-task -u $(id -u):$(id -g) -v $(pwd):/usr/src/myvlinx -w /usr/src/myvlinx inaccel/protector4j \
	--version <jre-version> \
	--email <account-email> \
	--password <md5-of-password> \
	--protect-all \
	jar-path1 jar-path2 ...

Building local Docker image (optional)

This is a base image that you can extend, so it has the bare minimum packages needed. If you add custom package(s) to the Dockerfile, then you can build your local Docker image like this:

$ docker-compose build

Multi-stage Builds

You can build your application with Maven, protect it with Protector4J and package everything in an image that does not include Maven nor Protector4J using multi-stage builds.

# build
FROM maven
WORKDIR /usr/src/app
COPY pom.xml .
RUN mvn -B -e -C -T 1C org.apache.maven.plugins:maven-dependency-plugin:3.1.1:go-offline
COPY . .
RUN mvn -B -e -o -T 1C verify

# protect
FROM inaccel/protector4j
WORKDIR /usr/src/app
COPY --from=0 /usr/src/app .
ARG VLINX_EMAIL
ARG VLINX_PASSWORD
RUN vlinx-protector4j \
	--version 11 \
	--email ${VLINX_EMAIL} \
	--password ${VLINX_PASSWORD} \
	--protect-all \
	target/*.jar

# package without maven, protector4j
FROM debian
ENV JAVA_HOME="/usr/vlinx/jre"
ENV PATH="${JAVA_HOME}/bin:${PATH}"
COPY --from=1 /usr/src/app/jre ${JAVA_HOME}
COPY --from=1 /usr/src/app/target/*.jar ./

protector4j's People

Contributors

eliaskoromilas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.