Last active
April 20, 2019 23:31
-
-
Save linuxmalaysia/529ff11de7bbf4b13207eee8ea942e80 to your computer and use it in GitHub Desktop.
Convert shallalist to logstash yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# convert shallalist.tar.gz into logstash yml | |
# http://www.shallalist.de/categories.html | |
# Harisfazillah Jamel 30032019 | |
# wget -c http://www.shallalist.de/Downloads/shallalist.tar.gz | |
# make sure uncompress under same directory as this script. | |
echo "localhost: locahost" > /etc/logstash/malware2.yml | |
find BL/ -name 'domains' -print0 | | |
while IFS= read -r -d $'\0' line; do | |
blgroup=`echo $line | cut -f 2 -d /` | |
awk -v var="$blgroup" '$1 { print $1": " var}' $line >> /etc/logstash/malware2.yml | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment