[][src]Crate libinjection

libinjection

Rust bindings for (libinjection)]1

How to Use

extern crate libinjection;

use libinjection::{sqli, xss};

fn main() {
    let (is_sqli, fingerprint) = sqli("' OR '1'='1' --").unwrap();
    assert!(is_sqli);
    assert_eq!("s&sos", fingerprint);

    let is_xss = xss("<script type='text/javascript'>alert('xss');</script>").unwrap();
    assert!(is_xss);
}

Functions

sqli

Checks input for SQL injection detection, and returns an option of (is_sqli, fingerprint)

xss

Checks input for XSS detection, and returns an option of is_xss