3 releases
Uses old Rust 2015
0.2.8 | Nov 30, 2022 |
---|---|
0.2.7 | Nov 30, 2022 |
0.2.6 | Jul 23, 2022 |
#10 in #xss
8KB
107 lines
libinjection-rs
Rust bindings for libinjection.
How to use
- Add
libinjection
todependencies
ofCargo.toml
:
libinjection = "0.2"
- Import crate:
extern crate libinjection;
use libinjection::{sqli, xss};
Examples
- 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);
No runtime deps
~0–3MB
~67K SLoC