mirror of https://github.com/MISP/misp-modules
fix: Making pep8 happy with indentation
parent
8ffb7029ba
commit
422f654988
|
@ -154,19 +154,19 @@ def handler(q=False):
|
|||
return {'error': 'Missing configuration'}
|
||||
|
||||
config_object = {
|
||||
'clientid': request["config"].get("clientid"),
|
||||
'clientsecret': request["config"].get("clientsecret"),
|
||||
'scope': 'orion.api',
|
||||
'password': request["config"].get("password"),
|
||||
'username': request["config"].get("username"),
|
||||
'grant_type': 'password',
|
||||
'token_url': request["config"].get("token_url"),
|
||||
'endpoint_fileinformation': '{api_url}{endpoint}'.format(api_url=request["config"].get("api_url"), endpoint='/forensics/md5/{md5}/info'),
|
||||
'endpoint_machines': '{api_url}{endpoint}'.format(api_url=request["config"].get("api_url"), endpoint='/forensics/md5/{md5}/muids'),
|
||||
'endpoint_machines_client': '{api_url}{endpoint}'.format(api_url=request["config"].get("api_url"), endpoint='/forensics/muid/{muid}/info'),
|
||||
'query_machines': True,
|
||||
'query_machine_info': True
|
||||
}
|
||||
'clientid': request["config"].get("clientid"),
|
||||
'clientsecret': request["config"].get("clientsecret"),
|
||||
'scope': 'orion.api',
|
||||
'password': request["config"].get("password"),
|
||||
'username': request["config"].get("username"),
|
||||
'grant_type': 'password',
|
||||
'token_url': request["config"].get("token_url"),
|
||||
'endpoint_fileinformation': '{api_url}{endpoint}'.format(api_url=request["config"].get("api_url"), endpoint='/forensics/md5/{md5}/info'),
|
||||
'endpoint_machines': '{api_url}{endpoint}'.format(api_url=request["config"].get("api_url"), endpoint='/forensics/md5/{md5}/muids'),
|
||||
'endpoint_machines_client': '{api_url}{endpoint}'.format(api_url=request["config"].get("api_url"), endpoint='/forensics/muid/{muid}/info'),
|
||||
'query_machines': True,
|
||||
'query_machine_info': True
|
||||
}
|
||||
|
||||
cytomic_parser = CytomicParser(attribute, config_object)
|
||||
cytomic_parser.parse(attribute['value'])
|
||||
|
|
|
@ -257,10 +257,10 @@ def handler(q=False):
|
|||
request = json.loads(q)
|
||||
if request.get('data'):
|
||||
try:
|
||||
data = base64.b64decode(request['data']).decode('utf-8')
|
||||
data = base64.b64decode(request['data']).decode('utf-8')
|
||||
except UnicodeDecodeError:
|
||||
misperrors['error'] = "Input is not valid UTF-8"
|
||||
return misperrors
|
||||
misperrors['error'] = "Input is not valid UTF-8"
|
||||
return misperrors
|
||||
else:
|
||||
misperrors['error'] = "Unsupported attributes type"
|
||||
return misperrors
|
||||
|
|
Loading…
Reference in New Issue