From 65982fde1d694b7c7c704d47c611701aa62cc692 Mon Sep 17 00:00:00 2001 From: passwa11 <112363374+passwa11@users.noreply.github.com> Date: Wed, 22 Feb 2023 11:23:21 +0800 Subject: [PATCH] Update Re2Pcap.py fix TypeError: send_file() got an unexpected keyword argument 'attachment_filename' from https://github.com/Cisco-Talos/Re2Pcap/pull/8 and https://github.com/pallets/flask/issues/4753 --- Re2Pcap/Re2Pcap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Re2Pcap/Re2Pcap.py b/Re2Pcap/Re2Pcap.py index 27233a3..125fb97 100755 --- a/Re2Pcap/Re2Pcap.py +++ b/Re2Pcap/Re2Pcap.py @@ -133,7 +133,7 @@ def createPcap(): time.sleep(5) childProc.communicate() if not childProc.returncode: - return send_file('io/Re2Pcap-result.pcap', as_attachment=True, attachment_filename=resultFileName) + return send_file('io/Re2Pcap-result.pcap', as_attachment=True, download_name=resultFileName) else: return jsonify(error='Something went Wrong :( Please Check the Input/ Error log and Try Again ....') else: