PyMISP/pymisp/tools/sbsignatureobject.py

22 lines
736 B
Python
Raw Normal View History

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .abstractgenerator import AbstractMISPObjectGenerator
2018-01-23 11:07:36 +01:00
class SBSignatureObject(AbstractMISPObjectGenerator):
'''
Sandbox Analyzer
'''
def __init__(self, software: str, report: list, **kwargs):
super(SBSignatureObject, self).__init__("sb-signature", **kwargs)
self._software = software
2018-01-23 11:07:36 +01:00
self._report = report
self.generate_attributes()
def generate_attributes(self):
''' Parse the report for relevant attributes '''
2018-01-23 11:07:36 +01:00
self.add_attribute("software", value=self._software)
for (signature_name, description) in self._report:
self.add_attribute("signature", value=signature_name, comment=description)