1 stable release
1.0.6 | Mar 10, 2022 |
---|---|
1.0.2 |
|
1.0.1 |
|
0.1.0 |
|
#35 in #transpiler
285KB
177 lines
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);
}
lib.rs
:
jsfuck
A quick and simple JSFuck obfuscator for Rust. This library just exports two functions, and has no dependencies.