mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-06 09:05:19 +00:00
Fix getting filenames in analyzers (#140)
This commit is contained in:
parent
f6d836c5f5
commit
1c4d3ec591
@ -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')
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user