MailEnable & Panda CommandLine

Discussions on webmail and the Professional version.
Guest

MailEnable & Panda CommandLine

Post by Guest »

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

MrByte
Posts: 663
Joined: Tue Nov 11, 2003 5:33 pm
Location: Florida, USA

Post by MrByte »

I guess NO one uses this product???? :shock:

Guest

Post by Guest »

check out alertserv.com
and prowinhosting.com

they use this as well as they support installation

labsy
Posts: 148
Joined: Sun Nov 16, 2003 6:49 am
Location: Slovenia

Post by labsy »

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.

MrByte
Posts: 663
Joined: Tue Nov 11, 2003 5:33 pm
Location: Florida, USA

Post by MrByte »

Labsy,

you mention you got PandaCL. Don't you have the automatic signature updates working?

I am still waiting on a response from Panda on this.....

Thanks,
-MrByte

MrByte
Posts: 663
Joined: Tue Nov 11, 2003 5:33 pm
Location: Florida, USA

Post by MrByte »

**** bump ***
.MrByte

Guest

Post by Guest »

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.

techcall
Posts: 77
Joined: Tue Apr 08, 2003 3:56 am

Post by techcall »

Care to share the script? I'm certain many would find it very helpful.

Also, please note that any attachments that come in while the sig file is loading will be treated as a virus.

MrByte
Posts: 663
Joined: Tue Nov 11, 2003 5:33 pm
Location: Florida, USA

Post by MrByte »

... 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 :D

Thanks,
.MrByte

Kiliman
Posts: 279
Joined: Mon Feb 03, 2003 2:44 pm
Location: Chesapeake, VA

Post by Kiliman »

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

MrByte
Posts: 663
Joined: Tue Nov 11, 2003 5:33 pm
Location: Florida, USA

Post by MrByte »

Great!!!! Thanks.
Will give it a try and see how it goes.
.MrByte

MrByte
Posts: 663
Joined: Tue Nov 11, 2003 5:33 pm
Location: Florida, USA

Post by MrByte »

Well Kiliman, with your link and the one from Guest of the URL, I got it working beautifully.
I'm refining a VBScript program that will do the download, etc.
I will share it when done.

Thanks!
.MrByte

Guest

Post by Guest »

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!

AlertServ
Posts: 30
Joined: Fri Oct 03, 2003 1:36 am
Contact:

Post by AlertServ »

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...

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
(The wget line wraps above but make sure it is on one line in your batch script.)
Alert Serv | Managed Windows Servers, Incident Support
Including Support for Mail Enable & Helm - http://www.AlertServ.com
------------------------------------------------------
Authorized Helm Reseller

Big_Eye
Posts: 108
Joined: Tue Feb 04, 2003 5:15 pm
Location: Houston, TX

Post by Big_Eye »

This code should really look like this. You will need to modify the directoires to reflect your install:

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 
I just tested it and it works perfectly!
Last edited by Big_Eye on Wed May 12, 2004 7:55 pm, edited 1 time in total.

Post Reply