|
1 |
| - # Java Bytecode Obfuscator |
| 1 | +# Java Bytecode Obfuscator |
2 | 2 |
|
3 | 3 | A powerful and flexible Java bytecode obfuscator built with ASM that provides comprehensive obfuscation capabilities while maintaining fine-grained control over what gets obfuscated.
|
4 | 4 |
|
5 |
| -## Features |
| 5 | +## ✨ Features |
6 | 6 |
|
7 | 7 | ### 🔧 Core Obfuscation
|
8 | 8 | - **Class Renaming** - Rename classes to obscure names while preserving functionality
|
9 |
| -- **Method Renaming** - Obfuscate method names with intelligent handling of constructors and special methods |
| 9 | +- **Method Renaming** - Obfuscate method names with intelligent handling of constructors, synthetic methods, and inheritance |
10 | 10 | - **Field Renaming** - Rename fields while maintaining proper access relationships
|
| 11 | +- **Local Variable Renaming** - Obfuscate local variable names for additional protection |
11 | 12 | - **Reference Updating** - Automatically updates all references to renamed elements throughout the codebase
|
| 13 | +- **Inheritance-Aware Renaming** - Properly handles interface implementations and method overrides |
12 | 14 |
|
13 | 15 | ### 🎯 Advanced Configuration
|
14 | 16 | - **Keep Rules System** - Sophisticated rules for preserving specific classes, methods, and fields
|
15 | 17 | - **Pattern Matching** - Use regex patterns to define keep rules for multiple elements at once
|
16 | 18 | - **Granular Control** - Specify exactly what to keep at the class, method, and field level
|
17 |
| -- **Configuration Presets** - Pre-built configurations for common scenarios (Spring Boot, libraries, etc.) |
| 19 | +- **Configuration Files** - JSON-based configuration with presets for common scenarios |
| 20 | +- **Command Line Interface** - Full-featured CLI with extensive options |
18 | 21 |
|
19 | 22 | ### 🔄 Extensible Architecture
|
20 | 23 | - **Transformer Pipeline** - Modular transformer system with priority-based execution
|
21 | 24 | - **Abstract Base Classes** - Easy to extend with custom obfuscation techniques
|
22 | 25 | - **Plugin System** - Add new transformers without modifying core code
|
23 | 26 | - **Context Sharing** - Transformers can share data and coordinate operations
|
24 | 27 |
|
25 |
| -### 📊 Analysis & Debugging |
| 28 | +### 📊 Enhanced Logging & Analysis |
| 29 | +- **Rich Console Output** - Beautiful logging with emojis and color coding |
| 30 | +- **Timestamped Logs** - All operations are timestamped for debugging |
| 31 | +- **Progress Tracking** - Visual progress indicators and statistics |
26 | 32 | - **Mapping Generation** - Generate detailed mappings of original to obfuscated names
|
27 |
| -- **Verbose Logging** - Detailed logging of all transformations performed |
| 33 | +- **Verbose Mode** - Detailed logging of all transformations performed |
28 | 34 | - **Validation System** - Comprehensive validation with warnings and error detection
|
29 |
| -- **Progress Reporting** - Track obfuscation progress and statistics |
30 | 35 |
|
31 |
| -## Quick Start |
| 36 | +### 🛠️ Smart Handling |
| 37 | +- **Method References** - Properly handles Java 8+ method references (::) in lambda expressions |
| 38 | +- **Synthetic Methods** - Intelligently handles compiler-generated synthetic methods |
| 39 | +- **Bridge Methods** - Correct handling of bridge methods in inheritance hierarchies |
| 40 | +- **Entry Point Protection** - Automatic preservation of main methods and constructors |
| 41 | +- **JAR Structure** - Preserves non-class files (resources, manifests, etc.) |
32 | 42 |
|
33 |
| -### Command Line Usage |
| 43 | +## 🚀 Quick Start |
34 | 44 |
|
35 |
| -```bash |
36 |
| -# Basic obfuscation with defaults |
37 |
| -java -jar obfuscator.jar input.jar output.jar |
| 45 | +### Installation |
38 | 46 |
|
39 |
| -# Using configuration file |
40 |
| -java -jar obfuscator.jar -c config.json input.jar output.jar |
| 47 | +Download the latest release or build from source: |
41 | 48 |
|
42 |
| -# Command line options |
43 |
| -java -jar obfuscator.jar input.jar output.jar \ |
44 |
| - --main-class com/example/Main \ |
45 |
| - --keep-main-class \ |
46 |
| - --keep-entry-points \ |
47 |
| - --verbose |
| 49 | +```bash |
| 50 | +git clone https://github.com/cvs0/java-bytecode-obfuscator.git |
| 51 | +cd java-bytecode-obfuscator |
| 52 | +./gradlew build |
| 53 | +``` |
48 | 54 |
|
49 |
| -# Generate mappings |
50 |
| -java -jar obfuscator.jar input.jar output.jar --mappings mappings.txt |
| 55 | +### Basic Usage |
51 | 56 |
|
52 |
| -# Keep specific classes |
53 |
| -java -jar obfuscator.jar input.jar output.jar \ |
54 |
| - --keep-class "com/example/api/PublicAPI" \ |
55 |
| - --keep-class-pattern ".*Controller" |
| 57 | +```bash |
| 58 | +# Simple obfuscation with all features enabled |
| 59 | +java -jar java-bytecode-obfuscator-1.0-SNAPSHOT.jar input.jar output.jar \ |
| 60 | + --rename-classes --rename-methods --rename-fields --rename-local-variables |
| 61 | + |
| 62 | +# With main class protection |
| 63 | +java -jar java-bytecode-obfuscator-1.0-SNAPSHOT.jar input.jar output.jar \ |
| 64 | + -m com.example.Main --keep-main-class --keep-entry-points \ |
| 65 | + --rename-classes --rename-methods --rename-fields --rename-local-variables |
| 66 | + |
| 67 | +# Generate mappings for debugging |
| 68 | +java -jar java-bytecode-obfuscator-1.0-SNAPSHOT.jar input.jar output.jar \ |
| 69 | + --mappings mappings.txt --verbose \ |
| 70 | + --rename-classes --rename-methods --rename-fields --rename-local-variables |
56 | 71 | ```
|
57 | 72 |
|
58 | 73 | ### Configuration File
|
|
0 commit comments