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

#1643 in Development tools

Download history 14/week @ 2024-07-22 57/week @ 2024-07-29 90/week @ 2024-08-05 74/week @ 2024-08-12 33/week @ 2024-08-19 85/week @ 2024-08-26 33/week @ 2024-09-02 40/week @ 2024-09-09 38/week @ 2024-09-16 54/week @ 2024-09-23 9/week @ 2024-09-30 96/week @ 2024-10-07 77/week @ 2024-10-14 58/week @ 2024-10-21 36/week @ 2024-10-28 67/week @ 2024-11-04

242 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
~65K SLoC