mirror of https://github.com/MISP/misp-modules
fix: Pep8 related fixes.
parent
7a7b7b109f
commit
454c9e0f43
|
@ -81,15 +81,16 @@ def apicall(indicator_type, indicator, key=False):
|
|||
redata = []
|
||||
# print(jsondata)
|
||||
if jsondata is not None:
|
||||
if indicator_type is "hash":
|
||||
if indicator_type == "hash":
|
||||
if "malware" in jsondata:
|
||||
lopointer = jsondata["malware"]
|
||||
redata.append({"type": "text", "values": lopointer["risk"]})
|
||||
if indicator_type is "dns":
|
||||
if indicator_type == "dns":
|
||||
if "records" in str(jsondata):
|
||||
lopointer = jsondata["Passive"]["records"]
|
||||
for dataset in lopointer:
|
||||
redata.append({"type": "domain", "values": dataset["value"]})
|
||||
redata.append(
|
||||
{"type": "domain", "values": dataset["value"]})
|
||||
|
||||
return redata
|
||||
|
||||
|
|
|
@ -152,7 +152,8 @@ def handler(q=False):
|
|||
command_line = 'asciidoctor-pdf -'
|
||||
args = shlex.split(command_line)
|
||||
with subprocess.Popen(args, stdout=subprocess.PIPE, stdin=subprocess.PIPE) as process:
|
||||
cmd_out, cmd_err = process.communicate(input=report.report.encode('utf-8'))
|
||||
cmd_out, cmd_err = process.communicate(
|
||||
input=report.report.encode('utf-8'))
|
||||
return {'response': [], 'data': str(base64.b64encode(cmd_out), 'utf-8')}
|
||||
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ def process_analysis_json(analysis_json):
|
|||
for stored_created_file in process['stored_files']['stored_created_file']:
|
||||
stored_created_file['@filename'] = cleanup_filepath(stored_created_file['@filename'])
|
||||
if stored_created_file['@filename']:
|
||||
if stored_created_file['@filesize'] is not '0':
|
||||
if stored_created_file['@filesize'] != '0':
|
||||
val = '{}|{}'.format(stored_created_file['@filename'], stored_created_file['@md5'])
|
||||
# print("stored_created_file filename|md5: {}|{} IDS:yes".format(
|
||||
# stored_created_file['@filename'], # filename
|
||||
|
@ -346,7 +346,7 @@ def process_analysis_json(analysis_json):
|
|||
for stored_modified_file in process['stored_files']['stored_modified_file']:
|
||||
stored_modified_file['@filename'] = cleanup_filepath(stored_modified_file['@filename'])
|
||||
if stored_modified_file['@filename']:
|
||||
if stored_modified_file['@filesize'] is not '0':
|
||||
if stored_modified_file['@filesize'] != '0':
|
||||
val = '{}|{}'.format(stored_modified_file['@filename'], stored_modified_file['@md5'])
|
||||
# print("stored_modified_file MODIFY FILE: {}\t{}".format(
|
||||
# stored_modified_file['@filename'], # filename
|
||||
|
|
Loading…
Reference in New Issue