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

#1579 in Development tools

Download history 71/week @ 2024-10-11 69/week @ 2024-10-18 25/week @ 2024-10-25 58/week @ 2024-11-01 118/week @ 2024-11-08 45/week @ 2024-11-15 45/week @ 2024-11-22 58/week @ 2024-11-29 149/week @ 2024-12-06 135/week @ 2024-12-13 103/week @ 2024-12-20 63/week @ 2024-12-27 139/week @ 2025-01-03 172/week @ 2025-01-10 133/week @ 2025-01-17 155/week @ 2025-01-24

613 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
~67K SLoC