An annotation based config generator for the jnic java obfuscator
JNIC: https://jnic.dev/
In the project that you plan on protecting with jnic implement the following interface
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface jnic {}
Then proceed to annotate every method that you want to protect in your project with the @jnic annotation, like so:
@jnic
public void logger(String msg) {
System.out.println(msg);
}
When you want to protect your jar, download the latest release of JnicHelper from the releases tab
and run it with the command
java -jar JnicHelper.jar myJar.jar"
you also can specify output folder path
java -jar JnicHelper.jar myJar.jar OutputFolderPath"
arguments:
-mangle
or -m
- to set the mangle option in the generated config to true
-stringobf
or -s
- to set the stringobf option in the generated config to true
-desc
or -d
- to make jnic also generate the methods description
recommended settings:
java -jar JnicHelper.jar MyJar.jar -s
After running the command JnicHelper will generate a config.xml file
that will protect all the methods that are annotated with the @jnic annotation
Note: if you use another java obfuscator before obfuscating with jnic make sure to exclude the @jnic interface from being name obfuscated
Note: We did it! JNIC has implemented this annotations feature in version 3.5.0 so if you are on 3.5.0 or above there is no need to use jnichelper however we still keep this project up for anyone who is still on older versions
If you want to remove the jnic annotation from the methods for one reason or another checkout bruhisalex's tool built directly for that: https://github.com/bruhitsalex/JarAnnotationRemover