13 releases

new 0.3.7 Feb 20, 2025
0.3.4 Oct 29, 2023
0.3.3 Sep 18, 2023
0.3.2 Dec 4, 2022
0.1.0 Oct 24, 2018

#1563 in Development tools

Download history 51/week @ 2024-10-29 65/week @ 2024-11-05 99/week @ 2024-11-12 35/week @ 2024-11-19 68/week @ 2024-11-26 88/week @ 2024-12-03 121/week @ 2024-12-10 115/week @ 2024-12-17 122/week @ 2024-12-24 56/week @ 2024-12-31 214/week @ 2025-01-07 118/week @ 2025-01-14 130/week @ 2025-01-21 161/week @ 2025-01-28 137/week @ 2025-02-04 99/week @ 2025-02-11

541 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