#injection #xss #api-bindings #sqli

sys libinjection

Rust bindings for libinjection

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

#4 in #xss

Download history 256/week @ 2024-03-13 224/week @ 2024-03-20 148/week @ 2024-03-27 74/week @ 2024-04-03 156/week @ 2024-04-10 88/week @ 2024-04-17 25/week @ 2024-04-24 41/week @ 2024-05-01 49/week @ 2024-05-08 101/week @ 2024-05-15 80/week @ 2024-05-22 86/week @ 2024-05-29 109/week @ 2024-06-05 87/week @ 2024-06-12 76/week @ 2024-06-19 72/week @ 2024-06-26

362 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–2.9MB
~63K SLoC