コード例 #1
0
ファイル: index.py プロジェクト: natan04/cve-search
 def listExport(self, force=None, path=None):
   _list = request.url_rule.rule.split('/')[2]
   bytIO = BytesIO()
   data = wl.exportWhitelist() if _list.lower == 'whitelist' else bl.exportBlacklist()
   bytIO.write(bytes(data, "utf-8"))
   bytIO.seek(0)
   return send_file(bytIO, as_attachment=True, attachment_filename=_list+".txt")
コード例 #2
0
ファイル: index.py プロジェクト: adulau/cve-search
 def listExport(self, force=None, path=None):
   _list = request.url_rule.rule.split('/')[2]
   bytIO = BytesIO()
   data = wl.exportWhitelist() if _list.lower == 'whitelist' else bl.exportBlacklist()
   bytIO.write(bytes(data, "utf-8"))
   bytIO.seek(0)
   return send_file(bytIO, as_attachment=True, attachment_filename=_list+".txt")
コード例 #3
0
ファイル: views.py プロジェクト: skibidipakpak/cve-search
def listExport():
    _list = request.url_rule.rule.split("/")[2]
    if _list.lower() == "whitelist":
        data = exportWhitelist()
    else:
        data = exportBlacklist()
    bytIO = BytesIO()
    bytIO.write(bytes(data, "utf-8"))
    bytIO.seek(0)
    return send_file(bytIO, as_attachment=True, attachment_filename=_list + ".txt")