Saturday, 5. January 2013Week 00
.: Nice-looking templates for HAVP

Since the default templates of HAVP look like being stuck in the 90's, I created some nice-looking templates.
You can download them from GitHub:
Currently there is only the german version, feel free to send me a pull-request with another translation :-)

havp-templates screenshot

00:14 | Linux | Permalink
Tuesday, 1. January 2013Week 00
.: HAVP PhishTank and Adserver Blacklist

For basic virus protection I'm running a proxy with HAVP and ClamAV.
Since some time I was using HAVPs blacklist functionality to block Ads (by blacklisting * and * As such a manual blacklist is not very efficient I wanted to have an auto-updating list of adservers, thus I started to write the shellscript below which generates an up-to-date blacklist based on the adserverlist from

Shortly after this I extended the script to also incorporate a Phising blacklist based on the data from PhishTank.
Currently I'm using the version below which runs in a cronjob every two hours and keeps the HAVP blacklist up-to-date. Please note that you need to insert your own free PhishTank API key when using this script.


cd /etc/havp



wget -q -N ";showintro=0;mimetype=plaintext"
sed -e 's_^//_#_g' serverlist.php* | sort | uniq > $ADSERVERLIST

wget -q -N<PhishTank API key>/online-valid.csv.bz2
bzcat online-valid.csv.bz2 | sed \
	-e 's/^[0-9]*,//' \
	-e 's@,[0-9]*,.*$@@' \
	-e 's/^"\(.*\)"$/\1/'  \
	-e 's_^https\?://__' \
	-e 's_/$_/*_' \
	-e 's_^\([^/]*\)$_\1/*_' \
	-e 's/?.*/*/' | \
grep -vF 'phish_id,url,phish_detail_url,submission_time,verified,verification_time,online,target' | \
iconv -f utf8 -t ascii -c - | sort | uniq > $PHISHTANK

echo "# blacklist file generated by $0, `date`" > $OUTFILE



echo "\n# PHISHTANK:" >> $OUTFILE

12:50 | Linux | Permalink