Skip to content

Commit

Permalink
#212 clean summary for submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Jun 5, 2018
1 parent 428b31d commit f4d3948
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
1 change: 0 additions & 1 deletion analyzers/FileInfo/fileinfo_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def run(self):
'summary': module_summaries
})


self.report({'results': results})


Expand Down
4 changes: 2 additions & 2 deletions analyzers/FileInfo/submodules/submodule_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class SubmoduleBaseclass(object):
def __init__(self):
self.name = 'This is where the module name should go.'
self.results = []
self.summary = []
self.summary = {'taxonomies': []}

def get_name(self):
"""
Expand Down Expand Up @@ -64,7 +64,7 @@ def module_summary(self):
:return:
:rtype: dict
"""
pass
return self.summary

def add_result_subsection(self, subsection_header, results):
"""
Expand Down
3 changes: 2 additions & 1 deletion analyzers/FileInfo/submodules/submodule_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ def module_summary(self):
taxonomies.append(t)
else:
pass
return {'taxonomies': taxonomies}

self.summary['taxonomies'] = taxonomies
return self.summary

def analyze_file(self, path):
# Hash the file
Expand Down
10 changes: 5 additions & 5 deletions analyzers/FileInfo/submodules/submodule_oletools.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def analyze_file(self, path):

return self.results



def module_summary(self):
taxonomies = []
level = 'info'
Expand Down Expand Up @@ -76,9 +74,11 @@ def module_summary(self):
level = 'suspicious'
taxonomies.append(self.build_taxonomy(level, namespace, predicate, 'URL found'))

return {'taxonomies': taxonomies,
'Olevba': olevba_version,
'Msodde': msodde_version}
self.summary['taxonomies'] = taxonomies
self.summary['Olevba'] = olevba_version
self.summary['Msodde'] = msodde_version

return self.summary

def analyze_vba(self, path):
"""Analyze a given sample for malicious vba."""
Expand Down
5 changes: 3 additions & 2 deletions analyzers/FileInfo/submodules/submodule_pdfid.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def module_summary(self):
level = 'suspicious'
taxonomies.append(self.build_taxonomy(level, namespace, predicate, keyword['name']))

return {'taxonomies': taxonomies,
'pdfid': pdfid_version}
self.summary['taxonomies'] = taxonomies
self.summary['pdfid'] = pdfid_version
return self.summary

def pdfid_cmd(self, path):
try:
Expand Down
3 changes: 2 additions & 1 deletion analyzers/FileInfo/submodules/submodule_pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def pe_sections(pe):


def module_summary(self):
return {'pefile': pefile_version}
self.summary['pefile'] = pefile_version
return self.summary

def analyze_file(self, path):
try:
Expand Down

0 comments on commit f4d3948

Please sign in to comment.