|
| 1 | +# JavaObfuscator |
| 2 | + |
| 3 | +Java bytecode obfuscator with multiple transformation techniques. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **String Encryption** - Encrypts string constants with XOR-based encryption |
| 8 | +- **Number Obfuscation** - Obfuscates integer, long, float, and double constants |
| 9 | +- **Boolean Obfuscation** - Transforms boolean values with complex expressions |
| 10 | +- **Flow Obfuscation** - Creates complex control flow patterns |
| 11 | +- **Dispatcher** - Converts methods to use dispatcher pattern |
| 12 | +- **Shuffle** - Randomizes order of fields and methods |
| 13 | + |
| 14 | +## Building |
| 15 | + |
| 16 | +```bash |
| 17 | +./gradlew build |
| 18 | +``` |
| 19 | + |
| 20 | +The output JAR will be in `build/libs/JavaObfuscator-1.0-SNAPSHOT.jar` |
| 21 | + |
| 22 | +## Usage |
| 23 | + |
| 24 | +```bash |
| 25 | +java -jar JavaObfuscator.jar <input.jar> <output.jar> [options] |
| 26 | +``` |
| 27 | + |
| 28 | +### Options |
| 29 | + |
| 30 | +- `--names-length <n>` - Name length for generated identifiers (default: 40) |
| 31 | +- `--numbers` - Enable number obfuscation |
| 32 | +- `--strings` - Enable string encryption |
| 33 | +- `--booleans` - Enable boolean obfuscation |
| 34 | +- `--flow` - Enable flow obfuscation |
| 35 | +- `--dispatcher` - Enable dispatcher transformation |
| 36 | +- `--shuffle` - Enable shuffle transformation |
| 37 | +- `--zip-comment` - Add ZIP comment to output JAR |
| 38 | +- `--zip-comment-text <text>` - Custom ZIP comment text |
| 39 | + |
| 40 | +If no transformer options are specified, all transformers are enabled by default. |
| 41 | + |
| 42 | +### Examples |
| 43 | + |
| 44 | +Enable all transformers (default): |
| 45 | +```bash |
| 46 | +java -jar JavaObfuscator.jar input.jar output.jar |
| 47 | +``` |
| 48 | + |
| 49 | +Enable specific transformers: |
| 50 | +```bash |
| 51 | +java -jar JavaObfuscator.jar input.jar output.jar --strings --numbers --flow |
| 52 | +``` |
| 53 | + |
| 54 | +Custom name length: |
| 55 | +```bash |
| 56 | +java -jar JavaObfuscator.jar input.jar output.jar --names-length 60 |
| 57 | +``` |
| 58 | + |
| 59 | +## Requirements |
| 60 | + |
| 61 | +- Java 21 or higher |
| 62 | + |
| 63 | +## Author |
| 64 | + |
| 65 | +by @core2k21 (tg) |
0 commit comments