{"id":13482538,"url":"https://github.com/superblaubeere27/obfuscator","last_synced_at":"2025-03-27T13:32:05.454Z","repository":{"id":37549804,"uuid":"132873186","full_name":"superblaubeere27/obfuscator","owner":"superblaubeere27","description":"A java obfuscator (GUI)","archived":false,"fork":false,"pushed_at":"2024-07-13T13:07:49.000Z","size":837,"stargazers_count":844,"open_issues_count":69,"forks_count":235,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-10-30T16:40:57.106Z","etag":null,"topics":["java","java-bytecode","obfuscation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superblaubeere27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-10T08:43:28.000Z","updated_at":"2024-10-27T07:54:31.000Z","dependencies_parsed_at":"2024-01-13T18:24:30.232Z","dependency_job_id":"8a3db255-9a06-4757-854e-4a223324ddca","html_url":"https://github.com/superblaubeere27/obfuscator","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superblaubeere27%2Fobfuscator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superblaubeere27%2Fobfuscator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superblaubeere27%2Fobfuscator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superblaubeere27%2Fobfuscator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superblaubeere27","download_url":"https://codeload.github.com/superblaubeere27/obfuscator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245854508,"owners_count":20683367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","java-bytecode","obfuscation"],"created_at":"2024-07-31T17:01:03.048Z","updated_at":"2025-03-27T13:32:04.990Z","avatar_url":"https://github.com/superblaubeere27.png","language":"Java","funding_links":["http://patreon.com/superblaubeere27"],"categories":["Java"],"sub_categories":[],"readme":"# Obfuscator [![Build Status](https://travis-ci.org/superblaubeere27/obfuscator.svg?branch=master)](https://travis-ci.org/superblaubeere27/obfuscator) [![Join the chat at https://gitter.im/superblaubeere27/obfuscator](https://badges.gitter.im/superblaubeere27/obfuscator.svg)](https://gitter.im/superblaubeere27/obfuscator?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) [![Donate](https://img.shields.io/badge/patreon-donate-green.svg)](http://patreon.com/superblaubeere27)\n\nIf you are interested in stronger obfuscation methods, feel free to take a look at my new project [masxinlingvonta](https://github.com/superblaubeere27/masxinlingvonta) that further obfuscates java bytecode by compiling it to native code.\n\nA Java bytecode obfuscator supporting\n* Flow Obfuscation\n* Line Number Removal\n* Number Obfuscation\n* [Unstable] Name Obfuscation (Classes, methods and fields) with custom dictionaries\n* Deobfuscator crasher\n* String Encryption\n* Inner Class Removal\n* HWID Locking\n* Invoke Dynamic\n* Reference Proxy\n* Member Shuffling \u0026 Hiding\n\nFeel free to join my discord server: [![Discord Chat](https://img.shields.io/discord/468320443682521089.svg)](https://discord.gg/zQmAChK)  \n\n\n## Obfuscated code\nLuyten + Procyon\n\nWithout\n```Java\n\npublic class HelloWorld {\n    public HelloWorld() {\n        super();\n    }\n    \n    public static void main(final String[] args) {\n        System.out.println(\"Hello World\");\n        for (int i = 0; i \u003c 10; ++i) {\n            System.out.println(i);\n        }\n    }\n}\n```\n\nObfuscated (short version for full code visit https://pastebin.com/RFHtgPtX)\n```Java\n\npublic class HelloWorld {\n    \n    public static void main(final String[] array) {\n        // invokedynamic(1:(Ljava/io/PrintStream;Ljava/lang/String;)V, invokedynamic(0:()Ljava/io/PrintStream;), HelloWorld.llII[HelloWorld.lllI[0]])\n        float lllllllIlIllIII = HelloWorld.lllI[0];\n        while (llIll((int)lllllllIlIllIII, HelloWorld.lllI[1])) {\n            // invokedynamic(2:(Ljava/io/PrintStream;I)V, invokedynamic(0:()Ljava/io/PrintStream;), lllllllIlIllIII)\n            ++lllllllIlIllIII;\n            \"\".length();\n            if (\" \".length() == (\" \".length() \u003c\u003c (\"   \".length() \u003c\u003c \" \".length()) \u0026 ~(\" \".length() \u003c\u003c (\"   \".length() \u003c\u003c \" \".length())))) {\n                throw null;\n            }\n        }\n    }\n    \n}\n\n```\n\n## Usage\n\n`--help` Prints the help page on the screen\n\n`--version` Shows the version of the obfuscator\n\n`--jarIn \u003cinput\u003e` Input JAR\n\n`--jarOut \u003coutput\u003e` Output JAR\n\n`--config \u003cconfigFile\u003e` Config File\n\n`--cp \u003cclassPath\u003e` Class Path\n\n`--scriptFile \u003cscriptFile\u003e` A JS file to script certain parts of the obfuscation\n\n`--threads` Sets the number of threads the obfuscator should use\n\n`--verbose` Sets logging to verbose mode\n\n### Examples\n\n`java -jar obfuscator.jar --jarIn helloWorld.jar --jarOut helloWorld-obf.jar`\n\n`java -jar obfuscator.jar --jarIn helloWorld.jar --jarOut helloWorld-obf.jar --config obfConfig`\n\n### Example Config\n\n```\n{\n  \"input\": \"D:\\\\Computing\\\\HelloWorld\\\\out\\\\artifacts\\\\HelloWorld_jar\\\\HelloWorld.jar\",\n  \"output\": \"D:\\\\Computing\\\\HelloWorld\\\\out\\\\artifacts\\\\HelloWorld_jar\\\\HelloWorld-obf.jar\",\n  \"script\": \"function isRemappingEnabledForClass(node) {\\n    return true;\\n}\\nfunction isObfuscatorEnabledForClass(node) {\\n    return true;\\n}\",\n  \"libraries\": [\n    \"C:\\\\Program Files\\\\Java\\\\jre1.8.0_211\\\\lib\",\n    \"D:\\\\Computing\\\\backdoored_old\\\\dependencies\",\n    \"D:\\\\Computing\\\\backdoored\\\\libs\"\n  ],\n  \"Crasher\": {\n    \"Enabled\": false,\n    \"Invalid Signatures\": true,\n    \"Empty annotation spam\": true\n  },\n  \"InvokeDynamic\": {\n    \"Enabled\": true\n  },\n  \"HWIDPRotection\": {\n    \"Enabled\": false,\n    \"HWID\": \"\"\n  },\n  \"Optimizer\": {\n    \"Enabled\": true,\n    \"Replace String.equals()\": true,\n    \"Replace String.equalsIgnoreCase()\": true,\n    \"Optimize static string calls\": true\n  },\n  \"LineNumberRemover\": {\n    \"Enabled\": true,\n    \"Rename local variables\": true,\n    \"Remove Line Numbers\": true,\n    \"Remove Debug Names\": true,\n    \"Add Local Variables\": true,\n    \"New SourceFile Name\": \"\"\n  },\n  \"StringEncryption\": {\n    \"Enabled\": true,\n    \"HideStrings\": true,\n    \"AES\": true\n  },\n  \"NumberObfuscation\": {\n    \"Enabled\": true,\n    \"Extract to Array\": true,\n    \"Obfuscate Zero\": true,\n    \"Shift\": false,\n    \"And\": false,\n    \"Multiple Instructions\": true\n  },\n  \"ReferenceProxy\": {\n    \"Enabled\": false\n  },\n  \"ShuffleMembers\": {\n    \"Enabled\": true\n  },\n  \"InnerClassRemover\": {\n    \"Enabled\": true,\n    \"Remap\": true,\n    \"Remove Metadata\": true\n  },\n  \"NameObfuscation\": {\n    \"Enabled\": true,\n    \"Excluded classes\": \"HelloWorld\",\n    \"Excluded methods\": \"\",\n    \"Excluded fields\": \"\"\n  },\n  \"General Settings\": {\n    \"Custom dictionary\": true,\n    \"Name dictionary\": \"hello,world\"\n  },\n  \"Packager\": {\n    \"Enabled\": false,\n    \"Use MainClass from the JAR manifest\": true,\n    \"Main class\": \"HelloWorld\"\n  },\n  \"FlowObfuscator\": {\n    \"Enabled\": true,\n    \"Mangle Comparisons\": true,\n    \"Replace GOTO\": true,\n    \"Replace If\": true,\n    \"Bad POP\": true,\n    \"Bad Concat\": true,\n    \"Mangle Switches\": false,\n    \"Mangle Return\": false,\n    \"Mangle Local Variables\": false\n  },\n  \"HideMembers\": {\n    \"Enabled\": true\n  },\n  \"Inlining\": {\n    \"Enabled\": false\n  }\n}\n```\n\n### Excluding Classes\n\nIn some situations you need to prevent certain classes from being obfuscated, such as dependencies packaged with your jar or mixins in a forge mod.\n\nYou will need to exclude in two places.\n\n##### Scripting Tab\n\nHere is an example script that will obfuscate and remap all classes except the org.json dependency and mixins.\n```javascript\nfunction isRemappingEnabledForClass(node) {\n    var flag1 = !node.name.startsWith(\"org/json\");\n    var flag2 = !node.name.startsWith(\"com/client/mixin\");\n    return flag1 \u0026\u0026 flag2;\n}\nfunction isObfuscatorEnabledForClass(node) {\n    var flag1 = !node.name.startsWith(\"org/json\");\n    var flag2 = !node.name.startsWith(\"com/client/mixin\");\n    return flag1 \u0026\u0026 flag2;\n}\n```\n\n##### Name Obfuscation\n\nIf you also want to exclude these classes from name obfuscation you will need to go to Transformers -\u003e Name Obfuscation and add these exclusions there.\n\nTo Exclude the same classes as we did above, we would need to add the following to Excluded classes, methods and fields.\n```regexp\norg.json.**\ncom.client.mixin.**\n```\n\n\nIf your classes are still being obfuscated after applyinng both of these exclusions please open an issue.\n\n## Contributing\n\n##### 1. Fork the repository\n\n- Click the \"Fork\" button at the top right hand corner of this page\n- Then run `git clone https://github.com/[your github username]/obfuscator.git`\n\n##### 2. Import into IntelliJ\n\n- File -\u003e New -\u003e Project From Existing Sources\n- Select `C:\\[Path To]\\obfuscator\\pom.xml`\n- Set \"Search for projects recursively\" and \"Import Maven projects automatically\" to true and click next\n- Make sure all maven projects are ticked\n- Select the correct Java SDK and go with all the default options for the next pages\n\n##### 3. Editing\n\n- Make any edits\n- Package the project to make sure that the project is still functional:\n  - `java -Dmaven.multiModuleProjectDirectory=D:\\Computing\\obfuscator\\obfuscator-core \"-Dmaven.home=C:\\Program Files\\JetBrains\\IntelliJ IDEA 2019.1.3\\plugins\\maven\\lib\\maven3\" \"-Dclassworlds.conf=C:\\Program Files\\JetBrains\\IntelliJ IDEA 2019.1.3\\plugins\\maven\\lib\\maven3\\bin\\m2.conf\" \"-javaagent:C:\\Program Files\\JetBrains\\IntelliJ IDEA 2019.1.3\\lib\\idea_rt.jar=18889:C:\\Program Files\\JetBrains\\IntelliJ IDEA 2019.1.3\\bin\" -Dfile.encoding=UTF-8 -classpath \"C:\\Program Files\\JetBrains\\IntelliJ IDEA 2019.1.3\\plugins\\maven\\lib\\maven3\\boot\\plexus-classworlds-2.5.2.jar\" org.codehaus.classworlds.Launcher -Didea.version2019.1.3 package` (Change any paths to be relevant to your system)\n\n##### 3. Commit\n\n- Run `git status` to see which files you've changed\n- Run `git add [file name]` for each of the files you want to submit your changes to\n- Do `git commit -m \"[A description of the changes]\"`\n- And finally `git push` to upload your changes to GitHub\n\n##### 4. Pull Request\n\n- Go to `https://github.com/[your github username]/obfuscator` and click \"Pull Requests\" and then \"New Pull Request\"\n- Make sure all your changes are included then submit the Pull Request.\n\n## Credits\n- MCInjector (FFixer base)\n- FFixer (Obfuscator base)\n- SmokeObfuscator (Some ideas)\n- MarcoMC (Some ideas)\n- ItzSomebody (NameUtils.crazyString(), Crasher)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperblaubeere27%2Fobfuscator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperblaubeere27%2Fobfuscator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperblaubeere27%2Fobfuscator/lists"}