As long as you use an "in memory"clamwin distribution the scanning speed is extremely fast. We currently use the following build
http://hideout.ath.cx/clamav/I then have freshclam.exe scheduled to update it every 30minutes in Task Scheduler
Also use ApptoService (by Basta Computing) to run clamd as a system service.....could use any similar app to service utility.
("C:\WINNT\AppToService.exe" /sys "c:\clamav\clamd.exe" /Directory:"c:\clamav")
To actually call it from Ability I use a custom purebasic program....could just use a batch file too. Mine checks that the clam daemon is responding and emails if there is a problem.....also keeps a copy of the virus emails.
You might want to tune the clamd.conf file to suit your requirements as well.
This is the source code for the program that we use to call clam from Ability.
- Code: Select all
Enumeration
#body
#blat
EndEnumeration
file$=ProgramParameter()
program=RunProgram("c:\clamav\clamdscan.exe",file$,"C:\clamav",#PB_Program_Open|#PB_Program_Hide)
WaitProgram(program)
clam=ProgramExitCode(program)
If clam=1
slash=CountString(file$,"\")
out$=StringField(file$,slash+1,"\")
CopyFile(file$,"c:\virusstore\"+out$)
End 1
EndIf
If clam>1
StartTime = ElapsedMilliseconds()
While clam>1
program=RunProgram("c:\clamav\clamdscan.exe","c:\clamav\clamdscan.exe","C:\clamav",#PB_Program_Open|#PB_Program_Hide)
WaitProgram(program)
clam=ProgramExitCode(program)
If ElapsedMilliseconds()-StartTime > 120000 And emailclam=0
Result= OpenLibrary(#Blat, "blat.dll")
OpenFile(#body,GetTemporaryDirectory()+"\clam.txt")
WriteString(#body," ")
CloseFile(#body)
blat$=Chr(34)+GetTemporaryDirectory()+"\clam.txt"+Chr(34)+" -To user@domain.com -subject "+Chr(34)+"CLAM Scanner ERROR"+Chr(34)+ " -server yourmailserver -port 25 -f user@domain.com -try 2"
CallFunction(#Blat, "Send" ,blat$)
DeleteFile(GetTemporaryDirectory()+"\clam.txt")
CloseLibrary(#Blat)
emailclam=1
EndIf
Wend
EndIf
End 0
; IDE Options = PureBasic v4.02 (Windows - x86)
; ExecutableFormat = Console
; CursorPosition = 3
; Folding = -
; Executable = localclam.exe