Crates.io | jsfuck |
lib.rs | jsfuck |
version | 1.0.6 |
source | src |
created_at | 2022-03-03 04:27:13.049419 |
updated_at | 2022-03-10 13:15:35.027655 |
description | A JSFuck obfuscator written in Rust. |
homepage | http://www.jsfuck.com |
repository | https://github.com/vierofernando/libjsfuck/tree/main/rust |
max_upload_size | |
id | 542735 |
size | 282,562 |
A quick and simple JSFuck obfuscator for Rust. For more info/context, visit www.jsfuck.com.
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);
}