analyzer.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:Cortex-Analyzers 作者: CERT-BDF 项目源码 文件源码
def __init__(self):
        self.__set_encoding()

        # Prepare in/out/err streams
        self.fperror = sys.stderr
        self.fpinput = sys.stdin
        self.fpoutput = sys.stdout

        # Load input
        self.__input = json.load(self.fpinput)

        # Set parameters
        self.data_type = self.get_param('dataType', None, 'Missing dataType field')
        self.tlp = self.get_param('tlp', 2)

        self.enable_check_tlp = self.get_param('config.check_tlp', False)
        self.max_tlp = self.get_param('config.max_tlp', 2)

        # Set proxy configuration if available
        self.http_proxy = self.get_param('config.proxy.http')
        self.https_proxy = self.get_param('config.proxy.https')

        self.__set_proxies()

        # Finally run check tlp
        if not (self.__check_tlp()):
            self.error('TLP is higher than allowed.')

        # Not breaking compatibility
        self.artifact = self.__input

        # Check for auto extraction config
        self.auto_extract = self.get_param('config.auto_extract', True)

    # Not breaking compatibility
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号