On Sun, 26 Feb 2006, Steve Basford wrote:
> From: Steve Basford <[EMAIL PROTECTED]>
> To: ClamAV users ML <[email protected]>
> Date: Sun, 26 Feb 2006 16:17:59 +0000
> Subject: Re: [Clamav-users] Phishing Signatures
...
> You could setup wget to download my phish.ndb sigs daily, once
> you're happy.
I usually use a recent version of curl. So I've just written the
little shell script appended below. I'll probably start using it on
a daily basis next week[1].
The script should get a fresh copy of the phish.ndb sigs over a
compressed connection but ONLY if the signatures on the download
site are newer than our existing copy.
[1] I'm always wary about starting up new things on a Friday
afternoon. Plenty can go wrong over the weekend!
#!/bin/sh
# Shell script to fetch and update Steve Basford's anti-phishing
# database. Note this is fetched via HTTP. So we'll need to set a
# proxy on machines that don't have direct web access.
#
# DHD March 2006
set -a # probably not needed.
curl=/usr/local/bin/curl
mv=/bin/mv
rm=/bin/rm
http_proxy='wwwcache.bath.ac.uk:3128' # Proxy set.
#DHD#http_proxy= # No proxy.
tmpbase=/tmp
tmpdir=$tmpbase/anti-phishing.$$
clamdir=/var/db/clamav
phish_db=phish.ndb
phish_reference=$clamdir/$phish_db
phish_file=http://www.sanesecurity.com/clamav/$phish_db
mkdir $tmpdir || exit 1
trap "$rm -rf $tmpdir; trap 0" 0 1 2 15
cd $tmpdir || exit 1
$curl --compressed -x "$http_proxy" -O -R -s \
-z $phish_reference $phish_file
if [ -s $tmpdir/$phish_db ]
then
$mv -f $tmpdir/$phish_db $clamdir
fi
exit 0
--
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
[EMAIL PROTECTED] Phone: +44 1225 386101
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html