Hi,
Hi,
I am using Clamv as antivirus program to check for any virus infected files.
The command to be executed for checking the files for virus
and the result returned by clamv is
if no virus is found the result returned is
I am using popen(), for "open pipe" this opens a shell and runs the above clamscan command however, it returns a FILE*,
now how can I parse the above results returned by clamscan to grab the name of the virus reported.
I would like to get suggestions of doing it in any other way also. I don't want to use the file redirection method as it entails a lot of overhead, I have to process a bunch of files at a time.
Thanks,
tewari.
Hi,
I am using Clamv as antivirus program to check for any virus infected files.
The command to be executed for checking the files for virus
Code:
/usr/bin/clamdscan --disable-summary --mbox --stdout /var/tmp/filename
Code:
/var/tmp/filename:Worm.Mydoom.M FOUND, if virus is found
Code:
/var/tmp/filename : ok
I am using popen(), for "open pipe" this opens a shell and runs the above clamscan command however, it returns a FILE*,
now how can I parse the above results returned by clamscan to grab the name of the virus reported.
I would like to get suggestions of doing it in any other way also. I don't want to use the file redirection method as it entails a lot of overhead, I have to process a bunch of files at a time.
Thanks,
tewari.