https://github.com/mjvl/uniobfuscator
Java obfuscator that hides code in comment tags and Unicode garbage by making use of Java's Unicode escapes.
https://github.com/mjvl/uniobfuscator
java java-obfuscator javafx-application jfeonix obfuscation obfuscator unicode unicode-converter unicode-garbage utf-8 utility-classes
Last synced: about 1 month ago
JSON representation
Java obfuscator that hides code in comment tags and Unicode garbage by making use of Java's Unicode escapes.
- Host: GitHub
- URL: https://github.com/mjvl/uniobfuscator
- Owner: MJVL
- License: mit
- Created: 2018-04-17T01:25:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-06T00:03:57.000Z (over 2 years ago)
- Last Synced: 2025-04-10T03:53:28.224Z (about 1 month ago)
- Topics: java, java-obfuscator, javafx-application, jfeonix, obfuscation, obfuscator, unicode, unicode-converter, unicode-garbage, utf-8, utility-classes
- Language: Java
- Homepage:
- Size: 3.1 MB
- Stars: 77
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UniObfuscator
Simple Java Obfuscator that hides code in comment tags and Unicode garbage by making use of Java's Unicode escapes.
![]()
## Prerequisites
* Java >= 8
* Maven## Usage
### Run
`mvn compile exec:java`### Generate Fat Jar
`mvn package`This jar will be generated in `/target`
## What am I looking at?
All entered characters are converted into their unicode equivalent. Comment tags and a TODO label can also be added to further obfuscate the code and make it appear as being ignored in your editor. These all give the appearance of giberish while still being functional lines.## How does this work?
In Java, it's acceptable to use unicode escapes in replacement or in conjunction with ordinary characters in code. The fake comment works by displaying the literal starting `/*` and ending `*/` blocks but immediately closing them with the corresponding starting `\u002f\u002a` or ending block `\u002a\u002f` in unicode, thus closing the comment block. All obfuscated code will appear inside a comment and be flagged as one by your editor, but is actually encapsulated by two closed blocks `/**/`, thus running fine.Note that this type of obfuscation should not be performed on class or method headers as this may disrupt your IDE or compilation. Stick to inner code blocks for a smooth experience.
## Is my code secure now?
Bluntly, no. No matter what you do your code will be reverse-engineerable. This tool only performs a simple obfuscation and can be easily converted back into readable characters. This is more of a tool to stop people in a lab from glancing and stealing code than an enterprise-grade solution.## Examples
Source Code
```Java
System.out.println("Hello, world!");
```
Obfuscated Code
```
/*\u002a\u002f\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u0048\u0065\u006c\u006c\u006f\u002c\u0020\u0077\u006f\u0072\u006c\u0064\u0021\u0022\u0029\u003b\u002f\u002a*/
```
Source Code
```Java
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
/* TODO: Fix this. \u002a\u002f\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u0057\u006f\u0077\u002c\u0020\u0069\u0074\u0027\u0073\u0020\u0061\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u0020\u006d\u0065\u0073\u0073\u0061\u0067\u0065\u0021\u0022\u0029\u003b\u002f\u002a*/
}
}
```
Output
```
Hello World
Wow, it's a secret message!
```
Run this example live [here](https://onlinegdb.com/pmLpy35Mb).