libinjection-rs

Crates.iolibinjection-rs
lib.rslibinjection-rs
version0.2.8
sourcesrc
created_at2022-07-23 08:49:30.075061
updated_at2022-11-30 09:00:36.160654
descriptionRust bindings for libinjection from libinjection/libinjection fork
homepagehttps://github.com/chandanpasunoori/libinjection-rs
repositoryhttps://github.com/chandanpasunoori/libinjection-rs
max_upload_size
id631333
size20,513
Chandan Pasunoori (chandanpasunoori)

documentation

https://docs.rs/libinjection-rs

README

libinjection-rs

crates.io Documentation Build Status Crates.io

Rust bindings for libinjection.

How to use

  • Add libinjection to dependencies of Cargo.toml:
libinjection = "0.2"
  • Import crate:
extern crate libinjection;

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);
Commit count: 24

cargo fmt