|
I'm using the API to access ClamAV (through JNI,
yay!).
Anyways, I'm trying to scan email messages that are
passed
to ClamAV as a buffer (string). I was
wondering if this would
work or not. The API indicates that options
are passed to
the other API scan methods that allow the user to
specify
which types of files are being scanned (e.g.
CL_SCAN_MAIL).
This option is not available for the cl_scanbuff method and I
was wondering why not? I'm confident that I
am not understanding
something here and I am considering (but would not
prefer)
writing the buffers out to files and using the
files instead of the
buffer.
What is happening is when I test the clam.exe file
it is reported
to not contain a virus when in fact it does have
one. When I test
the file using the ex1 binary compiled in the
<clamavsrc>/example
directory, the clam.exe file is indicated to
contain the test virus.
Attached is a simple unit test that exemplefies
what I'm trying
to do. It can be compiled the same as
ex1.c:
"gcc -lclamav test.c -o test"
And run the same as ex1.c:
"./test <file>"
The output from my test is as follows:
test.o ../test/clam.exe
12 characters read MZP is the message Loaded 25253 signatures Return code: 0 Virus name : 134514609 Thanks for any insight on how I can use cl_scanbuff
in the way I'd
like to do it!
Regards,
--
Gregory "Gus" Class Develper, Spam Arrest LLC
http://gregoryclass.com |
test.c
Description: Binary data
_______________________________________________ http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
