#repo #parser #yaml #rule #lint #list #echap

stalkerware-indicators

Parser for Echap's stalkerware-indicators repo

3 unstable releases

0.2.0 Dec 15, 2022
0.1.1 May 1, 2022
0.1.0 Apr 30, 2022

#24 in #rule

Download history 2/week @ 2024-02-14 11/week @ 2024-02-21 25/week @ 2024-02-28 9/week @ 2024-03-06 12/week @ 2024-03-13

58 downloads per month
Used in spytrap-adb

MIT/Apache

67KB
107 lines

stalkerware-indicators-rs crates.io docs.rs

Parser for Echap's stalkerware-indicators repo.

Usage

See the documentation.

Lint a file

git clone https://github.com/AssoEchap/stalkerware-indicators
cargo run --example lint -- stalkerware-indicators/ioc.yaml

License

MIT/Apache2


lib.rs:

Parse a stalkerware-indicators yaml into a list of Rules.

Example

use anyhow::Context;
use std::fs;

fn main() -> anyhow::Result<()> {
    let buf = fs::read("test_data/ioc-2022-12-15.yaml")
        .context("Failed to read ioc yaml file")?;

    let rules = stalkerware_indicators::parse_from_buf(&buf);
    for rule in rules {
        println!("Rule: {:?}", rule);
    }

    Ok(())
}

Dependencies

~2.1–3MB
~63K SLoC