Rust bindings for libinjection.
- Add
libinjection
todependencies
ofCargo.toml
:
libinjection = "0.1"
- Import crate:
extern crate libinjection;
use libinjection::{sqli, xss};
- SQLi Detection:
let (is_sqli, fingerprint) = sqli("' OR '1'='1' --").unwrap();
assert!(is_sqli);
assert_eq!("s&sos", fingerprint);
Fingerprints: Please refer to fingerprints.txt.
- XSS Detection:
let is_xss = xss("<script type='text/javascript'>alert('xss');</script>").unwrap();
assert!(is_xss);