Hypatia/scripts/0eset.sh
Tad 1c29038125
Directly load the pre-processed bloom filters
No more conversion, much quicker loading, much smaller downloads

Signed-off-by: Tad <tad@spotco.us>
2023-12-21 23:30:41 -05:00

19 lines
605 B
Bash

#!/bin/bash
#License: GPLv3
#Description: Hypatia conversion script for https://github.com/eset/malware-ioc (BSD-2-Clause)
processHashes() {
local name=$(basename $1);
if [ -f $1/samples.$2 ]; then
dos2unix $1/samples.$2
while IFS= read -r line
do
echo "$line" >> ./eset.$2;
done < "$1/samples.$2";
fi;
}
export -f processHashes;
find . -maxdepth 2 -mindepth 1 -type d -exec bash -c 'processHashes "{}" md5 hdb' \;
find . -maxdepth 2 -mindepth 1 -type d -exec bash -c 'processHashes "{}" sha1 hsb' \;
find . -maxdepth 2 -mindepth 1 -type d -exec bash -c 'processHashes "{}" sha256 hsb' \;