Jafo,
For some reason I couldn't get the f-prot version of your mod to work - it just returns 126 regardless of what I'm scanning. I've tested on the command line, and f-prot itself is working fine, it recognizes eicar no problems.
So I took the liberty of changing your module to use the clamav API (phpclamavlib). It works fine. One nice feature of the clamav API is that the call returns the name of the virus it found, which I'm printing out in the error message.
Would you be interested in folding my changes into your module, and making it configurable between f-prot and clamav? If not, would you have any objections to me submitting a separate mod (something like vbClamBake!) with suitable props to you for the original coding?
I don't mind either way. The only issue I see is providing the instructions and support for people to get clamav and the API installed, which can be a little tricky. You may not want to open that can of worms.
I suppose I could use the clam command line instead, but this wouldn't tell us which virus was found. But it would mean the API wouldn't have to be installed, which is the biggest issue. Maybe it could be a three way choice - f-prot, clamav API or clamav command line.
Let me know what you think. I'm not trying to hijack your code here, I just much prefer clamav, and this seemed like the easiest way to give myself clamav scanning of uploads!
-- hugh
|