Mailing List Archive

Libclamav - filetype detection functionality
Hello,

I need to detect the type of a given file (so that in my own scanner, which
uses ClamAV's signature set, I can cross-reference it with any signature
that matches).

However, if I'm not mistaken, such functionality is not currently exposed
in libclamav.

Is there any way to access it besides directly modifying libclamav (and
thus losing the access on any update to ClamAV) ?

Thanks.

-Alexandre Dias
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: Libclamav - filetype detection functionality [ In reply to ]
On Tue, Sep 11, 2012 at 9:47 AM, Alexandre Dias <lexx.pt@gmail.com> wrote:

> Hello,
>
> I need to detect the type of a given file (so that in my own scanner, which
> uses ClamAV's signature set, I can cross-reference it with any signature
> that matches).
>
> However, if I'm not mistaken, such functionality is not currently exposed
> in libclamav.
>
> Is there any way to access it besides directly modifying libclamav (and
> thus losing the access on any update to ClamAV) ?
>
> Thanks.
>
> -Alexandre Dias
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>

Alexandre,

Short answer: There is no function that will take a file and return
ClamAV's filetype decision.

All the filetyping functions are all marked internal and expect access to
ClamAV's memory objects. There are ways to use them without modifying
libclamav, but they would all have varying levels of hacks involved. I
don't know which path would be best for you to take, but I wish you luck.

Dave R.

--
---
Dave Raynor
Sourcefire Vulnerability Research Team
draynor@sourcefire.com
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net