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

stalkerware-indicators

Parser for Echap's stalkerware-indicators repo

4 releases

0.2.1 Jun 11, 2024
0.2.0 Dec 15, 2022
0.1.1 May 1, 2022
0.1.0 Apr 30, 2022

#8 in #repo


Used in spytrap-adb

MIT/Apache

66KB
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–3MB
~61K SLoC