MailEnable & Panda CommandLine
MailEnable & Panda CommandLine
HI,
is anyone using successfully the Panda CommandLineSecure?
If yes, has anyone figured out how to do the automatic signature update? Panda Software wants to get me to buy a $260+ program for Server capability that includes the automatic signature updates.....
Help is appreciated.......
I'm trying to decide between the Panda CommandLineSecure or F-Prot (or I accept any other suggestions... )
Thanks,
-MrByte
is anyone using successfully the Panda CommandLineSecure?
If yes, has anyone figured out how to do the automatic signature update? Panda Software wants to get me to buy a $260+ program for Server capability that includes the automatic signature updates.....
Help is appreciated.......
I'm trying to decide between the Panda CommandLineSecure or F-Prot (or I accept any other suggestions... )
Thanks,
-MrByte
You can buy only PandaCL licence for US$11 per licence. Weird thing is, that they treat licences as per client, so if you have 10 e.mail clients, they will force you to buy 10 licences, US$ 11 each.
the lowest quote is 5 licences, therefore, US$55.
I got PandaCL from our local Panda distributor, and they say, that PandaCL itself supports automatic daily updates, and licence is valid for one year.
the lowest quote is 5 licences, therefore, US$55.
I got PandaCL from our local Panda distributor, and they say, that PandaCL itself supports automatic daily updates, and licence is valid for one year.
I wrote a script that fetches the sig file from
http://updates.pandasoftware.com:8003/s ... av0308.zip
each day.
you need to have a valid username and password to be able to download
the file
you need to write a routine that figures out the filename based on date.
login and check if a new signature file is avaliable, if so download it
and there you go.
http://updates.pandasoftware.com:8003/s ... av0308.zip
each day.
you need to have a valid username and password to be able to download
the file
you need to write a routine that figures out the filename based on date.
login and check if a new signature file is avaliable, if so download it
and there you go.
... well, so far I have been as well opening the website, enter the user/password and getting the file.
I was just wondering if there was an easier way, since you still have the problem of the popup that asks for the user/password, and that there is no fixed time for that popup will come on as it depends on how quick or not their server responds.
Also, as techcall asks, whit what did you do the scripting? If you care to share I (among others as well) would really appreciate it
Thanks,
I was just wondering if there was an easier way, since you still have the problem of the popup that asks for the user/password, and that there is no fixed time for that popup will come on as it depends on how quick or not their server responds.
Also, as techcall asks, whit what did you do the scripting? If you care to share I (among others as well) would really appreciate it
Thanks,
.MrByte
Download WGET for Windows http://xoomer.virgilio.it/hherold/
Then you can simply schedule a job to run:
wget --http-user=USER --http-passwd=PASS --timestamping http://www.domain.com/file.zip
Kiliman
Then you can simply schedule a job to run:
wget --http-user=USER --http-passwd=PASS --timestamping http://www.domain.com/file.zip
Kiliman
Hi,
Here is my script for fetching the updates, its a quick hack, that could be improved!
-------------- script -------------
'Function, calculate signature filename
function sigfile()
dim m, d, rtnstr
m = month(now)
d = day(now)
if m < 10 then
m = "0" & m
end if
if d < 10 then
d = "0" & d
end if
rtnstr = "pav" & m & d & ".zip"
sigfile = rtnstr
end function
'*****************************************************************
'Function, read text file into array
function readfile(file)
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FileExists(File) then
Dim ReadTemp, Lines, i
Set ReadTemp = fs.OpenTextFile(File, ForReading)
Lines = Split(ReadTemp.ReadAll,vbCrLf)
ReadTemp.Close
Set ReadTemp = Nothing
readfile = Lines
else
'File not found
readfile = false
end if
Set fs = Nothing
end function
'*****************************************************************
Const ForReading = 1 'Standard script variable
Const options = "-ybc" 'Options for winzip
dim temp, f, fc 'Variable for iterating
dim wget: wget = "C:\PROGRA~1\MAILEN~1\avscan\panda\wget.exe" 'Full path to wget.exe
dim zip: zip = "C:\PROGRA~1\winzip\wzunzip.exe" 'Full path wzunxip.exe
dim user: user = "CCBPSMZ8H2" 'Username for pandasoftware.com
dim pass: pass = "r84u7b3g" 'Password for pandasoftware.com
dim url: url = "acs.pandasoftware.com/software/basevirus" 'URL to signature file at pandasoftware.com
dim file: file = sigfile 'Signature File navn returned from fuction
dim outfol: outfol = "C:\PROGRA~1\MAILEN~1\avscan\panda\output" 'Output is saved here
dim workfol: workfol = "C:\PROGRA~1\MAILEN~1\avscan\panda\work" 'Temporary folder
dim logfol: logfol = "C:\PROGRA~1\MAILEN~1\avscan\panda\log" 'Logfile is saved here
dim tempfile: tempfile = "temp.txt" 'Temporary file for text messages from wget and zip
dim logfile: logfile = "pandaupdate.log" 'Name of log file
dim zfile: zfile = "sig.zip" 'Name of zip file, downloaded from pandasoftware.com
'Compile command for wget to fetch the signature file
dim wCmd: wCmd = "%comspec% /c " & wget & " -o " & workfol & chr(92) & tempfile & " -O " & workfol & chr(92) & zfile & " " & "http://" & user & ":" & pass & "@" & url & "/" & file
'Compile command for wzunzip to unzip the file
dim zCmd: zCmd = "%comspec% /c " & zip & " " & options & " " & workfol & chr(92) & zfile & " " & outfol & " 1>" &workfol & chr(92) & tempfile
'*****************************************************************
'Housekeeping of temporaray folders
Set FSO = CreateObject("Scripting.FileSystemObject")
if not FSO.FolderExists(outfol) then
wscript.echo "true: " & outfol
FSO.CreateFolder(outfol & chr(92))
end if
if FSO.FolderExists(workfol) then
FSO.DeleteFolder(workfol)
FSO.CreateFolder(workfol)
else
FSO.CreateFolder(workfol)
end if
if FSO.FolderExists(logfol) then
FSO.DeleteFolder(logfol)
FSO.CreateFolder(logfol)
else
FSO.CreateFolder(logfol)
end if
'*****************************************************************
'Make log file, write standard message
Set TextStream = FSO.CreateTextFile(logfol & chr(92) & logfile)
TextStream.WriteLine("Update of Panda Virus Signature file")
TextStream.WriteLine("Date (Last executed): " & now)
TextStream.WriteBlankLines(1)
TextStream.WriteLine("Using WGET to download signature file:")
TextStream.WriteBlankLines(1)
'*****************************************************************
'Execute wget command
TextStream.WriteLine("Transcript of WGET progress follows:")
Set Shell = CreateObject("WScript.Shell")
shell.run wCmd,0,true
temp = readfile(workfol & chr(92) & tempfile)
if IsArray(temp) then
TextStream.WriteBlankLines(1)
for each line in temp
TextStream.WriteLine(line)
next
TextStream.WriteBlankLines(1)
if FSO.FileExists(workfol & chr(92) & tempfile) then
FSO.DeleteFile(workfol & chr(92) & tempfile)
end if
else
TextStream.WriteLine("WGET returned no output.")
end if
temp = empty
'*****************************************************************
'Check if wget was a succes, else stop here
if FSO.FileExists(workfol & chr(92) & zfile) then
Shell.Run zCmd, 0, true
temp = readfile(workfol & chr(92) & tempfile)
if IsArray(temp) then
TextStream.WriteLine("Transcript of WZUNZIP progress follows:")
for each line in temp
TextStream.WriteLine(line)
next
if FSO.FileExists(workfol & chr(92) & tempfile) then
FSO.DeleteFile(workfol & chr(92) & tempfile)
end if
if FSO.FolderExists(outfol) then
TextStream.WriteLine("The following files exist in output folder:")
Set f = FSO.GetFolder(outfol)
Set fc = f.Files
i = 0
For Each f1 in fc
TextStream.WriteLine(f1.name & vbCrLf)
i = i + 1
Next
if i = 0 then
TextStream.WriteLine("No files, sorry...")
end if
else
TextStream.WriteLine("Fatal, output folder is missing! (" & outfol & ")")
end if
else
TextStream.WriteLine("WZUNZIP returned no output.")
end if
else
TextStream.WriteLine("Signature file was not downloaded, please check WGET progress report.")
end if
TextStream.WriteLine(" --- END OF FILE --- ")
TextStream.Close
Set Shell = Nothing
Set FSO = Nothing
--------------- script --------------
I call it from this cmd file:
------------ cmd file --------------
@echo off
c:\winnt\system32\cscript.exe //nologo update.vbs
net stop memtas
move /Y c:\progra~1\mailen~1\avscan\panda\output\pav.sig c:\progra~1\mailen~1\avscan\panda
net start memtas
------------- cmd file -------------
Im stopping the memtas (Mail Transport Agent) service, to avoid something odd happening if the mta calls pavcl while the signaturefile isnt avaliable/being updates. Its probably not nessesary when a move command is being used, i dont know, better safe then sorry!
Here is my script for fetching the updates, its a quick hack, that could be improved!
-------------- script -------------
'Function, calculate signature filename
function sigfile()
dim m, d, rtnstr
m = month(now)
d = day(now)
if m < 10 then
m = "0" & m
end if
if d < 10 then
d = "0" & d
end if
rtnstr = "pav" & m & d & ".zip"
sigfile = rtnstr
end function
'*****************************************************************
'Function, read text file into array
function readfile(file)
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FileExists(File) then
Dim ReadTemp, Lines, i
Set ReadTemp = fs.OpenTextFile(File, ForReading)
Lines = Split(ReadTemp.ReadAll,vbCrLf)
ReadTemp.Close
Set ReadTemp = Nothing
readfile = Lines
else
'File not found
readfile = false
end if
Set fs = Nothing
end function
'*****************************************************************
Const ForReading = 1 'Standard script variable
Const options = "-ybc" 'Options for winzip
dim temp, f, fc 'Variable for iterating
dim wget: wget = "C:\PROGRA~1\MAILEN~1\avscan\panda\wget.exe" 'Full path to wget.exe
dim zip: zip = "C:\PROGRA~1\winzip\wzunzip.exe" 'Full path wzunxip.exe
dim user: user = "CCBPSMZ8H2" 'Username for pandasoftware.com
dim pass: pass = "r84u7b3g" 'Password for pandasoftware.com
dim url: url = "acs.pandasoftware.com/software/basevirus" 'URL to signature file at pandasoftware.com
dim file: file = sigfile 'Signature File navn returned from fuction
dim outfol: outfol = "C:\PROGRA~1\MAILEN~1\avscan\panda\output" 'Output is saved here
dim workfol: workfol = "C:\PROGRA~1\MAILEN~1\avscan\panda\work" 'Temporary folder
dim logfol: logfol = "C:\PROGRA~1\MAILEN~1\avscan\panda\log" 'Logfile is saved here
dim tempfile: tempfile = "temp.txt" 'Temporary file for text messages from wget and zip
dim logfile: logfile = "pandaupdate.log" 'Name of log file
dim zfile: zfile = "sig.zip" 'Name of zip file, downloaded from pandasoftware.com
'Compile command for wget to fetch the signature file
dim wCmd: wCmd = "%comspec% /c " & wget & " -o " & workfol & chr(92) & tempfile & " -O " & workfol & chr(92) & zfile & " " & "http://" & user & ":" & pass & "@" & url & "/" & file
'Compile command for wzunzip to unzip the file
dim zCmd: zCmd = "%comspec% /c " & zip & " " & options & " " & workfol & chr(92) & zfile & " " & outfol & " 1>" &workfol & chr(92) & tempfile
'*****************************************************************
'Housekeeping of temporaray folders
Set FSO = CreateObject("Scripting.FileSystemObject")
if not FSO.FolderExists(outfol) then
wscript.echo "true: " & outfol
FSO.CreateFolder(outfol & chr(92))
end if
if FSO.FolderExists(workfol) then
FSO.DeleteFolder(workfol)
FSO.CreateFolder(workfol)
else
FSO.CreateFolder(workfol)
end if
if FSO.FolderExists(logfol) then
FSO.DeleteFolder(logfol)
FSO.CreateFolder(logfol)
else
FSO.CreateFolder(logfol)
end if
'*****************************************************************
'Make log file, write standard message
Set TextStream = FSO.CreateTextFile(logfol & chr(92) & logfile)
TextStream.WriteLine("Update of Panda Virus Signature file")
TextStream.WriteLine("Date (Last executed): " & now)
TextStream.WriteBlankLines(1)
TextStream.WriteLine("Using WGET to download signature file:")
TextStream.WriteBlankLines(1)
'*****************************************************************
'Execute wget command
TextStream.WriteLine("Transcript of WGET progress follows:")
Set Shell = CreateObject("WScript.Shell")
shell.run wCmd,0,true
temp = readfile(workfol & chr(92) & tempfile)
if IsArray(temp) then
TextStream.WriteBlankLines(1)
for each line in temp
TextStream.WriteLine(line)
next
TextStream.WriteBlankLines(1)
if FSO.FileExists(workfol & chr(92) & tempfile) then
FSO.DeleteFile(workfol & chr(92) & tempfile)
end if
else
TextStream.WriteLine("WGET returned no output.")
end if
temp = empty
'*****************************************************************
'Check if wget was a succes, else stop here
if FSO.FileExists(workfol & chr(92) & zfile) then
Shell.Run zCmd, 0, true
temp = readfile(workfol & chr(92) & tempfile)
if IsArray(temp) then
TextStream.WriteLine("Transcript of WZUNZIP progress follows:")
for each line in temp
TextStream.WriteLine(line)
next
if FSO.FileExists(workfol & chr(92) & tempfile) then
FSO.DeleteFile(workfol & chr(92) & tempfile)
end if
if FSO.FolderExists(outfol) then
TextStream.WriteLine("The following files exist in output folder:")
Set f = FSO.GetFolder(outfol)
Set fc = f.Files
i = 0
For Each f1 in fc
TextStream.WriteLine(f1.name & vbCrLf)
i = i + 1
Next
if i = 0 then
TextStream.WriteLine("No files, sorry...")
end if
else
TextStream.WriteLine("Fatal, output folder is missing! (" & outfol & ")")
end if
else
TextStream.WriteLine("WZUNZIP returned no output.")
end if
else
TextStream.WriteLine("Signature file was not downloaded, please check WGET progress report.")
end if
TextStream.WriteLine(" --- END OF FILE --- ")
TextStream.Close
Set Shell = Nothing
Set FSO = Nothing
--------------- script --------------
I call it from this cmd file:
------------ cmd file --------------
@echo off
c:\winnt\system32\cscript.exe //nologo update.vbs
net stop memtas
move /Y c:\progra~1\mailen~1\avscan\panda\output\pav.sig c:\progra~1\mailen~1\avscan\panda
net start memtas
------------- cmd file -------------
Im stopping the memtas (Mail Transport Agent) service, to avoid something odd happening if the mta calls pavcl while the signaturefile isnt avaliable/being updates. Its probably not nessesary when a move command is being used, i dont know, better safe then sorry!
Here is my much simpler batch script which works from a scheduled task and does not require anyone logged in to the console or remote desktop.
You need 3 utilities for this project.
wget - http://xoomer.virgilio.it/hherold/
DateSet - http://powerusers.info/modules.php?op=m ... load&cid=1
7zip - http://www.7-zip.org/
If you want an email notice after the update, use blat - http://www.blat.net - to send you an email after the update.
Here is the batch file script...
(The wget line wraps above but make sure it is on one line in your batch script.)
You need 3 utilities for this project.
wget - http://xoomer.virgilio.it/hherold/
DateSet - http://powerusers.info/modules.php?op=m ... load&cid=1
7zip - http://www.7-zip.org/
If you want an email notice after the update, use blat - http://www.blat.net - to send you an email after the update.
Here is the batch file script...
Code: Select all
dateset
call mydate.bat
wget --http-user=username --http-passwd=password http://updates.pandasoftware.com:8003/software/basevirus/pav%MONTH%%DAY%.zip
c:\7-zip\7z e pav%MONTH%%DAY%.zip -oC:\Panda\Pavcl32 -y
Alert Serv | Managed Windows Servers, Incident Support
Including Support for Mail Enable & Helm - http://www.AlertServ.com
------------------------------------------------------
Authorized Helm Reseller
Including Support for Mail Enable & Helm - http://www.AlertServ.com
------------------------------------------------------
Authorized Helm Reseller
This code should really look like this. You will need to modify the directoires to reflect your install:
I just tested it and it works perfectly!
Code: Select all
c:\dateset\dateset.exe
call c:\mydate.bat
c:\wget\wget.exe --http-user=****** --http-passwd=****** http://updates.pandasoftware.com:8003/software/basevirus/pav%MONTH%%DAY%.zip
c:\7-zip\7z e pav%MONTH%%DAY%.zip -oC:\Panda\Pavcl32 -y
Last edited by Big_Eye on Wed May 12, 2004 7:55 pm, edited 1 time in total.