def html_report(content):
html = ""
html_tar = ""
html_err = ""
for item in content:
if item.name == "script":
json_decode = json.loads(item.content)
html += "<label class=\"label\">Script</label> {} <pre>{}</pre>".format(escape(json_decode['filename']), escape(base64.b64decode(json_decode['code']).decode('utf-8')))
elif item.name == "tar":
archive_name = os.path.basename(item.content)
html_tar += "<label class=\"label\">Exctact files : </label> <a href=\"/file?path={}\">{}</a><br />".format(item.content, archive_name)
else:
html_err += "LAMA PARSE ERROR"
html = "<div>{}{}{}</div>".format(html_tar, html, html_err)
return html
评论列表
文章目录