mirror of https://github.com/MISP/misp-modules
Merge pull request #470 from adammchugh/patch-1
Update assemblyline_submit.py - Add verify SSL optionpull/473/head
commit
882e17ae09
|
@ -11,7 +11,7 @@ mispattributes = {'input': ['link'], 'format': 'misp_standard'}
|
|||
moduleinfo = {'version': '1', 'author': 'Christian Studer',
|
||||
'description': 'Query AssemblyLine with a report URL to get the parsed data.',
|
||||
'module-type': ['expansion']}
|
||||
moduleconfig = ["apiurl", "user_id", "apikey", "password"]
|
||||
moduleconfig = ["apiurl", "user_id", "apikey", "password", "verifyssl"]
|
||||
|
||||
|
||||
class AssemblyLineParser():
|
||||
|
@ -125,7 +125,7 @@ def parse_config(apiurl, user_id, config):
|
|||
error = {"error": "Please provide your AssemblyLine API key or Password."}
|
||||
if config.get('apikey'):
|
||||
try:
|
||||
return Client(apiurl, apikey=(user_id, config['apikey']))
|
||||
return Client(apiurl, apikey=(user_id, config['apikey']), verify=config['verifyssl'])
|
||||
except ClientError as e:
|
||||
error['error'] = f'Error while initiating a connection with AssemblyLine: {e.__str__()}'
|
||||
if config.get('password'):
|
||||
|
|
|
@ -7,7 +7,7 @@ from urllib.parse import urljoin
|
|||
|
||||
moduleinfo = {"version": 1, "author": "Christian Studer", "module-type": ["expansion"],
|
||||
"description": "Submit files or URLs to AssemblyLine"}
|
||||
moduleconfig = ["apiurl", "user_id", "apikey", "password"]
|
||||
moduleconfig = ["apiurl", "user_id", "apikey", "password", "verifyssl"]
|
||||
mispattributes = {"input": ["attachment", "malware-sample", "url"],
|
||||
"output": ["link"]}
|
||||
|
||||
|
@ -16,12 +16,12 @@ def parse_config(apiurl, user_id, config):
|
|||
error = {"error": "Please provide your AssemblyLine API key or Password."}
|
||||
if config.get('apikey'):
|
||||
try:
|
||||
return Client(apiurl, apikey=(user_id, config['apikey']))
|
||||
return Client(apiurl, apikey=(user_id, config['apikey']), verify=config['verifyssl'])
|
||||
except ClientError as e:
|
||||
error['error'] = f'Error while initiating a connection with AssemblyLine: {e.__str__()}'
|
||||
if config.get('password'):
|
||||
try:
|
||||
return Client(apiurl, auth=(user_id, config['password']))
|
||||
return Client(apiurl, auth=(user_id, config['password']), verify=config['verifyssl'])
|
||||
except ClientError as e:
|
||||
error['error'] = f'Error while initiating a connection with AssemblyLine: {e.__str__()}'
|
||||
return error
|
||||
|
|
Loading…
Reference in New Issue