#xss #injection #api-bindings #sqli

sys libinjection

Rust bindings for libinjection

13 releases

Uses new Rust 2024

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

#3 in #xss

Download history 127/week @ 2024-12-04 133/week @ 2024-12-11 99/week @ 2024-12-18 95/week @ 2024-12-25 63/week @ 2025-01-01 220/week @ 2025-01-08 112/week @ 2025-01-15 172/week @ 2025-01-22 120/week @ 2025-01-29 137/week @ 2025-02-05 145/week @ 2025-02-12 205/week @ 2025-02-19 58/week @ 2025-02-26 70/week @ 2025-03-05 64/week @ 2025-03-12 40/week @ 2025-03-19

251 downloads per month

MIT/Apache

10KB
107 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–2MB
~38K SLoC