|
1 |
| -clamd |
2 |
| -===== |
3 |
| - |
4 |
| -.. image:: https://travis-ci.org/graingert/python-clamd.png?branch=master |
5 |
| - :alt: travis build status |
6 |
| - :target: https://travis-ci.org/graingert/python-clamd |
7 |
| - |
8 |
| -About |
9 |
| ------ |
10 |
| -`clamd` is a portable Python module to use the ClamAV anti-virus engine on |
11 |
| -Windows, Linux, MacOSX and other platforms. It requires a running instance of |
12 |
| -the `clamd` daemon. |
13 |
| - |
14 |
| -This is a fork of pyClamd v0.2.0 created by Philippe Lagadec and published on his website: http://www.decalage.info/en/python/pyclamd which in turn is a slightly improved version of pyClamd v0.1.1 created by Alexandre Norman and published on his website: http://xael.org/norman/python/pyclamd/ |
15 |
| - |
16 |
| -License |
17 |
| -------- |
18 |
| -`clamd` is released as open-source software under the LGPL license. |
19 |
| - |
20 |
| -clamd Install |
21 |
| -------------- |
22 |
| -How to install the ClamAV daemon `clamd` under Ubuntu:: |
23 |
| - |
24 |
| - sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs |
25 |
| - sudo freshclam |
26 |
| - sudo service clamav-daemon start |
| 1 | +clamd |
| 2 | +===== |
| 3 | + |
| 4 | +.. image:: https://travis-ci.org/graingert/python-clamd.png?branch=master |
| 5 | + :alt: travis build status |
| 6 | + :target: https://travis-ci.org/graingert/python-clamd |
| 7 | + |
| 8 | +About |
| 9 | +----- |
| 10 | +`clamd` is a portable Python module to use the ClamAV anti-virus engine on |
| 11 | +Windows, Linux, MacOSX and other platforms. It requires a running instance of |
| 12 | +the `clamd` daemon. |
| 13 | + |
| 14 | +This is a fork of pyClamd v0.2.0 created by Philippe Lagadec and published on his website: http://www.decalage.info/en/python/pyclamd which in turn is a slightly improved version of pyClamd v0.1.1 created by Alexandre Norman and published on his website: http://xael.org/norman/python/pyclamd/ |
| 15 | + |
| 16 | +Usage |
| 17 | +----- |
| 18 | + |
| 19 | +To use with a unix socket:: |
| 20 | + |
| 21 | + >>> import clamd |
| 22 | + >>> cd = clamd.ClamdUnixSocket() |
| 23 | + >>> cd.ping() |
| 24 | + u'PONG' |
| 25 | + >>> cd.version() # doctest: +ELLIPSIS |
| 26 | + u'ClamAV ... |
| 27 | + >>> cd.reload() |
| 28 | + u'RELOADING' |
| 29 | + |
| 30 | +To scan a file:: |
| 31 | + |
| 32 | + >>> open('/tmp/EICAR','wb').write(clamd.EICAR) |
| 33 | + >>> cd.scan('/tmp/EICAR') |
| 34 | + {u'/tmp/EICAR': (u'FOUND', u'Eicar-Test-Signature')} |
| 35 | + |
| 36 | +To scan a stream:: |
| 37 | + |
| 38 | + >>> from six import BytesIO |
| 39 | + >>> cd.instream(BytesIO(clamd.EICAR)) |
| 40 | + {u'stream': (u'FOUND', u'Eicar-Test-Signature')} |
| 41 | + |
| 42 | + |
| 43 | +License |
| 44 | +------- |
| 45 | +`clamd` is released as open-source software under the LGPL license. |
| 46 | + |
| 47 | +clamd Install |
| 48 | +------------- |
| 49 | +How to install the ClamAV daemon `clamd` under Ubuntu:: |
| 50 | + |
| 51 | + sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs |
| 52 | + sudo freshclam |
| 53 | + sudo service clamav-daemon start |
0 commit comments