jsfuck

Crates.iojsfuck
lib.rsjsfuck
version1.0.6
sourcesrc
created_at2022-03-03 04:27:13.049419
updated_at2022-03-10 13:15:35.027655
descriptionA JSFuck obfuscator written in Rust.
homepagehttp://www.jsfuck.com
repositoryhttps://github.com/vierofernando/libjsfuck/tree/main/rust
max_upload_size
id542735
size282,562
null (null8626)

documentation

https://docs.rs/jsfuck

README

jsfuck

A quick and simple JSFuck obfuscator for Rust. For more info/context, visit www.jsfuck.com.

Example

use jsfuck;

fn main() {
    let jsfucked = jsfuck::obfuscate("0");
    
    // evaluate this as a JavaScript code and you should get "0"
    assert_eq!(String::from("[+[]]+[]"), jsfucked);
    
    let mut code = jsfuck::obfuscate("console.log('Hello, World!')");

    // wrap this with an eval()
    jsfuck::wrap_eval(&mut code);
    
    // paste this as a JavaScript code and it should print "Hello, World!"
    println!("{}", code);
}
Commit count: 0

cargo fmt