Discontinue use of scamp.sh

MrTalent's Debian config questions go here!

Moderators: Admins, Forum Moderator

Discontinue use of scamp.sh

Postby mr88talent » Thu Jun 28, 2007 11:17 am

In my docs I provided instructions to use scamp.sh to download 3rd party scam and phishing ClamAV signatures from SaneSecurity.com. I also had scamp.sh log to /var/log/clam.log. I did not provide a method to rotate clam.log so it will grow forever. I have been asked to remove the provided script (because newer scripts solve some bandwith issues at sanesecurity.com). Please discontinue use of the provided scamp.sh and instead use:

Code: Select all
apt-get install curl rsync

cd /usr/sbin
wget http://www200.pair.com/mecham/spam/UpdateSaneSecurity.sh.txt
mv UpdateSaneSecurity.sh.txt UpdateSaneSecurity.sh
chmod +x UpdateSaneSecurity.sh
UpdateSaneSecurity.sh
ls -l /var/lib/clamav

You will notice the data has been downloaded:
drwxr-xr-x 2 clamav clamav    4096 2007-06-16 19:48 daily.inc
-rw-r--r-- 1 clamav clamav 9351789 2007-06-10 21:16 main.cvd
-rw------- 1 clamav clamav     260 2007-06-16 19:14 mirrors.dat
-rw-r--r-- 1 clamav clamav  347982 2007-06-16 19:25 MSRBL-Images.hdb
-rw-r--r-- 1 clamav clamav  228232 2007-06-08 04:33 MSRBL-SPAM.ndb
-rw-r--r-- 1 clamav clamav 1033688 2007-06-16 19:48 phish.ndb
-rw-r--r-- 1 clamav clamav  174338 2007-06-15 02:55 phish.ndb.gz
-rw-r--r-- 1 clamav clamav  516182 2007-06-16 19:48 scam.ndb
-rw-r--r-- 1 clamav clamav  102738 2007-06-15 02:55 scam.ndb.gz

Now we add a crontab entry with download attempts performed every 4th hour:
crontab -e

Insert this entry. Replace MM (minutes) below with a number between 1 and 59:
MM */4 * * * /usr/sbin/UpdateSaneSecurity.sh

Save and exit the file. The above cron job should run every four hours.

You need to remove the crontab entry for /usr/sbin/scamp.sh and delete /var/log/clam.log. Logs of the last download are now located in /var/tmp/clamdb/. The new script also adds the MSRBL spam and image signatures.
Last edited by mr88talent on Thu Aug 02, 2007 2:35 pm, edited 1 time in total.
User avatar
mr88talent
Moderator
 
Posts: 1676
Joined: Tue Mar 08, 2005 4:19 pm
Location: Salt Lake City

Postby sander » Sun Jul 29, 2007 7:38 am

I'm getting this error when running your script:

Code: Select all
socserver:/usr/sbin# ./UpdateSaneSecurity.sh
        rysnc had a problem getting /var/lib/clamav/MSRBL-SPAM.ndb! (error: 0)
        We will not install /var/lib/clamav/MSRBL-SPAM.ndb into the Database directory
        Renaming /var/tmp/clamdb/MSRBL-SPAM.ndb to /var/tmp/clamdb/MSRBL-SPAM.ndb.bad for you to check
mv: cannot stat `/var/lib/clamav/MSRBL-SPAM.ndb': No such file or directory
mv: cannot stat `/var/lib/clamav/MSRBL-SPAM.ndb-bak': No such file or directory
        rysnc had a problem getting /var/lib/clamav/MSRBL-Images.hdb! (error: 0)
        We will not install /var/lib/clamav/MSRBL-Images.hdb into the Database directory
        Renaming /var/tmp/clamdb/MSRBL-Images.hdb to /var/tmp/clamdb/MSRBL-Images.hdb.bad for you to check
mv: cannot stat `/var/lib/clamav/MSRBL-Images.hdb': No such file or directory
mv: cannot stat `/var/lib/clamav/MSRBL-Images.hdb-bak': No such file or directory
sander
 
Posts: 2
Joined: Sun Jul 29, 2007 7:37 am

Postby sander » Sun Jul 29, 2007 7:58 am

nvm just found the problem

I manually ran the rsync command to download the initial files and after that the script does work.
sander
 
Posts: 2
Joined: Sun Jul 29, 2007 7:37 am

Postby mr88talent » Thu Aug 02, 2007 2:34 pm

Aug 02 2007:

The UpdateSaneSecurity.sh.txt file has been updated. Please download and install the new copy. Thanks.
User avatar
mr88talent
Moderator
 
Posts: 1676
Joined: Tue Mar 08, 2005 4:19 pm
Location: Salt Lake City

Postby oTTo » Thu Apr 24, 2008 2:00 pm

I get this error when I try to run this Update script - any ideas?
Cannot find curl ... exiting"
oTTo
 
Posts: 26
Joined: Fri Aug 11, 2006 2:54 am

Postby AnonymousDog » Thu Apr 24, 2008 3:44 pm

I'd say curl is not in the PATH of the user running the script b/c either it isn't installed or is but the binaries aren't in your path (which would be unexpected). Verify and/or install curl per your tastes.
User avatar
AnonymousDog
Moderator
 
Posts: 398
Joined: Fri Oct 20, 2006 12:54 pm
Location: SW Michigan

Postby oTTo » Thu Apr 24, 2008 4:12 pm

re installed curl and good to go. Thanks
oTTo
 
Posts: 26
Joined: Fri Aug 11, 2006 2:54 am


Return to Debian

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest