Panda update
Victor DiMichina
victor at PIXELMAGICFX.COM
Fri Mar 19 23:38:04 GMT 2004
Sanjay K. Patel wrote:
>Is anyone using this? Where do I provide the username and password?
>
>SKP
>
You'll need to make sure port 8003 is open on your firewall for this
update. Make sure you have the dependencies. You can figure out
through reverse engineering the places where your username and password
go.
I hope you find these scripts helpful. They were provided by Panda.
One script is the auto - update, the other is the sample cron
entry. Panda updates their pav.sig file every day around 3:30pm CET.
I did the math as I'm in PST, and added a few hours to it. :)
Vic
>
>
------------------------------------------------------------------------
#!/bin/bash
#
# Panda Antivirus Linux PAV.SIG downloading script
# ------------------------------------------------
# pavupdate.sh ----------------------- version 1.0
#
# This script takes care of downloading and installing
# the antivirus signature file (pav.sig). It is very suitable
# to be set as a daily cron job on your PAV Linux server.
# It should not be world/group readable as it contains
# your update username/password in cleartext. Read the
# "README" file for more details on dependencies and such.
#
# (c) Copyright Daniel Nyström <dny at pcmint.se>,
# PCM International AB, Sweden.
# Configuration section. Set the user and pass variables. You should not
# need to touch the path var...
USER=""
PASS=""
PATHTOPAVSIG="/usr/lib/panda/pav.sig"
# Preparing other variables... Do not modify if you don't know what
# you are doing...
DATE=`date +%m%d`
GETSTRING="http://updates.pandasoftware.com:8003/software/basevirus/pav$DATE.zip"
TEMPDIR="/tmp"
STARTDIR=`pwd`
# Doing it.
clear
echo ""
echo "======= PCM INTERNATIONAL ======="
echo "================================="
echo "= Panda Antivirus Linux Updater ="
echo "================================="
echo "===================== version 1.0"
echo ""
echo "Starting..."
# Changing dir and downloading...
cd $TEMPDIR
echo "Downloading..."
wget --http-user=$USER --http-passwd=$PASS $GETSTRING
# Checking for errors... Then unzipping...
if [ -f pav$DATE.zip ]
then
echo ""
echo "File download successful! unzipping.."
unzip pav$DATE.zip
else
echo ""
echo "File download _not_ successful!"
echo "Check your configuration..."
exit
fi
# Checking for errors... Then installing...
if [ -f PAV.SIG ]
then
echo "Unzipping successful! Installing..."
rm -f pav$DATE.zip
mv PAV.SIG $PATHTOPAVSIG
else
echo "Unzipping _not_ successful!"
echo 'Check that your system has the "unzip" util...'
exit
fi
# All the action is over :)
echo ""
echo "Update complete. Have a nice day!"
echo ""
# EOF pavupdate.sh, version 1.0
#
# (c) Copyright Daniel Nyström <dny at pcmint.se>,
# PCM International AB, Sweden.
------------------------------------------------------------------------
# README v0.1 - pavupdate.sh
#
# Panda Antivirus Linux PAV.SIG downloading script
# ------------------------------------------------
# pavupdate.sh ----------------------- version 1.0
#
# This script takes care of downloading and installing
# the antivirus signature file (pav.sig). It is very suitable
# to be set as a daily cron job on your PAV Linux server.
#
# (c) Copyright Daniel Nyström <dny at pcmint.se>,
# PCM International AB, Sweden.
Files in this package
---------------------
-rwxr-xr-x 1 root root 218 Nov 22 12:28 00PandaAVCheck*
-rwx------ 1 root root 2079 Nov 22 10:12 pavupdate.sh*
-rw-r--r-- 1 root root 2726 Nov 22 12:29 README
How to use?
-----------
You should just need to dotslash the script (./pavupdate.sh) and it will most probably
download the newest pav.sig available. You do need to have some small utils installed tough.
See dependencies section below. Please remember, and do not mail me about, that Panda Software
does not update the pav.sig file until about three o'clock in the afternoon (CET). So if you try
to update before that time you most probably will get a HTTP Error: 404 reply. So if you set this
script to run as a cron job, make sure it runs in the evening (CET). For example, my crontab line
for cron.daily looks like this:
15 16 * * * root run-parts /etc/cron.daily
So that it runs every day at 16:15. The cron script itself (included) looks like this:
<!-- start console output -->
[root at testbox cron.daily]# cat 00PandaAVCheck
#/bin/sh
#
# Panda Antivirus Linux cron job
#
# example for pavupdate.tar.gz
#
# Run pavupdate.sh to update pav.sig
/root/pavupdate/pavupdate.sh
# Run AV check on home dirs
pavcl /home/ -CLV -DEL -HEU -NSO -AUT
pavcl /mnt/ -CLV -DEL -HEU -NSO -AUT
[root at testbox cron.daily]#
<!-- End console output -->
Contact
-------
If you experience any other problems or difficulities that were not mentioned in this file,
please mail the author at any of the following adresses:
dny at pcmint.se
exce at netwinder.nu
daniel-nystrom at tyko.nu
Dependencies
------------
* Bash -> The shell (Download: http://www.gnu.org/directory/bash.html)
* wget -> Dowload tool (Download: http://www.gnu.org/directory/wget.html)
* unzip -> Unzipper (Download: http://www.info-zip.org/pub/infozip/UnZip.html)
* mv, rm and all the other basic commands a linux system should contain.
-------------- next part --------------
Skipped content of type multipart/related
More information about the MailScanner
mailing list