On 01/15/05 23:54, Phil Endecott wrote:
Dear Clam Experts,

I am contemplating adding clam scanning to a web application. Files that users upload via a web form will be scanned before being stored in a database. The application is written in C and called by CGI from Apache.

On first looking at the clam docs I thought that libclamav was what I wanted: just call cl_scanbuff on the data. But I then realised that this library actually does all the work itself, rather than communicating with the clam daemon. For this situation using a persistent backend daemon would be much more sensible.

I was hoping to find an equivalent library that talks to a clam daemon, but don't see one. I imagine that it would be possible to have something that had the same API as libclamav (for scanning at least) and so could "drop in".

Has anyone written such a thing? If not, maybe I'll have a go. I'm not very enthusiastic about writing the socket code but I could probably get something working. Or perhaps all I need to do is to turn clamdscan into a library.

Your comments / suggestions would be much appreciated.

Regards,

--Phil Endecott.


You can either run clamdscan or implement the clamd proto into your app.
The netcode needed is very minimal and pretty easy. Have a look at:
http://www.clamav.net/doc/0.80/html/node24.html
If you decide to link to libclamav you'd better go with cl_scandesc or cl_scanfile, instead of cl_scanbuff.
_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users

Reply via email to