## Postgres Extension for MalwareDB This is an attempt to use Rust for the similarity functions used by MalwareDB. The similarity functions: * [SSDeep](https://ssdeep-project.github.io/ssdeep/index.html): provided by the [fuzzyhash](https://crates.io/crates/fuzzyhash) crate. * [LZJD](https://github.com/EdwardRaff/LZJD): provided by the [malwaredb-lzjd](https://crates.io/crates/malwaredb-lzjd) crate. * [TLSH](https://tlsh.org): provided by the [tlsh-fixed](https://crates.io/crates/tlsh-fixed) crate. Goals: * Enable easier deployment of Malware DB. * Get the benefits Rust has to offer on the Postgres side. * Ensure the functions work across Postgres versions. MalwareDB-pg is currently a work-in-progress. ### Compiling This project uses [pgrx](https://github.com/pgcentralfoundation/pgrx). Please refer to their project page for prerequisites. 1. Install pgrx: `cargo install --locked cargo-pgrx` 2. Initialize pgrx: `cargo pgrx init` 3. Run tests: `cargo pgrx test` 4. Try the module: `cargo pgrx run`, then run `create extension malwaredb_pg;` 5. Package the module: `cargo pgrx package`