├── assets ├── Vars.csv ├── Classes.csv ├── Functions.csv ├── test3.py ├── config.cfg ├── test.py └── test2.py ├── settings.gradle ├── plugins └── Watermark.jar ├── src └── main │ ├── resources │ └── logo.png │ └── java │ └── org │ └── madmeg │ ├── api │ ├── obfuscator │ │ ├── tasks │ │ │ ├── Task.java │ │ │ ├── FactoryWorker.java │ │ │ ├── elements │ │ │ │ └── RenameObject.java │ │ │ └── TaskFactory.java │ │ ├── SplitFile.java │ │ ├── RandomUtils.java │ │ ├── EncodingUtils.java │ │ ├── Mapper.java │ │ ├── FindString.java │ │ └── Loader.java │ ├── plugin │ │ ├── Plugin.java │ │ ├── ClassLoader.java │ │ └── PluginLoader.java │ ├── FileLoader.java │ ├── Color.java │ └── logger │ │ └── Logger.java │ └── impl │ ├── tasks │ ├── RenameImports.java │ ├── EncodeInts.java │ ├── RemoveComments.java │ ├── EncodeCode.java │ ├── EncodeString.java │ ├── RenameVars.java │ ├── RenameClass.java │ ├── AddGarbage.java │ ├── RenameFunction.java │ └── EncodeImports.java │ ├── Core.java │ ├── config │ ├── ConfigLoader.java │ └── Config.java │ └── gui │ └── Gui.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .github └── ISSUE_TEMPLATE │ ├── suggestion.md │ └── bug.md ├── LICENSE.md ├── gradlew.bat ├── gradlew ├── .gitignore ├── Output.py └── README.md /assets/Vars.csv: -------------------------------------------------------------------------------- 1 | test,w3NujkRDVlYPWPblNyAXNP 2 | -------------------------------------------------------------------------------- /assets/Classes.csv: -------------------------------------------------------------------------------- 1 | Example,w3KpXoPscpuPqQnJymvcVi 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'Python-Obfscation' 2 | 3 | -------------------------------------------------------------------------------- /assets/Functions.csv: -------------------------------------------------------------------------------- 1 | main,w3mEseGftlKQuPFfOPGgdo 2 | test,w3JHiSrHBIrzZNetfbEEti 3 | -------------------------------------------------------------------------------- /plugins/Watermark.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Madmegsox1/Python-Obfuscator/HEAD/plugins/Watermark.jar -------------------------------------------------------------------------------- /src/main/resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Madmegsox1/Python-Obfuscator/HEAD/src/main/resources/logo.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Madmegsox1/Python-Obfuscator/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /assets/test3.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | class Example(): 4 | def __init__(self): 5 | print("test" + ' asdasd') # test 6 | print(random.seed(7)) 7 | test = Example() -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/api/obfuscator/tasks/Task.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.api.obfuscator.tasks; 2 | 3 | /** 4 | * @author Madmegsox1 5 | * @since 09/12/2021 6 | */ 7 | 8 | public interface Task { 9 | 10 | void completeTask(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/api/plugin/Plugin.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.api.plugin; 2 | 3 | public interface Plugin { 4 | 5 | void init(); 6 | 7 | void onLoad(); 8 | 9 | void onConfig(); 10 | 11 | void onPoolTasks(); 12 | 13 | void onExecute(); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggestion.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: suggestion 3 | about: Suggest an idea for this project 4 | title: "[SUGGESTION]" 5 | labels: suggestion 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Please describe your suggestion in detail.** 11 | Add your description here 12 | 13 | 14 | **Additional context** 15 | Add any other context or screenshots about the feature here. 16 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/api/FileLoader.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.api; 2 | 3 | import java.io.File; 4 | 5 | /** 6 | * @author Madmegsox1 7 | * @since 09/12/2021 8 | */ 9 | 10 | public interface FileLoader { 11 | /** 12 | * @param file The file being loaded by the manager 13 | */ 14 | void load(File file); 15 | 16 | 17 | 18 | /** 19 | * @param path The path that the manager will save the file if needed 20 | */ 21 | void save(String path); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/api/obfuscator/SplitFile.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.api.obfuscator; 2 | 3 | import java.util.ArrayList; 4 | 5 | /** 6 | *
7 | * A constructor to store each line of the file being obfuscated. 8 | *
9 | * @author Madmegsox1 10 | * @since 09/12/2021 11 | */ 12 | 13 | public final class SplitFile { 14 | public ArrayList26 | * Clears the queue of all tasks 27 | *
28 | */ 29 | public void clearTasks(){ 30 | this.tasks.clear(); 31 | } 32 | 33 | /** 34 | *35 | * Overridable function to complete tasks pooled by the factory 36 | *
37 | */ 38 | public void runTasks(){ 39 | 40 | } 41 | 42 | /** 43 | *44 | * Overridable function to pool tasks 45 | *
46 | */ 47 | public void poolTasks(){ 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/api/Color.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.api; 2 | 3 | /** 4 | *5 | * Simple static references to chars that change the color of the command line 6 | *
7 | * @author Madmegsox1 8 | * @since 09/12/2021 9 | */ 10 | public final class Color { 11 | public static final String RESET = "\033[0m"; 12 | 13 | public static final String BLACK = "\033[30m"; 14 | public static final String RED = "\033[31m"; 15 | public static final String GREEN = "\033[32m"; 16 | public static final String YELLOW = "\033[33m"; 17 | public static final String BLUE = "\033[34m"; 18 | public static final String PURPLE = "\033[35m"; 19 | public static final String CYAN = "\033[36m"; 20 | public static final String WHITE = "\033[37m"; 21 | 22 | public static final String BLACK_BG = "\033[40m"; 23 | public static final String RED_BG = "\033[41m"; 24 | public static final String GREEN_BG = "\033[42m"; 25 | public static final String YELLOW_BG = "\033[43m"; 26 | public static final String BLUE_BG = "\033[44m"; 27 | public static final String PURPLE_BG = "\033[45m"; 28 | public static final String CYAN_BG = "\033[46m"; 29 | public static final String WHITE_BG = "\033[47m"; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/api/obfuscator/tasks/elements/RenameObject.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.api.obfuscator.tasks.elements; 2 | 3 | /** 4 | * @author Madmegsox1 5 | * @since 12/12/2021 6 | */ 7 | 8 | public final class RenameObject { 9 | public String oldName; 10 | public String newName; 11 | private String wSpace; 12 | 13 | public RenameObject(String oldName, String newName, String wSpace){ 14 | this.oldName = oldName; 15 | this.newName = newName; 16 | this.wSpace = wSpace; 17 | } 18 | 19 | public String getOldName() { 20 | return oldName; 21 | } 22 | 23 | public void setOldName(String oldName) { 24 | this.oldName = oldName; 25 | } 26 | 27 | public String getNewName() { 28 | return newName; 29 | } 30 | 31 | public void setNewName(String newName) { 32 | this.newName = newName; 33 | } 34 | 35 | public String getwSpace() { 36 | return wSpace; 37 | } 38 | 39 | public void setwSpace(String wSpace) { 40 | this.wSpace = wSpace; 41 | } 42 | 43 | @Override 44 | public String toString(){ 45 | return "Old name: '" + oldName + "' New name: '" + newName + "' wSpace:" + wSpace + ":"; 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/impl/tasks/RenameImports.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.impl.tasks; 2 | 3 | import org.madmeg.api.obfuscator.Mapper; 4 | import org.madmeg.api.obfuscator.SplitFile; 5 | import org.madmeg.api.obfuscator.tasks.Task; 6 | import org.madmeg.api.obfuscator.tasks.elements.RenameObject; 7 | 8 | import java.util.ArrayList; 9 | import java.util.Collection; 10 | import java.util.regex.Matcher; 11 | import java.util.regex.Pattern; 12 | 13 | public class RenameImports extends Mapper23 | * iterates through each line and looks for ints, The obfuscator then encodes the ints into hex, it will then replace 24 | * the string with the encoded string 25 | *
26 | */ 27 | @Override 28 | public void completeTask() { 29 | MapA static util class used to generate random data values
5 | */ 6 | public final class RandomUtils { 7 | /** 8 | * @param size the length of the generated string 9 | * @return the generated string 10 | */ 11 | public static String genRandomString(int size){ 12 | String AlphaNumericString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 13 | + "abcdefghijklmnopqrstuvxyz"; 14 | 15 | StringBuilder sb = new StringBuilder(size); 16 | 17 | for (int i = 0; i < size; i++) { 18 | int index 19 | = (int)(AlphaNumericString.length() 20 | * Math.random()); 21 | sb.append(AlphaNumericString 22 | .charAt(index)); 23 | } 24 | 25 | return sb.toString(); 26 | } 27 | 28 | /** 29 | * @param min the smallest int that can be generated 30 | * @param max the largest int that can be generated 31 | * @return the randomly generated integer 32 | */ 33 | public static int genRandomInt(int min, int max){ 34 | return (int) (Math.random() * max + min); 35 | } 36 | 37 | /** 38 | * @param min the smallest double that can be generated 39 | * @param max the largest double that can be generated 40 | * @return the randomly generated double 41 | */ 42 | public static double genRandomDouble(double min, double max){ 43 | return (Math.random() * max + min); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/api/obfuscator/tasks/TaskFactory.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.api.obfuscator.tasks; 2 | 3 | import org.madmeg.api.obfuscator.Loader; 4 | import org.madmeg.impl.tasks.*; 5 | import org.madmeg.impl.Core; 6 | 7 | /** 8 | * @author Madmegsox1 9 | * @since 09/12/2021 10 | */ 11 | 12 | public final class TaskFactory extends FactoryWorker22 | * iterates through each line and looks for a # it then splits the line at that point. 23 | * After that it will get index 0 of the list as everything after the # will be commented 24 | * out. Finally it will replace the line with the split one. 25 | *
26 | */ 27 | @Override 28 | public void completeTask() { 29 | Map15 | * Loads the file being obfuscated 16 | *
17 | * @see org.madmeg.api.FileLoader 18 | * @author Madmegsox1 19 | * @since 09/12/2021 20 | */ 21 | 22 | public final class Loader implements FileLoader { 23 | 24 | public static SplitFile FILE; 25 | 26 | public Loader(File file){ 27 | if(!file.exists()){ 28 | Core.LOGGER.printError("The file " + file.getName() + " doesnt exist"); 29 | System.exit(-1); 30 | } 31 | Core.LOGGER.printSuccess("Found the file"); 32 | load(file); 33 | Core.LOGGER.printSuccess("Loaded the file"); 34 | } 35 | 36 | /** 37 | * @param file The file being loaded by the manager 38 | */ 39 | @Override 40 | public void load(File file) { 41 | try { 42 | ArrayList26 | * The obfuscator will create a string for the file it then will encode the hole file into base64 or bin, 27 | * it cannot encode into hex if you use any other encoding types the encodes imports ect. The obfuscator then 28 | * replaces every line with this encoded string. It then does {@code exec("encoded string")} 29 | *
30 | */ 31 | @Override 32 | public void completeTask() { 33 | final StringBuilder toEncoded = new StringBuilder(); 34 | 35 | for(String line : lines){ 36 | toEncoded.append(line).append("\n"); 37 | } 38 | String encoded = ""; 39 | switch (Core.CONFIG.getEncoderType().toLowerCase()){ 40 | case "hex" -> { 41 | Core.LOGGER.printError("Cannot encode code with hex. Please edit your config!"); 42 | return; 43 | } 44 | case "base64" -> { 45 | encoded = (EncodingUtils.stringToBase64(toEncoded.toString())); 46 | } 47 | case "bin" -> { 48 | encoded = (EncodingUtils.prettyBinary(EncodingUtils.stringToBinary(toEncoded.toString()), 8, Core.CONFIG.getBinarySplitter())); 49 | } 50 | } 51 | 52 | lines.clear(); 53 | final String name = RandomUtils.genRandomString(Core.CONFIG.getNameLength()); 54 | lines.add(name + " = " + '"' + encoded + '"'); 55 | if(Core.CONFIG.getEncoderType().equals("base64")){ 56 | lines.add("import base64"); 57 | } 58 | 59 | final StringBuilder sb = new StringBuilder(); 60 | sb.append("exec("); 61 | switch (Core.CONFIG.getEncoderType().toLowerCase()){ 62 | case "base64" -> sb.append("base64.b64decode(").append(name).append("))\n"); 63 | case "bin" -> sb.append("''.join(chr(int(").append(name).append(".replace('") 64 | .append(Core.CONFIG.getBinarySplitter()).append("', '')[i*0x0008:i*0x0008+0x0008],(0x0003 - 0x0001))) for i in range(len(") 65 | .append(name).append(".replace('") 66 | .append(Core.CONFIG.getBinarySplitter()).append("', ''))//(0x0004 + 0x0004))))\n"); 67 | } 68 | lines.add(sb.toString()); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/impl/tasks/EncodeString.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.impl.tasks; 2 | 3 | import org.madmeg.api.obfuscator.EncodingUtils; 4 | import org.madmeg.api.obfuscator.FindString; 5 | import org.madmeg.api.obfuscator.SplitFile; 6 | import org.madmeg.api.obfuscator.tasks.Task; 7 | import org.madmeg.impl.Core; 8 | 9 | import java.util.ArrayList; 10 | import java.util.HashMap; 11 | import java.util.Map; 12 | 13 | /** 14 | * @author Madmegsox1 15 | * @since 29/12/2021 16 | * 17 | * only works with one string per line, easy fix but haven't got round to it yet 18 | */ 19 | 20 | public final class EncodeString implements Task { 21 | 22 | private final ArrayList31 | * iterates through each line and looks for strings, The obfuscator then encodes the string into hex, bin or 32 | * base64 depending on the config, it will then replace the string with the encoded string 33 | *
34 | */ 35 | @Override 36 | public void completeTask() { 37 | int i = 0; 38 | Map18 | * To run the this function in command line you need java 15 installed 19 | * then you will need to run the command {@code java -jar 'THIS JAR NAME'.jar 'DIR TO CONFIG FILE'}. 20 | *
21 | * 22 | * 23 | * @author 0x0001 24 | * @author Madmegsox1 25 | * @since 09/12/2021 26 | * @version 1.1.1 27 | */ 28 | 29 | public final class Core { 30 | 31 | private static final String TITLE_TEXT= """ 32 | ____ __ __ ______ __ __ ___ ____ ___ ____ _____ __ __ _____ __ ____ ______ ____ ___ ____ \s 33 | | \\| | || || | | / \\ | \\ / \\ | \\ | || | |/ ___/ / ] / || || |/ \\ | \\ \s 34 | | o ) | || || | || || _ | | || o )| __|| | ( \\_ / / | o || | | || || _ | \s 35 | | _/| ~ ||_| |_|| _ || O || | | | O || || |_ | | |\\__ |/ / | ||_| |_| | || O || | | \s 36 | | | |___, | | | | | || || | | | || O || _] | : |/ \\ / \\_ | _ | | | | || || | | \s 37 | | | | | | | | | || || | | | || || | | |\\ \\ || | | | | | || || | | \s 38 | |__| |____/ |__| |__|__| \\___/ |__|__| \\___/ |_____||__| \\__,_| \\___|\\____||__|__| |__| |____|\\___/ |__|__| \s 39 | \s"""; 40 | 41 | public static Logger LOGGER = new Logger("MAIN"); 42 | public static ConfigLoader CONFIG_LOADER; 43 | public static Config CONFIG; 44 | public static Loader LOADER; 45 | public static TaskFactory TASK_FACTORY = new TaskFactory(); 46 | public static PluginLoader PLUGIN_LOADER; 47 | 48 | /** 49 | * @param args 1st index should contain path to config file 50 | */ 51 | public static void main(final String[] args){ 52 | Gui gui = new Gui(); 53 | gui.render(); 54 | PLUGIN_LOADER = new PluginLoader(); 55 | Core.PLUGIN_LOADER.init(); 56 | } 57 | 58 | public void oldLoading(){ 59 | System.out.println(TITLE_TEXT); 60 | LOGGER.printSuccess("Loading config"); 61 | //CONFIG_LOADER = new ConfigLoader(new File(args[0])); 62 | CONFIG = CONFIG_LOADER.config; 63 | LOGGER.printSuccess("Loaded config"); 64 | LOGGER.printCommand("Input the path to the .py file you would like to Obfuscate: "); 65 | LOADER = new Loader(new File(LOGGER.readLine())); 66 | 67 | LOGGER.printSuccess("Pooling Obfuscation tasks"); 68 | TASK_FACTORY.poolTasks(); 69 | LOGGER.printSuccess("Pooled Obfuscation tasks"); 70 | 71 | LOGGER.printSuccess("Executing Obfuscation tasks"); 72 | TASK_FACTORY.runTasks(); 73 | LOGGER.printSuccess("Completed all Obfuscation tasks"); 74 | LOADER.save("Output.py"); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/impl/config/ConfigLoader.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.impl.config; 2 | 3 | import org.madmeg.api.FileLoader; 4 | 5 | import java.io.File; 6 | import java.io.FileNotFoundException; 7 | import java.util.Scanner; 8 | 9 | /** 10 | *Loads the config into the constructor {@link Config}
11 | * 12 | * @see org.madmeg.api.FileLoader 13 | * @author Madmegsox1 14 | * @since 09/12/2021 15 | */ 16 | 17 | public final class ConfigLoader implements FileLoader { 18 | 19 | public Config config; 20 | 21 | /** 22 | * @param file The config file being loaded into the {@link Config} constructor 23 | */ 24 | public ConfigLoader(File file){ 25 | load(file); 26 | } 27 | 28 | /** 29 | * @param file The file being loaded by the manager 30 | */ 31 | @Override 32 | public void load(File file) { 33 | 34 | config = new Config(); 35 | 36 | try { 37 | Scanner sc = new Scanner(file); 38 | int i = 1; 39 | while (sc.hasNextLine()){ 40 | String line = sc.nextLine(); 41 | if(line.isBlank() || line.startsWith("#"))continue; 42 | String[] data = line.replace(" ", "").split("="); 43 | if(data.length < 2){ 44 | System.err.println("Incorrect Config at line " + i); 45 | System.exit(-1); 46 | } 47 | i++; 48 | 49 | switch (data[0]){ 50 | case "rename_vars" -> config.setVarNames(isTrue(data[1])); 51 | case "rename_functions" -> config.setDefNames(isTrue(data[1])); 52 | case "rename_class" -> config.setClassNames(isTrue(data[1])); 53 | case "name_length" -> config.setNameLength(Integer.parseInt(data[1])); 54 | case "name_prefix" -> config.setNamePrefix(data[1]); 55 | case "insert_garbage" -> config.setInsertGarbage(isTrue(data[1])); 56 | case "garbage_amount" -> config.setGarbageAmount(Integer.parseInt(data[1])); 57 | case "garbage_length" -> config.setGarbageLength(Integer.parseInt(data[1])); 58 | case "remove_comments" -> config.setRemoveComments(isTrue(data[1])); 59 | case "encode_imports" -> config.setEncodeImports(isTrue(data[1])); 60 | case "encoded_list_garbage_length" -> config.setEncodedListGarbageLength(Integer.parseInt(data[1])); 61 | case "encoder_type" -> config.setEncoderType(data[1]); 62 | case "binary_splitter" -> config.setBinarySplitter(data[1]); 63 | case "encode_strings" -> config.setEncodeStrings(isTrue(data[1])); 64 | case "encode_code" -> config.setEncodeCode(isTrue(data[1])); 65 | case "encode_ints" -> config.setEncodeInts(isTrue(data[1])); 66 | case "map_path" -> config.setMapPath(data[1]); 67 | } 68 | } 69 | sc.close(); 70 | } catch (final FileNotFoundException e) { 71 | e.printStackTrace(); 72 | } 73 | } 74 | 75 | /** 76 | * @param val the sting value 77 | * @return true if the string value equals true 78 | */ 79 | private boolean isTrue(String val){ 80 | return val.toLowerCase().contains("true") || val.toLowerCase().contains("t") || val.toLowerCase().contains("1"); 81 | } 82 | 83 | /** 84 | * @param path The path that the manager will save the file if needed 85 | */ 86 | @Override 87 | public void save(String path) { 88 | 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/org/madmeg/impl/tasks/RenameVars.java: -------------------------------------------------------------------------------- 1 | package org.madmeg.impl.tasks; 2 | 3 | import org.madmeg.api.obfuscator.FindString; 4 | import org.madmeg.api.obfuscator.Mapper; 5 | import org.madmeg.api.obfuscator.RandomUtils; 6 | import org.madmeg.api.obfuscator.SplitFile; 7 | import org.madmeg.api.obfuscator.tasks.Task; 8 | import org.madmeg.api.obfuscator.tasks.elements.RenameObject; 9 | import org.madmeg.impl.Core; 10 | 11 | import java.io.IOException; 12 | import java.util.ArrayList; 13 | import java.util.Collection; 14 | import java.util.HashMap; 15 | import java.util.Map; 16 | import java.util.regex.Matcher; 17 | import java.util.regex.Pattern; 18 | 19 | 20 | /* 21 | there are a few issues with this: 22 | 1. It will replace names that are of strings value not vars 23 | 2. It won't replace vars that are like {conn, addr = s.accept()} or if there is a ',' in the line 24 | */ 25 | 26 | 27 | public final class RenameVars extends Mapper37 | * iterates through each line and looks for {@code [a-zA-Z0-9]* =[^=]} regex the obfuscator then generates 38 | * the new name for the class and maps it the {@link RenameObject} constructor it then renames the var and 39 | * var refs. 40 | *
41 | */ 42 | @Override 43 | public void completeTask() { 44 | addBulkMaps(findVars()); 45 | findRef(maps); 46 | try { 47 | saveMaps(Core.CONFIG.getMapPath()); 48 | } catch (IllegalAccessException | IOException e) { 49 | e.printStackTrace(); 50 | } 51 | } 52 | 53 | private Collection30 | * iterates through each line and looks for {@code ^class\s[a-zA-Z0-9]*} regex the obfuscator then generates 31 | * the new name for the class and maps it the {@link RenameObject} constructor it then renames the classes and 32 | * class refs. 33 | *
34 | */ 35 | @Override 36 | public void completeTask() { 37 | addBulkMaps(findFunctions()); 38 | findRef(maps); 39 | try { 40 | saveMaps(Core.CONFIG.getMapPath()); 41 | } catch (IllegalAccessException | IOException e) { 42 | e.printStackTrace(); 43 | } 44 | } 45 | 46 | private Collection22 | * Simple way of doing this, it will go through every line until it meets the line it needs to insert garbage, 23 | * it will then generate a random function filled with garbage. 24 | *
25 | */ 26 | @Override 27 | public void completeTask() { 28 | final Pattern pattern = Pattern.compile("^\s +"); 29 | Map33 | * iterates through each line and looks for {@code ^def\s[a-zA-Z0-9]*} regex the obfuscator then generates 34 | * the new name for the class and maps it the {@link RenameObject} constructor it then renames the function and 35 | * function refs. 36 | *
37 | */ 38 | @Override 39 | public void completeTask() { 40 | //findFunctions().spliterator().forEachRemaining(System.out::println); 41 | addBulkMaps(findFunctions()); 42 | findRef(maps); 43 | try { 44 | saveMaps(Core.CONFIG.getMapPath()); 45 | } catch (IllegalAccessException | IOException e) { 46 | e.printStackTrace(); 47 | } 48 | } 49 | 50 | 51 | private Collection28 | * iterates through each line and looks for a import or from it then encodes into either binary, 29 | * hex or base64. Then a list will be generated and inserted after that the obfuscator will insert 30 | * {@code exec(listName[index].decode())} for every import 31 | *
32 | */ 33 | @Override 34 | public void completeTask() { 35 | final ArrayListA constructor for configs
5 | * 6 | * @author Madmegsox1 7 | * @since 09/12/2021 8 | */ 9 | 10 | public final class Config { 11 | 12 | private boolean varNames; 13 | private boolean defNames; 14 | private boolean classNames; 15 | private int nameLength; 16 | private String namePrefix; 17 | private boolean insertGarbage; 18 | private int garbageAmount; 19 | private int garbageLength; 20 | private boolean removeComments; 21 | 22 | 23 | private boolean encodeImports; 24 | private int encodedListGarbageLength; 25 | private String encoderType; 26 | private String binarySplitter; 27 | private boolean encodeStrings; 28 | private boolean encodeInts; 29 | private boolean encodeCode; 30 | private String mapPath; 31 | 32 | public Config(){} 33 | 34 | /** 35 | * @return true if the config references obfuscation of var names {@link org.madmeg.impl.tasks.RenameVars} 36 | */ 37 | public boolean isVarNames() { 38 | return varNames; 39 | } 40 | 41 | 42 | /** 43 | * @param varNames the value set by {@link ConfigLoader} 44 | */ 45 | public void setVarNames(boolean varNames) { 46 | this.varNames = varNames; 47 | } 48 | 49 | /** 50 | * @return true if the config references obfuscation of function names {@link org.madmeg.impl.tasks.RenameFunction} 51 | */ 52 | public boolean isDefNames() { 53 | return defNames; 54 | } 55 | 56 | /** 57 | * @param defNames the value set by {@link ConfigLoader} 58 | */ 59 | public void setDefNames(boolean defNames) { 60 | this.defNames = defNames; 61 | } 62 | 63 | /** 64 | * @return true if the config references obfuscation of class names {@link org.madmeg.impl.tasks.RenameClass} 65 | */ 66 | public boolean isClassNames() { 67 | return classNames; 68 | } 69 | 70 | /** 71 | * @param classNames the value set by {@link ConfigLoader} 72 | */ 73 | public void setClassNames(boolean classNames) { 74 | this.classNames = classNames; 75 | } 76 | 77 | /** 78 | * @return the length of the obfuscated names {@link org.madmeg.impl.tasks.RenameClass}, 79 | * {@link org.madmeg.impl.tasks.RenameVars}, {@link org.madmeg.impl.tasks.RenameFunction} 80 | */ 81 | public int getNameLength() { 82 | return nameLength; 83 | } 84 | 85 | /** 86 | * @param nameLength the value set by {@link ConfigLoader} 87 | */ 88 | public void setNameLength(int nameLength) { 89 | this.nameLength = nameLength; 90 | } 91 | 92 | /** 93 | * @return the prefix at the start of every obfuscated name {@link org.madmeg.impl.tasks.RenameClass}, 94 | * {@link org.madmeg.impl.tasks.RenameVars}, {@link org.madmeg.impl.tasks.RenameFunction} 95 | */ 96 | public String getNamePrefix() { 97 | return namePrefix; 98 | } 99 | 100 | /** 101 | * @param namePrefix the value set by {@link ConfigLoader} 102 | */ 103 | public void setNamePrefix(String namePrefix) { 104 | this.namePrefix = namePrefix; 105 | } 106 | 107 | /** 108 | * @return if the obfuscator should insert random functions 109 | */ 110 | public boolean isInsertGarbage() { 111 | return insertGarbage; 112 | } 113 | 114 | 115 | /** 116 | * @param insertGarbage the value set by {@link ConfigLoader} 117 | */ 118 | public void setInsertGarbage(boolean insertGarbage) { 119 | this.insertGarbage = insertGarbage; 120 | } 121 | 122 | /** 123 | * @return the number of lines hte obfuscator should skip before inserting garbage with {@link org.madmeg.impl.tasks.AddGarbage} 124 | */ 125 | public int getGarbageAmount() { 126 | return garbageAmount; 127 | } 128 | 129 | /** 130 | * @param garbageAmount the value set by {@link ConfigLoader} 131 | */ 132 | public void setGarbageAmount(int garbageAmount) { 133 | this.garbageAmount = garbageAmount; 134 | } 135 | 136 | /** 137 | * @return the number of lines taken up by garbage {@link org.madmeg.impl.tasks.AddGarbage} 138 | */ 139 | public int getGarbageLength() { 140 | return garbageLength; 141 | } 142 | 143 | /** 144 | * @param garbageLength the value set by {@link ConfigLoader} 145 | */ 146 | public void setGarbageLength(int garbageLength) { 147 | this.garbageLength = garbageLength; 148 | } 149 | 150 | /** 151 | * @return if the obfuscator should remove comments {@link org.madmeg.impl.tasks.RemoveComments} 152 | */ 153 | public boolean isRemoveComments() { 154 | return removeComments; 155 | } 156 | /** 157 | * @param removeComments the value set by {@link ConfigLoader} 158 | */ 159 | public void setRemoveComments(boolean removeComments) { 160 | this.removeComments = removeComments; 161 | } 162 | 163 | /** 164 | * @return if the obfuscator should encode imports {@link org.madmeg.impl.tasks.EncodeImports} 165 | */ 166 | public boolean isEncodeImports() { 167 | return encodeImports; 168 | } 169 | 170 | /** 171 | * @param encodeImports the value set by {@link ConfigLoader} 172 | */ 173 | public void setEncodeImports(boolean encodeImports) { 174 | this.encodeImports = encodeImports; 175 | } 176 | 177 | /** 178 | * @return the length of the garbage in the encoded import list {@link org.madmeg.impl.tasks.EncodeImports} 179 | */ 180 | public int getEncodedListGarbageLength() { 181 | return encodedListGarbageLength; 182 | } 183 | 184 | /** 185 | * @param encodedListGarbageLength the value set by {@link ConfigLoader} 186 | */ 187 | public void setEncodedListGarbageLength(int encodedListGarbageLength) { 188 | this.encodedListGarbageLength = encodedListGarbageLength; 189 | } 190 | 191 | /** 192 | * @return the type of encoding {@link org.madmeg.impl.tasks.EncodeImports} 193 | */ 194 | public String getEncoderType() { 195 | return encoderType; 196 | } 197 | 198 | /** 199 | * @param encoderType the value set by {@link ConfigLoader} 200 | */ 201 | public void setEncoderType(String encoderType) { 202 | this.encoderType = encoderType; 203 | } 204 | 205 | /** 206 | * @return the char used to split blocks of binary in encoding {@link org.madmeg.impl.tasks.EncodeImports}, {@link org.madmeg.impl.tasks.EncodeString} 207 | */ 208 | public String getBinarySplitter() { 209 | return binarySplitter; 210 | } 211 | /** 212 | * @param binarySplitter the value set by {@link ConfigLoader} 213 | */ 214 | public void setBinarySplitter(String binarySplitter) { 215 | this.binarySplitter = binarySplitter; 216 | } 217 | 218 | public boolean isEncodeStrings() { 219 | return encodeStrings; 220 | } 221 | 222 | public void setEncodeStrings(boolean encodeStrings) { 223 | this.encodeStrings = encodeStrings; 224 | } 225 | 226 | public boolean isEncodeInts() { 227 | return encodeInts; 228 | } 229 | 230 | public void setEncodeInts(boolean encodeInts) { 231 | this.encodeInts = encodeInts; 232 | } 233 | 234 | public boolean isEncodeCode() { 235 | return encodeCode; 236 | } 237 | 238 | public void setEncodeCode(boolean encodeCode) { 239 | this.encodeCode = encodeCode; 240 | } 241 | 242 | public String getMapPath() { 243 | return mapPath; 244 | } 245 | 246 | public void setMapPath(String mapPath) { 247 | this.mapPath = mapPath; 248 | } 249 | } 250 | -------------------------------------------------------------------------------- /Output.py: -------------------------------------------------------------------------------- 1 | #Obfuscated By 0x0001 2 | 3 | w3PMkSSCQNotgKuAvGRGLo = ["01101000%01101001%01100101%01000110%01100100%01000011%01110110%01110000%01101110%01011000%01001111%01100111%01011010%01101000%01100111%01000011%01110011%01101110%01110001%01011000%01100011%01001010%01010100%01010101%01000001%01011000%01010101%01101110%01100111%01110101%01010000%01011001%01111000%01000100%01001101%01001100%01010101%01110011%01001000%01100010%01000110%01101100%01101111%01010000%01101101%01010111%01011000%01101110%01000001%01110001%01000100%01100011%01010110%01111010%01111000%01001000%01100010%01010110%01010101%01100100%01110011%01110001%01000001%01111001%01000101%01000011%01101100%01100110%01110101%01001010%01001000%01100001%01010101%01110101%01101100%01010111%01110001%01000010%01110101%01100111%01101111%01111010%01110011%01100111%01001011%01000001%01100111%01101111%01111010%01100111%01001000%01100100%01000010%01100111%01110010%01101001%01111001%01001110%01110001%01101010", "01010111%01100101%01011000%01001111%01000010%01010001%01100011%01110100%01000001%01110101%01101101%01010010%01100010%01011000%01000011%01110110%01000101%01000100%01001100%01001100%01110100%01001001%01011000%01100001%01001010%01101101%01010101%01110101%01010101%01000110%01101010%01010000%01110110%01010000%01001100%01011010%01011001%01100011%01100010%01101101%01010000%01010110%01111001%01011001%01001100%01001000%01010001%01110101%01000110%01100101%01010011%01101000%01000111%01110000%01010101%01100011%01000010%01001100%01101001%01011000%01101000%01111000%01110001%01110101%01011000%01100100%01101100%01111010%01000010%01001011%01110100%01001001%01001101%01110010%01001111%01001001%01001001%01101111%01010001%01101010%01110010%01000111%01000111%01110000%01110000%01001000%01100100%01000110%01100101%01110011%01110000%01001011%01010001%01101000%01010000%01000100%01000011%01011000%01000100%01110110", "01100100%01110001%01110100%01010011%01101001%01101010%01000001%01110001%01110100%01101010%01110010%01011010%01010011%01001100%01110011%01001110%01000111%01100111%01010011%01000010%01010010%01101100%01000010%01000111%01001011%01000111%01000110%01001100%01101111%01110000%01001000%01011000%01101010%01010001%01011000%01111000%01110100%01001000%01111010%01001101%01010011%01011000%01100011%01101000%01010000%01100101%01010001%01000010%01101010%01111001%01100111%01000010%01010000%01101010%01101000%01010101%01101101%01010101%01110100%01100101%01001000%01011001%01110000%01001110%01000110%01010101%01110011%01010101%01000110%01000011%01110101%01110011%01010101%01000101%01100101%01100101%01100001%01010100%01110101%01100011%01110110%01101101%01100011%01010000%01101001%01011001%01100101%01110100%01100010%01110000%01110110%01010100%01010111%01110010%01010110%01101101%01001001%01010000%01101100%01110011", "01111000%01101111%01110011%01010110%01001101%01010001%01110001%01001100%01100110%01110010%01001111%01101101%01110010%01010101%01101100%01011010%01100010%01101100%01000010%01110010%01000010%01010111%01001010%01010010%01110000%01100010%01100001%01001010%01101101%01110011%01001110%01001110%01010111%01101001%01000001%01101001%01100101%01001110%01111010%01100001%01000001%01001100%01010001%01010011%01000001%01001110%01100110%01110000%01110110%01100100%01001010%01110010%01101000%01101111%01110001%01010101%01001011%01010101%01101010%01001100%01010101%01101111%01101100%01010101%01001000%01011001%01101100%01011010%01101011%01000101%01010010%01010010%01000010%01101111%01000001%01101000%01101011%01000010%01000011%01010100%01111010%01000110%01100101%01111000%01000110%01101111%01110110%01101001%01101100%01101011%01000001%01101011%01100101%01001001%01001110%01101010%01011010%01001001%01110001%01001100", "01110001%01001111%01011000%01100110%01010101%01001101%01111000%01001110%01100100%01010000%01000111%01000010%01100100%01011001%01011001%01000110%01110001%01000001%01010000%01101001%01001011%01101110%01001011%01100101%01011001%01001001%01110000%01110001%01010101%01000100%01000100%01001011%01110011%01101111%01001110%01100011%01111001%01010010%01110001%01001111%01001000%01101000%01010111%01000100%01111000%01111010%01010010%01111000%01110101%01000010%01110000%01101110%01110110%01011001%01100111%01001011%01100001%01001000%01010010%01110001%01001110%01000100%01110101%01100010%01001110%01101111%01010001%01010110%01100110%01101010%01010001%01101011%01111000%01100010%01010000%01100100%01110011%01011010%01110110%01101000%01000001%01001010%01100111%01111000%01110101%01011000%01000101%01110010%01110010%01110100%01011000%01010011%01111000%01001011%01101000%01001110%01001100%01010010%01011000%01000111", "01010111%01111001%01001010%01000001%01101011%01110110%01010111%01101001%01101011%01001001%01010001%01001001%01101001%01100101%01001001%01101100%01000001%01001101%01000101%01010110%01010110%01000111%01111010%01001100%01010001%01011001%01100100%01100100%01000101%01100100%01011010%01100101%01001110%01001000%01100010%01000010%01101111%01101100%01110001%01001111%01001000%01010001%01010101%01100100%01111000%01001111%01101010%01010110%01100110%01101011%01001101%01011000%01101001%01001100%01000101%01001000%01101011%01110000%01100010%01010111%01000001%01000010%01010010%01110101%01001101%01001101%01011000%01000110%01111010%01110001%01110011%01111001%01101101%01100111%01010111%01110100%01000101%01100101%01101111%01100100%01010111%01110101%01000110%01010111%01011000%01010011%01010111%01110001%01111010%01011010%01101011%01010011%01110010%01000110%01001111%01000001%01110110%01000011%01110100%01011000", "01010110%01001011%01101000%01000111%01000111%01100100%01000011%01111000%01100111%01000011%01100110%01101100%01100110%01111001%01111010%01001101%01000011%01100111%01101111%01001100%01100010%01100110%01101001%01100001%01010101%01000101%01100100%01011010%01010001%01010011%01101000%01101111%01110000%01001101%01101010%01010101%01000101%01000011%01001111%01100010%01101011%01000111%01101010%01010010%01110110%01010011%01010001%01110100%01011001%01101001%01100100%01000100%01101011%01110010%01100100%01111001%01101100%01000010%01001001%01101101%01010110%01001100%01110000%01001011%01000001%01011001%01101100%01010001%01001010%01010001%01000100%01110110%01011010%01100100%01101101%01111010%01011010%01010110%01111001%01100001%01001110%01010010%01000110%01101001%01011001%01100110%01101101%01010011%01110100%01001100%01110100%01001110%01110110%01101000%01001110%01001101%01100101%01010101%01110001%01001100", "01011010%01001110%01110010%01100010%01000111%01110011%01111000%01111001%01100011%01000011%01000011%01101101%01000111%01110010%01100101%01110101%01001111%01010000%01011010%01100100%01110001%01101010%01100101%01001010%01000110%01010101%01100100%01010100%01111010%01101010%01110001%01010011%01100101%01100111%01011010%01101111%01101000%01110010%01010000%01110001%01011001%01100111%01110001%01000100%01001010%01110101%01110010%01100100%01001000%01101111%01000001%01111001%01100001%01000111%01110011%01001110%01000010%01001000%01000011%01100101%01100011%01100001%01110011%01010100%01110010%01110101%01010100%01011000%01010010%01101011%01010011%01011010%01001010%01010111%01111010%01100110%01001101%01010000%01110010%01110000%01000110%01010000%01101101%01011010%01010110%01101111%01101101%01110100%01000101%01101110%01000100%01001010%01001100%01001101%01010000%01111001%01110101%01000101%01110110%01111000", "01001110%01001011%01001000%01010110%01100111%01111000%01000011%01001010%01011000%01101001%01110010%01000010%01110010%01010110%01111001%01011000%01000111%01000001%01101110%01010110%01100010%01000100%01101011%01000010%01000100%01001110%01110010%01101011%01010101%01110101%01000101%01000100%01000001%01000111%01010010%01000010%01101010%01101000%01000110%01011010%01000110%01100001%01100101%01110000%01100100%01010110%01010010%01001001%01001110%01101011%01010001%01110001%01100101%01100001%01100101%01110000%01010011%01001011%01110011%01001110%01000101%01001111%01010100%01111000%01101110%01110110%01101000%01011010%01001001%01000101%01101100%01101001%01101110%01010101%01101111%01001110%01000100%01101110%01001011%01000111%01101010%01001010%01001011%01011001%01100010%01010111%01110011%01101110%01110010%01010000%01000110%01110001%01111001%01111000%01111001%01001101%01101001%01101110%01100111%01101010", "01001100%01110110%01010001%01000010%01101001%01100101%01110010%01100001%01001011%01111001%01101001%01001101%01110011%01001100%01010010%01010000%01001100%01010010%01101000%01100001%01000101%01111001%01010101%01101001%01110110%01010111%01000011%01100011%01001100%01101100%01011000%01010101%01101110%01100111%01010100%01000001%01001101%01101100%01110101%01100100%01100001%01100010%01001100%01011001%01100101%01011001%01111001%01000010%01101011%01100001%01100110%01001000%01010010%01110000%01111010%01001100%01010011%01001000%01100011%01000111%01001001%01000110%01001001%01101111%01011010%01000111%01010100%01011000%01111001%01110011%01000011%01001011%01000101%01010111%01010111%01100101%01101111%01111000%01110011%01111000%01001100%01110110%01101100%01101001%01010101%01101001%01101011%01000010%01001110%01110010%01000011%01101110%01011010%01010010%01001001%01001000%01110000%01101010%01100111%01001001", "01100010%01101100%01110000%01010101%01100111%01010111%01000101%01001110%01110010%01110100%01110101%01100100%01010110%01010010%01011001%01100100%01110110%01000100%01101010%01010000%01100001%01010100%01101110%01000100%01101101%01101110%01101101%01101110%01001001%01010001%01100011%01100100%01001100%01001111%01110110%01101110%01111010%01000110%01010011%01010010%01110011%01110010%01110011%01110010%01101101%01100110%01000101%01101110%01110011%01101111%01001111%01100001%01001111%01011001%01001011%01110001%01100100%01111010%01001100%01010011%01101000%01001011%01000101%01110000%01010010%01010110%01010000%01010100%01101010%01101010%01010100%01011001%01011001%01000011%01100010%01011010%01001010%01010011%01000111%01101000%01001101%01110100%01000010%01010100%01110100%01000011%01100101%01101100%01011001%01001011%01110100%01001110%01110100%01010010%01011001%01110100%01001111%01000011%01001111%01101111", "01110000%01100010%01111010%01110100%01100101%01110011%01111000%01100011%01001001%01110000%01010111%01011001%01000010%01101011%01001000%01110010%01101110%01011000%01110101%01001111%01110101%01111001%01101001%01010100%01111001%01101001%01000111%01001111%01011000%01010000%01000110%01010001%01001010%01100100%01101111%01010111%01101011%01101110%01111001%01001100%01110000%01110011%01000111%01000101%01011000%01010000%01001000%01101100%01101011%01010101%01111001%01000010%01100001%01001000%01100110%01000100%01110011%01001100%01110100%01100101%01110000%01000111%01101010%01100101%01101100%01000111%01010111%01111000%01001110%01010010%01000110%01000001%01010010%01100010%01110110%01101000%01011001%01000111%01100101%01001010%01010101%01100110%01110001%01111010%01101000%01000111%01110110%01010001%01111001%01100111%01100011%01100110%01001101%01110110%01100111%01010000%01000110%01111000%01000101%01101110", "01010000%01100110%01100101%01000100%01101110%01100001%01101110%01110100%01011010%01110100%01010011%01101001%01001011%01001011%01011000%01001111%01001111%01001101%01001000%01010000%01111000%01110001%01011001%01100011%01100110%01101101%01010101%01001101%01100011%01100101%01001100%01100100%01010101%01100111%01100101%01101100%01110101%01000010%01101011%01010011%01010010%01101010%01110110%01001001%01000101%01111010%01101000%01001001%01110100%01011001%01100011%01000010%01101100%01000110%01100011%01100011%01101110%01010101%01110010%01100111%01000111%01110001%01101100%01011001%01110001%01010001%01110101%01010111%01011000%01111001%01110011%01001100%01010111%01011000%01111010%01011000%01111001%01001011%01001000%01000111%01110011%01011000%01110001%01010001%01110110%01001111%01100011%01010111%01110101%01000010%01000001%01100100%01111010%01100011%01000011%01001101%01111000%01100011%01100111%01101101", "01100011%01001011%01110100%01111000%01010110%01100010%01010011%01111001%01001000%01010110%01000001%01010101%01000001%01100110%01000011%01000101%01010101%01001101%01010100%01101000%01001010%01110100%01111001%01110101%01000010%01110000%01101111%01110110%01110101%01011001%01010001%01101101%01010110%01001111%01011000%01100011%01101010%01100100%01000010%01011001%01001000%01101011%01010001%01100110%01001111%01101001%01101111%01101110%01111001%01100111%01111000%01100111%01100100%01010010%01001111%01001101%01110011%01000100%01011010%01101101%01100011%01000010%01001100%01100111%01010000%01001011%01001011%01111010%01100010%01101100%01101000%01010101%01101000%01000011%01000101%01101100%01110110%01010010%01100110%01000001%01100101%01110001%01000100%01001011%01111000%01001001%01010000%01000111%01110011%01101101%01100111%01111001%01100011%01110101%01110011%01100010%01101011%01100011%01101001%01101010", "01010000%01000001%01000001%01001001%01110001%01000011%01010010%01001101%01101010%01001101%01101101%01101001%01101000%01001101%01101011%01010100%01011001%01000001%01111010%01101100%01100011%01000101%01110101%01010101%01110100%01011010%01110100%01100110%01101111%01110110%01110000%01011001%01110001%01110100%01000001%01110000%01101100%01110000%01100010%01100110%01010101%01001000%01111010%01000100%01100011%01101100%01010100%01010011%01001000%01001011%01111000%01100010%01010000%01001000%01101100%01110010%01010110%01010001%01000010%01010101%01000111%01010110%01010111%01101011%01001111%01010000%01101011%01000011%01001100%01001001%01010000%01111000%01101011%01010111%01110010%01010101%01011010%01010101%01111000%01101101%01101011%01101100%01100101%01010110%01000110%01000101%01000110%01111001%01110101%01100010%01100001%01011000%01100011%01100100%01001000%01101000%01111010%01101000%01101111%01001100", "01110000%01000011%01001011%01111010%01001101%01101111%01000111%01011010%01100011%01100010%01011000%01000110%01101100%01100100%01101001%01110100%01110010%01101110%01100001%01010000%01000101%01110000%01100010%01001000%01100001%01100001%01010010%01000110%01110000%01010001%01000011%01110010%01000001%01001000%01111001%01001010%01101100%01000110%01010101%01101101%01000100%01110010%01100010%01101010%01111000%01001001%01000100%01100101%01100101%01100001%01001101%01101001%01000111%01010010%01000101%01101010%01010001%01001011%01100110%01001100%01100001%01001101%01010011%01001110%01110010%01110110%01110011%01001111%01101011%01101101%01000101%01010101%01000100%01000010%01101001%01010100%01110010%01001000%01101001%01001101%01001100%01001001%01111010%01100111%01010001%01010000%01000101%01101001%01000001%01000111%01010001%01101011%01100101%01101111%01101100%01011000%01100101%01101010%01010110%01110101", "01001010%01000011%01100110%01110110%01010000%01010010%01000001%01000010%01100110%01011000%01101011%01011001%01010101%01010100%01011010%01010010%01110101%01010000%01100001%01011000%01001100%01001001%01010101%01001100%01000111%01111010%01101101%01010001%01101110%01000110%01001000%01100001%01101011%01110011%01101110%01110001%01000110%01101100%01010001%01111000%01000110%01011001%01001110%01001100%01100011%01001010%01101010%01100111%01010100%01001100%01001010%01001001%01010100%01100111%01100001%01110011%01000110%01110000%01001000%01111001%01010101%01101101%01110101%01100111%01101101%01101010%01011001%01100100%01110011%01000010%01001011%01100100%01001111%01101011%01110100%01001100%01011001%01101110%01110100%01010000%01101110%01010111%01010010%01101001%01001010%01101100%01010001%01001010%01110011%01110011%01100110%01011001%01100011%01001000%01001000%01001100%01000101%01101101%01101001%01110010", "01100001%01010111%01100001%01100101%01110000%01010101%01101110%01110010%01101011%01100001%01010011%01101011%01010010%01111000%01110100%01000001%01001110%01000100%01000011%01001111%01110010%01010010%01000100%01101011%01000110%01110110%01100110%01011001%01101101%01100010%01011010%01110110%01010010%01001100%01001000%01000100%01110011%01100111%01110001%01000011%01100111%01010010%01000101%01100001%01100100%01000101%01100101%01111000%01001001%01100101%01011000%01000111%01100010%01000010%01110001%01100011%01101010%01001000%01001111%01100110%01110110%01010110%01101100%01011010%01001010%01101101%01110110%01000011%01010001%01100011%01010000%01101010%01100001%01001011%01101110%01110011%01001110%01010000%01101000%01110010%01011000%01101000%01101101%01001100%01101011%01110001%01011000%01001111%01000001%01000110%01010111%01001001%01010011%01101010%01011000%01100111%01100011%01101011%01110001%01001101", "01111001%01111000%01010110%01000111%01110011%01110110%01001001%01100100%01111000%01001111%01100010%01101100%01010011%01010101%01000101%01100001%01110100%01010001%01010101%01001100%01010001%01001001%01000111%01010111%01110001%01101100%01000010%01110101%01010110%01100100%01011010%01000100%01001101%01110110%01010111%01110100%01001000%01001011%01100001%01101101%01100101%01001011%01000001%01101000%01001011%01010010%01111010%01011000%01001000%01101001%01001111%01100110%01001011%01111000%01101110%01000101%01110110%01011000%01001011%01111001%01110001%01010101%01110101%01110011%01000100%01000001%01110101%01101110%01100011%01111010%01010100%01101001%01011000%01010100%01011000%01001111%01100101%01001110%01010011%01010110%01111000%01101111%01001010%01110100%01100110%01110001%01000101%01001010%01001001%01000010%01100111%01001100%01001001%01101100%01010001%01011000%01110001%01010011%01000110%01000110", "01101001%01101101%01110000%01101111%01110010%01110100%00100000%01110010%01100001%01101110%01100100%01101111%01101101"] 4 | exec(''.join(chr(int(w3PMkSSCQNotgKuAvGRGLo[0x00013].replace('%', '')[i*0x0008:i*0x0008+0x0008],(0x0003 - 0x0001))) for i in range(len(w3PMkSSCQNotgKuAvGRGLo[0x00013].replace('%', ''))//(0x0004 + 0x0004)))) 5 | 6 | class w3KpXoPscpuPqQnJymvcVi(): 7 | def __init__(self): 8 | print(''.join(chr(int(('01110100%01100101%01110011%01110100').replace('%', '')[i*0x0008:i*0x0008+0x0008],(0x0003 - 0x0001))) for i in range(len(('01110100%01100101%01110011%01110100').replace('%', ''))//(0x0004 + 0x0004))) + ''.join(chr(int(('00100000%01100001%01110011%01100100%01100001%01110011%01100100').replace('%', '')[i*0x0008:i*0x0008+0x0008],(0x0003 - 0x0001))) for i in range(len(('00100000%01100001%01110011%01100100%01100001%01110011%01100100').replace('%', ''))//(0x0004 + 0x0004)))) 9 | print(random.seed(0x0007)) 10 | w3NujkRDVlYPWPblNyAXNP = w3KpXoPscpuPqQnJymvcVi() 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 | 8 | Writen in java 15 9 |
10 |11 | Documentation 12 |
13 |You will need to create a file ending in .cfg
Then copy this into the file, you can edit the values to match your desired obfuscation output
67 |Due to the method of obfuscation the obfuscator cannot yet tell if a name is a string or a var name, so try not to use var names in strings!
104 |105 | Insert garbage is a bit buggy and can break code due to indenting issues so if you want to use insert garbage make sure to fix any indenting issues if they happen! 106 |
107 |To create a plugin use this repo as a template, then buid the file into a jar and drop it into the plugins folder 112 |
113 |