12 releases

0.3.4 Oct 29, 2023
0.3.2 Dec 4, 2022
0.2.4 Oct 27, 2020
0.2.3 Jun 6, 2020
0.1.0 Oct 24, 2018

#1621 in Development tools

Download history 41/week @ 2024-07-26 97/week @ 2024-08-02 76/week @ 2024-08-09 43/week @ 2024-08-16 63/week @ 2024-08-23 44/week @ 2024-08-30 44/week @ 2024-09-06 41/week @ 2024-09-13 52/week @ 2024-09-20 14/week @ 2024-09-27 88/week @ 2024-10-04 71/week @ 2024-10-11 69/week @ 2024-10-18 25/week @ 2024-10-25 58/week @ 2024-11-01 114/week @ 2024-11-08

276 downloads per month

MIT/Apache

8KB
99 lines

libinjection-rs

crates.io Documentation Crates.io Test

Rust bindings for libinjection.

How to use

  • Add libinjection to dependencies of Cargo.toml:
libinjection = "*"
  • Import crate:
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
~65K SLoC