#!/usr/bin/python ''' Example program for sagator's libclamav module. Usage: ./example.py file_to_scan ''' import sys import libclamav # make an scanning object av=libclamav.clamav() # set clamav's options av.setlimits({'maxratio':200}) # load virus database av.reload() # or #av.statinidir() #av.loaddbdir() # scan these files for filename in sys.argv[1:]: print "%s: %s" % (filename,av.scanfile(filename)) print "Scanned by ClamAV %s %d" % (av.retver(),av.retflevel())