#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

#1193 in Database interfaces

Download history 217/week @ 2024-01-07 414/week @ 2024-01-14 292/week @ 2024-01-21 189/week @ 2024-01-28 284/week @ 2024-02-04 134/week @ 2024-02-11 189/week @ 2024-02-18 101/week @ 2024-02-25 157/week @ 2024-03-03 163/week @ 2024-03-10 266/week @ 2024-03-17 226/week @ 2024-03-24 78/week @ 2024-03-31 114/week @ 2024-04-07 159/week @ 2024-04-14 27/week @ 2024-04-21

378 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
~66K SLoC