Fix getting filenames in analyzers (#140)

This commit is contained in:
Antoine 2017-12-13 13:33:07 +01:00 committed by Nabil Adouani
parent f6d836c5f5
commit 1c4d3ec591
3 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ class FileAnalyzer(Analyzer):
def __init__(self):
Analyzer.__init__(self)
self.filename = self.getParam('attachment.name', 'noname.ext')
self.filename = self.getParam('filename', 'noname.ext')
self.filepath = self.getParam('file', None, 'File is missing')

View File

@ -13,7 +13,7 @@ class MsgParserAnalyzer(Analyzer):
def __init__(self):
Analyzer.__init__(self)
self.filename = self.getParam('attachment.name', 'noname.ext')
self.filename = self.getParam('filename', 'noname.ext')
self.filepath = self.getParam('file', None, 'File is missing')
def summary(self, raw):

View File

@ -138,7 +138,7 @@ class VirusTotalAnalyzer(Analyzer):
if self.service == 'scan':
if self.data_type == 'file':
filename = self.getParam('attachment.name', 'noname.ext')
filename = self.getParam('filename', 'noname.ext')
filepath = self.getParam('file', None, 'File is missing')
self.read_scan_response(self.vt.scan_file(
(filename, open(filepath, 'rb'))), self.wait_file_report)