Expand description
Pluggable input sources for KeyHog.
Each source implements the keyhog_core::Source trait and yields keyhog_core::Chunk
values for the scanner. Sources are gated behind cargo features so only the
transitive dependencies you actually need are compiled.
Modules§
- reqwest
- Local HTTP compatibility shim backed by reqwest. Only present when
at least one feature that pulls in
reqwestis enabled — otherwise this module wouldpub use reqwest::*against a crate that wasn’t compiled in, which fails resolution on stable rustc (especially on Windows where--no-default-featuresis the release profile we ship for the no-Hyperscan build). - strings
- Printable string extraction from binary data. Shared by the filesystem source (auto-detection) and binary source (explicit).
Structs§
- Filesystem
Source - Scans files in a directory tree.
- GitDiff
Source - Scans only the ADDED lines between two git refs.
Uses
git diffunified diff output and extracts lines starting with ‘+’. Useful for CI/CD pre-commit hooks and PR checks. - GitHistory
Source - Scans git history commit-by-commit using patch output and extracts added lines.
- GitSource
- Scans git history: traverses commits and extracts text blob contents.
- Stdin
Source - Reads all of stdin as a single chunk.
- WebSource
- Web content source that fetches JavaScript, source maps, and WASM from URLs.
Functions§
- create_
source - Create a source instance from a name and optional parameters. This allows the CLI to remain agnostic of specific source implementations.
- register_
plugins - Register all compiled-in source plugins into the global registry.
This allows the CLI to discover sources like
slackors3via the generic--sourceflag without hardcoded logic in the main crate.