#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

#1137 in Database interfaces

Download history 217/week @ 2023-12-12 309/week @ 2023-12-19 163/week @ 2023-12-26 23/week @ 2024-01-02 299/week @ 2024-01-09 445/week @ 2024-01-16 221/week @ 2024-01-23 228/week @ 2024-01-30 250/week @ 2024-02-06 129/week @ 2024-02-13 156/week @ 2024-02-20 137/week @ 2024-02-27 138/week @ 2024-03-05 256/week @ 2024-03-12 213/week @ 2024-03-19 171/week @ 2024-03-26

809 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