Do not store the same malware several times

this decreases disk space consumption

+ also log sha sum
This commit is contained in:
Katarina Durechova
2014-11-05 16:59:40 +01:00
parent 9bce85cbe9
commit 637e813151
4 changed files with 58 additions and 4 deletions

View File

@@ -146,4 +146,9 @@ class DBLogger(dblog.DBLogger):
' VALUES (%s, FROM_UNIXTIME(%s), %s, %s)',
(session, self.nowUnix(), args['url'], args['outfile']))
def handleShaSum(self, session, args):
self.simpleQuery('UPDATE `downloads` SET `shasum` = %s' + \
' WHERE `outfile` = %s',
(args['shasum'], args['outfile']))
# vim: set sw=4 et: