本文整理汇总了Python中cortexutils.analyzer.Analyzer.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Analyzer.__init__方法的具体用法?Python Analyzer.__init__怎么用?Python Analyzer.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cortexutils.analyzer.Analyzer
的用法示例。
在下文中一共展示了Analyzer.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param(
'config.service', None, 'Service parameter is missing')
self.key = self.get_param('config.key', None, 'Missing API key')
self.pwd = self.get_param('config.pwd', None, 'Missing API password')
self.request_handler = APIRequestHandler(self.key, self.pwd)
示例2: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param(
"config.service", None, "SecurityTrails service is missing")
self.api_key = self.get_param(
"config.api_key", None, "SecurityTrails API key is missing")
示例3: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.basic_url = 'https://www.hybrid-analysis.com/api/'
self.headers = {'User-Agent': 'VxStream'}
self.secret = self.get_param('config.secret', None, 'VxStream Sandbox secret key is missing')
self.api_key = self.get_param('config.key', None, 'VxStream Sandbox API key is missing')
示例4: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
# Fixes #94. Instead of None, the string Unnamed should be passed to MISPClient constructor
name = self.get_param('config.name', None)
if not name or len(name) == 0:
name = 'Unnamed'
if self.get_param('config.cert_check', True):
ssl_path = self.get_param('config.cert_path', None)
if not ssl_path or ssl_path == '':
ssl = True
else:
ssl = ssl_path
else:
ssl = False
try:
self.misp = MISPClient(url=self.get_param('config.url', None, 'No MISP url given.'),
key=self.get_param('config.key', None, 'No MISP api key given.'),
ssl=ssl,
name=name,
proxies={'http': self.http_proxy, 'https': self.https_proxy})
except MISPClientError as e:
self.error(str(e))
except TypeError as te:
self.error(str(te))
示例5: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param('config.service', None, 'Service parameter is missing')
self.api_key = self.get_param('config.api_key', None, 'api_key is missing')
self.api_secret = self.get_param('config.api_secret', None, 'api_secret is missing')
self.organization_id = self.get_param('config.organization_id', None, 'organization_id is missing')
self.query_limit = str(self.get_param('config.query_limit', None, 20))
示例6: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.filepath = self.get_param('file', None, 'File parameter is missing.')
self.filename = self.get_param('filename', None, 'Filename is missing.')
self.filetype = pyexifinfo.fileType(self.filepath)
self.mimetype = magic.Magic(mime=True).from_file(self.filepath)
# Check if manalyze submodule is enabled
if self.get_param('config.manalyze_enable', False, 'Parameter manalyze_enable not given.'
'Please enable or disable manalyze submodule explicitly.'):
binary_path = self.get_param('config.manalyze_binary_path',
'/opt/Cortex-Analyzers/utils/manalyze/bin/manalyze')
if self.get_param('config.manalyze_enable_docker', False):
available_submodules.append(
ManalyzeSubmodule(
use_docker=True
)
)
elif self.get_param('config.manalyze_enable_binary', False) \
and os.path.isfile(binary_path):
available_submodules.append(
ManalyzeSubmodule(
use_binary=True,
binary_path=binary_path
)
)
else:
self.error('Manalyze submodule is enabled, but either there is no method allowed (docker or binary)'
'or the path to binary is not correct.')
示例7: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param('config.service', None, 'Service parameter is missing')
self.virustotal_key = self.get_param('config.key', None, 'Missing VirusTotal API key')
self.polling_interval = self.get_param('config.polling_interval', 60)
self.proxies = self.get_param('config.proxy', None)
self.vt = VirusTotalPublicApi(self.virustotal_key, self.proxies)
示例8: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param(
'config.service', None, 'Service parameter is missing')
self.url = self.get_param('config.url', None, 'Missing API url')
self.key = self.get_param('config.key', None, 'Missing API key')
self.pwd = self.get_param('config.pwd', None, 'Missing API password')
示例9: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.data = self.get_data()
self.path = self.get_param('config.path', 'misp-warninglists')
if not exists(self.path):
self.error('Path to misp-warninglists does not exist.')
self.warninglists = self.readwarninglists()
示例10: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param(
'config.service', None, 'Service parameter is missing')
self.dnsdb_server = self.get_param(
'config.server', None, 'Missing DNSDB server name')
self.dnsdb_key = self.get_param(
'config.key', None, 'Missing DNSDB API key')
示例11: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
#filename of the observable
self.filename = self.getParam('attachment.name', 'noname.ext')
#filepath to the observable, looks like /tmp/cortex-4224850437865873235-datafile
self.filepath = self.getParam('file', None, 'File is missing')
示例12: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.getParam('config.service', None,
'Cymon service is missing')
self.key = self.getParam('config.key', None,
'Cymon API key is missing')
self.con = CymonEngine(self.key)
示例13: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param('config.service', None, 'Service parameter is missing')
if self.service == "status":
self.url = 'https://api.hashdd.com/'
elif self.service == "detail":
self.hashdd_key = self.get_param('config.api_key', None, 'Missing hashdd API key')
self.url = 'https://api.hashdd.com/detail'
示例14: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.url = 'https://pulsedive.com/api/'
self.key = self.get_param('config.key', None, 'API-Key not given.')
self.mapping = {
'high': 'malicious',
'medium': 'suspicious',
'low': 'info'
}
示例15: __init__
# 需要导入模块: from cortexutils.analyzer import Analyzer [as 别名]
# 或者: from cortexutils.analyzer.Analyzer import __init__ [as 别名]
def __init__(self):
Analyzer.__init__(self)
self.service = self.get_param('config.service', None, 'JoeSandbox service is missing')
self.url = self.get_param('config.url', None, 'JoeSandbox url is missing')
if self.get_param('config.key'):
self.apikey = self.get_param('config.key')
else:
self.apikey = self.get_param('config.apikey', None, 'JoeSandbox API key is missing')
self.analysistimeout = self.get_param('config.analysistimeout', 30*60, None)
self.networktimeout = self.get_param('config.networktimeout', 30, None)