Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

virusscan.py: add ISO8601 signature date

  • Loading branch information...
commit 14c11d040bd3dfc8432d2a8d93fc7a78a27d45b9 1 parent 2cbf33f
Mx A. Matienzo authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 python/virusscan.py
6 python/virusscan.py
@@ -7,6 +7,7 @@
7 7 import sys
8 8 from optparse import OptionParser
9 9 from pyclamd import pyclamd
  10 +import dateutil.parser
10 11
11 12 def virusscan(fn, method='socket', socket='/tmp/clamd.socket'):
12 13 out = {}
@@ -14,7 +15,10 @@ def virusscan(fn, method='socket', socket='/tmp/clamd.socket'):
14 15 raise NotImplementedError
15 16 else:
16 17 clam = pyclamd.ClamdUnixSocket(filename=socket)
17   - out['virusScannerVersion'], out['virusScannerSignatureVersion'], out['virusScannerSignatureDate'] = clam.version().split('/')
  18 + vers = clam.version().split('/')
  19 + out['virusScannerVersion'] = vers[0]
  20 + out['virusScannerSignatureVersion'] = vers[1]
  21 + out['virusScannerSignatureDate'] = dateutil.parser.parse(vers[2]).strftime("%Y-%m-%dT%H:%M:%S")
18 22 vscan = clam.scan_file(fn)
19 23 if vscan is None:
20 24 out['virusFound'] = 'false'

0 comments on commit 14c11d0

Please sign in to comment.
Something went wrong with that request. Please try again.