| Crates.io | matchy |
| lib.rs | matchy |
| version | 2.0.0 |
| created_at | 2025-10-10 21:20:37.374576+00 |
| updated_at | 2025-12-29 07:41:13.907041+00 |
| description | Fast database for IP address and pattern matching with rich data storage |
| homepage | |
| repository | https://github.com/matchylabs/matchy |
| max_upload_size | |
| id | 1877576 |
| size | 1,199,049 |
Fast IoC matching against logs, network traffic, and security data.
Matchy builds memory-mapped databases from threat intelligence feeds, enabling fast lookups of IPs, domains, file hashes, and glob patterns.
# Build a threat database from your intel feeds
matchy build threats.csv -o threats.mxy
# Scan your logs for matches (multi-threaded)
matchy match threats.mxy access.log
# Query individual indicators
matchy query threats.mxy 1.2.3.4
Threat Intelligence Matching: You have threat feeds (IPs, domains, file hashes) and need to search for them in your data.
Use Cases:
*.evil.com matches subdomains automaticallycargo install matchy
Requirements: Rust 1.87+ (or use pre-built binaries)
Create a CSV with your indicators:
entry,threat_level,category,source
1.2.3.4,high,malware,abuse.ch
10.0.0.0/8,low,internal,rfc1918
*.evil.com,critical,phishing,urlhaus
malware.example.com,high,c2,internal
ab5ef3c21d4e...,high,malware,virustotal
Build the database:
matchy build threats.csv -o threats.mxy --format csv
# Build MaxMind-compatible MMDB (IP data only)
matchy build ip-blocklist.csv -o blocklist.mmdb --format csv
# Works with any tool expecting MMDB format!
# Scan access logs (outputs JSON, one match per line)
matchy match threats.mxy /var/log/nginx/access.log
# With statistics
matchy match threats.mxy access.log --stats
# Scan gzip logs (automatic decompression)
matchy match threats.mxy access.log.gz
# Watch live logs
tail -f /var/log/app.log | matchy match threats.mxy -
# Quick testing: skip the build step (auto-builds from JSON/CSV)
matchy match threats.json access.log # builds database in-memory
# Check an IP
matchy query threats.mxy 1.2.3.4
# [{"threat_level":"high","category":"malware","source":"abuse.ch"}]
# Check a domain
matchy query threats.mxy sub.evil.com
# [{"threat_level":"critical","category":"phishing","source":"urlhaus"}]
# Check a hash
matchy query threats.mxy ab5ef3c21d4e...
# Query MaxMind GeoIP databases (no libmaxminddb needed)
matchy query GeoLite2-City.mmdb 8.8.8.8
# {"city":"Mountain View","country":"US",...}
cargo add matchy --no-default-features # Library only, no CLI
See API docs for building databases, querying, and extracting IoCs from text.
#include <matchy/matchy.h>
matchy_t *db = matchy_open("threats.mxy");
matchy_result_t result = matchy_query(db, "1.2.3.4");
matchy_close(db);
MaxMind-compatible API also available. See The Matchy Book for integration guides.
License: Apache-2.0 Contributing: CONTRIBUTING.md
Matchy extends MaxMind's MMDB format with Paraglob-style glob matching and literal string matching, creating a unified IoC database format.