I wrote some code last week to scan files against the ClamAV antivirus scanner using the clamd daemon. It's up now on Google Code under the Apache 2.0 license.
I wrote some code last week to scan files against the ClamAV antivirus scanner using the clamd daemon. It's up now on Google Code under the Apache 2.0 license.
4 Comments
Passing 0-size byte array to scan(byte[] in) fails. Easy to fix, though:
* now *
try {
read = in.read(buffer);
}
* should be *
try {
read = in.read(buffer);
if (read == -1) {
break;
}
}
thanks!
exactly what i was looking for :)
It seems to me that, when the socket times out (while reading the response back in method scan), ClamScan will end up thinking the file contains a virus (because the response, in that case, contains a blank string).
Thanks for posting this. These classes are extremely helpful!
Post a Comment