Mailing List Archive

Re: [clamav-users] How to get each file status when scan a ditrtectory using clamdscan
Hi,

I would you like to get each file status call back in *Clamdscan output*
while perfrom scan over a dirtectory using *clamdscan*. but i able to get
a file status call back *(OR | ERROR| FOUND)* in *Clamdscan output* when
i perfrom scan over a *single file.*


@Steve Basford

Thanks for reply. but it won't work to get each file status call back
in *Clamdscan
Output. *when perform scan over a dirtectory(ies).i already tried that. By
enabling *LogClean*, we can print the each file status in *Clamd.log *not
in *Clamdscan output.*

I think we need to slight code changes in ClamAV Code Base

@CamAV Dev Team

Please could anyone from ClamAV Dev team would help me on this

*case -1*

*Admin-11s-MacBook-Air:~ sagampa$ /usr/local/clamav/bin/clamdscan
/Users/sagampa/Desktop/n1905.pdf *

*/Users/sagampa/Desktop/n1905.pdf: OK*


*----------- SCAN SUMMARY -----------*

*Infected files: 0*

*Time: 3.892 sec (0 m 3 s)*

*Admin-11s-MacBook-Air:~ sagampa$ *


*case -2*

*Admin-11s-MacBook-Air:~ sagampa$ ls -alh /Users/sagampa/Desktop/sample *

*total 15224*

*drwxr-xr-x 5 sagampa staff 170B Oct 4 18:34 .*

*drwx------@ 34 sagampa staff 1.1K Oct 4 18:34 ..*

*-rw-r--r-- 1 sagampa staff 5.5M Sep 28 18:53 lib.zip*

*-rw-r--r--@ 1 sagampa staff 67K Aug 30 14:01 libltldl.zip*

*-rw-r--r--@ 1 sagampa staff 1.9M Jul 14 18:57 pcre2-10.21.tar.gz*

*Admin-11s-MacBook-Air:~ sagampa$ *


*Admin-11s-MacBook-Air:~ sagampa$ /usr/local/clamav/bin/clamdscan
/Users/sagampa/Desktop/sample *

*/Users/sagampa/Desktop/sample: OK*


*----------- SCAN SUMMARY -----------*

*Infected files: 0*

*Time: 5.581 sec (0 m 5 s)*

*Admin-11s-MacBook-Air:~ sagampa$*






On 4 October 2016 at 15:21, Steve Basford <steveb_clamav@sanesecurity.com>
wrote:

>
> On Mon, October 3, 2016 6:05 pm, crazy thinker wrote:
> > Hi,
> >
> >
> > when i scanned a dirtectory using clamdscan, i could get only error and
> > virus file infected files status in output.but i would like to see each
> > file status(including "OK" status also ) when i perform scan over sinle
> > dirtectory / multiple dirtectories
> >
>
> > how does it can be achived? could anyone please help me in this...
>
> clamd.conf...
>
> # Log time with each message.
> # Default: no
> LogTime yes
>
> # Also log clean files. Useful in debugging but drastically increases the
> # log size.
> # Default: no
> LogClean yes
>
> --
> Cheers,
>
> Steve
> Twitter: @sanesecurity
>
> _______________________________________________
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml
>
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

http://www.clamav.net/contact.html#ml
Re: [clamav-users] How to get each file status when scan a ditrtectory using clamdscan [ In reply to ]
@Haywood

I know that Clamd uses Multiscan mode when we perform scan over dirtectory
to do Parallel scanning using available threads.. but In the case of you
suggested command we only able to send the file one by one to Clamd
server through clamdscan request.so we can't able to take the advantage of
multi-threading.so it increases overall scanning time





On 4 October 2016 at 23:02, crazy thinker <crazythinker91@gmail.com> wrote:

> @Haywood
>
> Thanks for reply..i checked this command. it's working fine..but I am
> planning to code changes in code base to achieve each call back file status
> when perform a scan over dirtectory that conatins multiple
> subdirtectories.. could you please help me on this ..i think you have good
> understanding on clamav internals
>
> On 4 October 2016 at 22:44, G.W. Haywood <clamav@jubileegroup.co.uk>
> wrote:
>
>> Hi there,
>>
>> On Tue, 4 Oct 2016, crazy thinker wrote:
>>
>> when i scanned a dirtectory using clamdscan, i could get only error and
>>> virus file infected files status in output.but i would like to see each
>>> file status(including "OK" status also ) when i perform scan over sinle
>>> dirtectory / multiple dirtectories
>>>
>>> how does it can be achived? could anyone please help me in this...
>>>
>>
>> /usr/bin/find /path/to/files -type f -name '*' | /usr/bin/xargs -I '{}'
>> /path/to/clamdscan '{}'
>>
>> --
>>
>> 73,
>> Ged.
>>
>> _______________________________________________
>> Help us build a comprehensive ClamAV guide:
>> https://github.com/vrtadmin/clamav-faq
>>
>> http://www.clamav.net/contact.html#ml
>>
>
>
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

http://www.clamav.net/contact.html#ml
Re: [clamav-users] How to get each file status when scan a ditrtectory using clamdscan [ In reply to ]
@All

In MultiScan Mode,i would like to get each file staus call back from clamd
server but currently clamdscan gets callback from clamd when a file is
either infected or error one. clamdscan runs faster than clamscan..so i
would like to improve performance in full system scan

i am reading source code and started to do code changes to achieve this.
but i am missing some logic and getting dififculty to get call back for
each file from clamd server

@ClamAV Dev Team

Could someone from Development Team help me to implement this feature


On 6 October 2016 at 03:32, Paul Kosinski <clamav-users@iment.com> wrote:

> Some years ago, before ClamAv had an option to follow symlinks when
> recursing, I modified the source code to add an option to do that. It
> was not too much work to do it once, but it got tedious to roll the
> modifications forward and recompile with every new version, as I like
> to keep up, even ahead of the distro (which forced a recompile in any
> case).
>
> This was not a big deal, but having private mods is basically forking.
> I was very happy when ClamAV added the option and spared me future work.
>
> P.S. In the past, with some experimental software at IBM Research, quite
> extensive code changes were needed, and it was almost impossible to
> keep up. So, being able to modify the source code is *necessary*, but
> not *sufficient* to make things behave the way you want, depending on
> the effort needed, the resources available, and the number of target
> users (only me, in that example).
>
>
>
> On Wed, 5 Oct 2016 01:07:49 -0700
> Dennis Peterson <dennispe@inetnw.com> wrote:
>
> > You have access to the source code. Make it do what you want that it
> > does not already do.
> >
> > dp
> >
> > On 10/3/16 10:05 AM, crazy thinker wrote:
> > > Hi,
> > >
> > > when i scanned a dirtectory using clamdscan, i could get only
> > > error and virus file infected files status in output.but i would
> > > like to see each file status(including "OK" status also ) when i
> > > perform scan over sinle dirtectory / multiple dirtectories
> > >
> > > how does it can be achived? could anyone please help me in this...
> > >
> > >
> > > Thanks,
> > > crazy thinker
>
> >
> _______________________________________________
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml
>
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

http://www.clamav.net/contact.html#ml