min_shark

Crates.iomin_shark
lib.rsmin_shark
version0.5.0
sourcesrc
created_at2023-09-01 21:16:26.316498
updated_at2024-03-19 10:27:46.052391
descriptionA crate to parse and match a subset of the wireshark filter display language
homepage
repositoryhttps://github.com/dovreshef/min_shark
max_upload_size
id961186
size162,668
Dov Reshef (dovreshef)

documentation

https://docs.rs/min_shark

README

GitHub Workflow Status (with event) docs.rs Crates.io Codecov Crates.io

This is a parser and execution engine for minimal Wireshark®-like filters.

See here for supported syntax.

Usage example:


    let filter = "ip.addr in {192.168.1.0/24, 10.1.1.0/24} and payload ~ '(?i)CaSeInSeNsItIvE'";
    let expression = min_shark::parse(filter);

    // .. later
    let is_match = expression
        .matcher()
        .tcp(true)
        .src_ip("1.1.1.1/24".parse().unwrap())
        .payload(b"CaseInsensitive")
        .is_match();

    assert_eq!(is_match, true);

Commit count: 14

cargo fmt