Skip to content

Commit 314f4b5

Browse files
committed
first commit
0 parents  commit 314f4b5

22 files changed

Lines changed: 3143 additions & 0 deletions

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Apple Double files
2+
._*
3+
4+
# Gradle
5+
.gradle/
6+
build/
7+
gradle-app.setting
8+
!gradle-wrapper.jar
9+
10+
# IDEA
11+
.idea/
12+
*.iml
13+
*.iws
14+
*.ipr
15+
out/
16+
17+
# Eclipse
18+
.classpath
19+
.project
20+
.settings/
21+
bin/
22+
23+
# macOS
24+
.DS_Store
25+
.AppleDouble
26+
.LSOverride
27+
28+
# Log files
29+
*.log
30+
31+
# Compiled class files
32+
*.class
33+
34+
# Package files
35+
*.jar
36+
*.war
37+
*.nar
38+
*.ear
39+
*.zip
40+
*.tar.gz
41+
*.rar

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "interactive"
3+
}

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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)

build.gradle.kts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
plugins {
2+
id("java")
3+
}
4+
5+
group = "me.katze225"
6+
version = "1.0-SNAPSHOT"
7+
8+
java {
9+
sourceCompatibility = JavaVersion.VERSION_21
10+
targetCompatibility = JavaVersion.VERSION_21
11+
}
12+
13+
repositories {
14+
mavenCentral()
15+
}
16+
17+
dependencies {
18+
implementation("org.ow2.asm:asm:9.6")
19+
implementation("org.ow2.asm:asm-tree:9.6")
20+
implementation("org.ow2.asm:asm-commons:9.6")
21+
implementation("org.ow2.asm:asm-util:9.6")
22+
23+
compileOnly("org.projectlombok:lombok:1.18.42")
24+
annotationProcessor("org.projectlombok:lombok:1.18.42")
25+
}
26+
27+
tasks.register("cleanAppleDouble") {
28+
doLast {
29+
delete(fileTree(projectDir) {
30+
include("***/._*")
31+
})
32+
println("Удалены все Apple Double файлы (._*)")
33+
}
34+
}
35+
36+
tasks.named("clean") {
37+
dependsOn("cleanAppleDouble")
38+
}
39+
40+
tasks.compileJava {
41+
dependsOn("cleanAppleDouble")
42+
}
43+
44+
tasks.jar {
45+
dependsOn("cleanAppleDouble")
46+
manifest {
47+
attributes(
48+
"Main-Class" to "me.katze225.Main"
49+
)
50+
}
51+
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
52+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
53+
}
54+
55+
tasks.test {
56+
useJUnitPlatform()
57+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Jan 23 14:50:06 EET 2026
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)