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

#1377 in Development tools

Download history 95/week @ 2024-06-02 81/week @ 2024-06-09 120/week @ 2024-06-16 62/week @ 2024-06-23 100/week @ 2024-06-30 65/week @ 2024-07-07 32/week @ 2024-07-14 12/week @ 2024-07-21 45/week @ 2024-07-28 91/week @ 2024-08-04 82/week @ 2024-08-11 36/week @ 2024-08-18 68/week @ 2024-08-25 48/week @ 2024-09-01 41/week @ 2024-09-08 41/week @ 2024-09-15

198 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
~62K SLoC