roberson-io / mdd

EVERY MAN HAS A PRICE (Golang edition)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MILLION DOLLAR DREAM (Golang edition)

Every man has a price.

This creates a Bloom filter to store and lookup file hashes in a space efficent manner.

The original version of this tool was written in Python.

Dependencies

Usage

Calculate hashes and store in a new Bloom filter file

./mdd calculate <filterfile> <directory>

For example:

./mdd calculate ./filters/wordpress /tmp/wordpress

Lookup files in a directory using an existing filter

./mdd lookup <filterfile> <directory>

Maybe you generated the Wordpress filter using the calculate command above and want to check an installation of Wordpress:

./mdd lookup ./filters/wordpress /path/to/wordpress

Create a new Bloom filter with a text file containing MD5 hashes

./mdd fromfile <filterfile> <hashfile>

For example, you have a hashes.txt file containing MD5 hashes for files in an application:

793e9490b89f2246eb644d70f4504140
4712e995ba48f00911e23ab6230808e2
ec0e6f5c28f6b251563f42adf6f47544
...
./mdd fromfile ./filters/myapp ./hashes.txt

Any lines that are not 32-character hex strings will be ignored.

Fetch filter files from a remote repository

By default, this tool points to my mdd_filters GitHub repository. The first time you run a filters command, the tool will create a config.json file. You can edit config.json to point anywhere that serves a METADATA.json file and filter files from the same endpoint via HTTP. There is a Python script in my mdd_filters repo that generates METADATA.json.

List locally installed filter files

./mdd filters list

List remote filter files at remote endpoint set in config.json

./mdd filters list remote

List remote filter files at some other URL

./mdd filters list <url>

Fetch a remote filter file

./mdd filters fetch <filter_name>

Pull any updated filter files from remote

./mdd filters update

About

EVERY MAN HAS A PRICE (Golang edition)


Languages

Language:Go 100.0%