Created
July 19, 2019 06:21
-
-
Save linuxmalaysia/ea86220e3f2e2cd4e322b046931753db to your computer and use it in GitHub Desktop.
# convert shallalist.tar.gz into csv # http://www.shallalist.de/categories.html # Harisfazillah Jamel 30032019 # wget -c http://www.shallalist.de/Downloads/shallalist.tar.gz # https://www.squidblacklist.org/downloads/dg-malicious.acl (masukkan dalam BL/malware dan tukar nama fail ke domains
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 csv | |
# http://www.shallalist.de/categories.html | |
# Harisfazillah Jamel 30032019 | |
# wget -c http://www.shallalist.de/Downloads/shallalist.tar.gz | |
# https://www.squidblacklist.org/downloads/dg-malicious.acl (masukkan dalam BL/malware dan tukar nama fail ke domains | |
echo "\"localhost\",locahost" > malware3.tmp | |
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 >> malware3.tmp | |
done | |
# use ctrl V and M after copy paste to replace ^M | |
sed -e "s/ | |
//" malware3.tmp > malware3.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment