mirror of
https://github.com/MaintainTeam/Hypatia.git
synced 2025-03-01 05:48:23 +03:00
Add reference scripts for generating the databases
This commit is contained in:
parent
af17aba5fc
commit
c577c0f205
2 changed files with 44 additions and 0 deletions
28
scripts/clamav.sh
Normal file
28
scripts/clamav.sh
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#sudo freshclam
|
||||||
|
mkdir /tmp/mss
|
||||||
|
cd /tmp/mss
|
||||||
|
cp /var/lib/clamav/main.cvd .
|
||||||
|
cp /var/lib/clamav/daily.cld .
|
||||||
|
sigtool -u main.cvd
|
||||||
|
sigtool -u daily.cld
|
||||||
|
|
||||||
|
#MD5
|
||||||
|
grep "Andr\\." main.hdb >> Android.hdb
|
||||||
|
grep "Andr\\." daily.hdb >> Android.hdb
|
||||||
|
grep "Unix\\." main.hdb >> Android.hdb
|
||||||
|
grep "Unix\\." daily.hdb >> Android.hdb
|
||||||
|
grep "Multios\\." main.hdb >> Android.hdb
|
||||||
|
grep "Multios\\." daily.hdb >> Android.hdb
|
||||||
|
|
||||||
|
#SHA
|
||||||
|
grep "Andr\\." main.hsb >> Android.hsb
|
||||||
|
grep "Andr\\." daily.hsb >> Android.hsb
|
||||||
|
grep "Unix\\." main.hsb >> Android.hsb
|
||||||
|
grep "Unix\\." daily.hsb >> Android.hsb
|
||||||
|
grep "Multios\\." main.hsb >> Android.hsb
|
||||||
|
grep "Multios\\." daily.hsb >> Android.hsb
|
||||||
|
|
||||||
|
gzip /tmp/mss/*.hdb
|
||||||
|
gzip /tmp/mss/*.hsb
|
16
scripts/eset.sh
Normal file
16
scripts/eset.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
processHashes() {
|
||||||
|
local name=$(basename $1);
|
||||||
|
if [ -f $1/samples.$2 ]; then
|
||||||
|
while IFS= read -r line
|
||||||
|
do
|
||||||
|
echo "$line":0:ESET."$name" >> ./eset.$3;
|
||||||
|
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' \;
|
||||||
|
gzip *.hdb;
|
||||||
|
gzip *.hsb;
|
Loading…
Add table
Reference in a new issue