Fixed logging of downloads to database

Downloads were not logging to the database due to an incorrect number of parameters passed to VALUES
This commit is contained in:
Kc57
2015-12-31 07:35:40 -05:00
parent 6cd1ef3867
commit 0548e4e8e3

View File

@@ -146,7 +146,7 @@ class Output(cowrie.core.output.Output):
elif entry["eventid"] == 'COW0007':
self.simpleQuery('INSERT INTO `downloads`' + \
' (`session`, `timestamp`, `url`, `outfile`, `shasum`)' + \
' VALUES (%s, STR_TO_DATE(%s, %s), %s, %s)',
' VALUES (%s, STR_TO_DATE(%s, %s), %s, %s, %s)',
(entry["session"], entry["timestamp"], '%Y-%m-%dT%H:%i:%s.%fZ',
entry['url'], entry['outfile'], entry['shasum']))