pyClamAV 0.3.3 review

Download
by rbytes.net on

pyClamAV program is a python binding to libclamav written in C

License: GPL (GNU General Public License)
File size: 12K
Developer: Alexandre Norman
0 stars award from rbytes.net

pyClamAV program is a python binding to libclamav written in C. By using pyClamAV, you can add virus detection capabilities to your python software in an efficient and easy way.

Intallation:

You need to have clamav and libclamav installed with clamav.h header file. You also need to have python installed.

The simplest way to compile this package is:

- Run 'python setup.py build'
- As root run 'python setup.py install'

It should be done.

Usage:

From python :

Python 2.3.3 (#1, Mar 21 2004, 00:29:15)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyclamav
>>> ret=pyclamav.scanfile('/tmp/virus')
>>> print ret
(1, 'Worm.Sober.G')
>>> ret=pyclamav.scanthis("Buffer to test blalblabla...")
>>> print ret
(0, '')
>>> print pyclamav.get_numsig()
34861
>>> print pyclamav.get_version()
('0.86.1', 898, 1117257063)
>>> print pyclamav.version()
0.3.0
>>> print pyclamav.scanfile('/tmp') # /tmp is a directory
Traceback (most recent call last):
File "", line 1, in ?
ValueError: Argument is not a filename

What's New in This Release:
A Python exception was added for when an error occurs with the virus database.
The /usr/local/lib path was added to setup to avoid stupid compilation path errors with libclamav not found.

pyClamAV 0.3.3 keywords