rust-native-obf 0.1.0

simple native obfuscator for rust
Documentation
  • Coverage
  • 0%
    0 out of 29 items documented0 out of 21 items with examples
  • Size
  • Source code size: 14.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.32 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 28s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ege0x77czz/rust-native-obf
    17 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ege0x77czz

rust-native-obf

simple native obfuscator for rust

what it does

  • string encryption (xor + multilayer)
  • compile time hashing
  • control flow obfuscation
  • junk code injection
  • opaque predicates
  • value encoding
  • stack strings
  • function pointer obfuscation
  • integer scrambling

usage

[dependencies]

rust-native-obf = "0.1.0"

use rust_native_obf::*;

fn main() {
    let secret = obf_string!("secret password");
    println!("{}", secret);

    let hash = ct_hash!("compile time");
    
    let result = confuse_flow!({
        let x = 42;
        x * 2
    });

    let hidden = hide_call!({
        calculate(100)
    });
    
    let data = multilayer_encrypt(b"data", 3);
    let scrambled = scramble_int(42);
}

examples

cargo run --example basic

features

  • string obfuscation (runtime + multilayer)
  • compile time hash (fnv1a)
  • control flow hiding
  • fake operations
  • stack noise
  • buffer xor
  • value encode/decode
  • stack allocated strings
  • indirect function calls
  • integer scrambling (reversible)

simple but works

license

MIT