On 2011-04-16 17:06, Nathan Gibbs wrote:
> * aCaB wrote:
>>
>> FYI you can use callbacks, in particular clcb_post_scan.
>> See clamav.h for details.
>>
>> -aCaB
>>
>>
> 
> Alas, my c-fu is not adequate.
> :-(
> 
> What did you just say!
> LOL :-)
> 
> I'm guessing that clcb_post_scan can be used to ambush the virus name soon
> after it escapes from libclamav.

It allows you to get a callback for every file we scan (including
archive members), and see the result of the scan and virusname.
You should be able to implement your custom virusaction() using that,
and you can transform the virusname any way you like for the custom
virusaction.

> I don't see it being used in the higher level programs, so there is no example
> to learn from.

It is used here, but in a more complicated way than you need:
http://git.clamav.net/gitweb?p=clamav-devel.git;a=blob;f=win32/clamav-for-windows/clamav-for-windows/interface.c

Best regards,
--Edwin
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to