Skip to content

Instantly share code, notes, and snippets.

@linuxmalaysia
Last active April 20, 2019 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linuxmalaysia/529ff11de7bbf4b13207eee8ea942e80 to your computer and use it in GitHub Desktop.
Save linuxmalaysia/529ff11de7bbf4b13207eee8ea942e80 to your computer and use it in GitHub Desktop.
Convert shallalist to logstash yml
#!/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