-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
continue documentation, prepare labyrinth for publish
- Loading branch information
1 parent
285dd91
commit daff11e
Showing
3 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ | |
name = "labyrinth" | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = ["Pranav Dronavalli <[email protected]>"] | ||
description = "A procedural macro library to obfuscate Rust code. Provides compile-time string encryption and random flow obfuscation." | ||
license = "MIT" | ||
repository = "https://github.com/dronavallipranav/rust-obfuscator/tree/main/labyrinth_macros" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# labyrinth | ||
|
||
`labyrinth` is a procedural macro crate for compile-time rust obfuscation. It provides the user with string encryption and compile-time determined flow obfuscation and random variables which survive compile-time optimization. | ||
|
||
|
||
[rust-obfuscator](https://github.com/dronavallipranav/rust-obfuscator) - Check out this auto obfuscator tool for easier usage and integration | ||
## Features | ||
|
||
- **String Obfuscation**: Automatically encrypts string literals in your code at compile time, making them harder to read and understand. | ||
- **Flow Obfuscation**: Introduces dummy loops and random variables into control flows, enhancing the overall obfuscation of the logic. | ||
|
||
# Installation | ||
|
||
Add `labyrinth` to your `Cargo.toml` as a dependency: | ||
|
||
```toml | ||
[dependencies] | ||
labyrinth = "0.1.0" | ||
``` | ||
|
||
# Usage | ||
|
||
## Bring macro into scope | ||
``` | ||
use labyrinth; | ||
fn main(){ | ||
println!(labyrinth::encrypt_string("Hello, World!")); | ||
} | ||
``` | ||
## Output | ||
``` | ||
Hello World! | ||
``` | ||
## Example of expanded Flow_Stmt! | ||
|
||
``` | ||
{ | ||
let _is_dummy_145 = true; | ||
let _dummy_upper_bound = 100; | ||
let _dummy_increment = 1i32; | ||
let mut _dummy_counter = 10i32; | ||
let _extra_dummy_var = 2i32; | ||
loop { | ||
if _dummy_counter > _dummy_upper_bound { | ||
break; | ||
} | ||
unsafe { | ||
std::ptr::write_volatile( | ||
&mut _dummy_counter, | ||
_dummy_counter + _dummy_increment, | ||
); | ||
} | ||
} | ||
}; | ||
match (&1, &1) { | ||
(left_val, right_val) => { | ||
if !(*left_val == *right_val) { | ||
let kind = ::core::panicking::AssertKind::Eq; | ||
::core::panicking::assert_failed( | ||
kind, | ||
&*left_val, | ||
&*right_val, | ||
::core::option::Option::None, | ||
); | ||
} | ||
} | ||
}; | ||
``` | ||
|
||
# License | ||
labyrinth is licensed under the MIT License - see the [LICENSE](https://github.com/dronavallipranav/rust-obfuscator/blob/main/LICENSE) file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
# Labyrinth Macros | ||
# labyrinth_macros | ||
|
||
`labyrinth_macros` is a procedural macro crate designed to complement the `labyrinth` super crate. It provides powerful compile-time string and control flow obfuscation capabilities, aimed at enhancing the security and complexity of Rust code. Not meant to be used standalone, necessary obfuscation features are in the super crate `labyrinth` | ||
|
||
## Features | ||
|
||
- **String Obfuscation**: Automatically encrypts string literals in your code at compile time, making them harder to read and understand. | ||
- **Flow Obfuscation**: Introduces dummy loops and random variables into control flows, enhancing the overall obfuscation of the logic. | ||
|
||
# License | ||
labyrinth_macros is licensed under the MIT License - see the [LICENSE](https://github.com/dronavallipranav/rust-obfuscator/blob/main/LICENSE) file for details. |