From 6450033999c8fc7a1d0547099b814d133f7ec23e Mon Sep 17 00:00:00 2001 From: malaohu Date: Sat, 27 Mar 2021 15:04:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E5=88=B0=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=20=E5=87=BA=E7=8E=B0=E6=9D=83=E9=99=90?= =?UTF-8?q?=E9=94=99=E8=AF=AF=20=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index bd6c86f..1e28f29 100644 --- a/app.py +++ b/app.py @@ -96,7 +96,7 @@ def GenerateLicense(Type : LicenseType, Count : int, UserName : str, MajorVersio 0, # No Games flag. 0 means "NoGames = false". But it does not work. 0) # No Plugins flag. 0 means "NoPlugins = false". But it does not work. EncodedLicenseString = VariantBase64Encode(EncryptBytes(0x787, LicenseString.encode())).decode() - with zipfile.ZipFile('/tmp/' + EncodedLicenseString, 'w') as f: + with zipfile.ZipFile(EncodedLicenseString, 'w') as f: f.writestr('Pro.key', data = EncodedLicenseString) return EncodedLicenseString @@ -115,11 +115,11 @@ def get_lc(): @app.route('/download/') def download_lc(lc): if lc and len(lc) > 5 and os.path.exists('./' + lc): - return send_file('/tmp/' + lc, + return send_file(lc, as_attachment=True, attachment_filename='Custom.mxtpro') else: - return "请确保生成成功后再来下载!" + return "请确保生成成功后再来下载!检查用户名版本号是否正确!" @app.route('/') @@ -129,4 +129,4 @@ def get(): if __name__ == '__main__': - app.run(host='0.0.0.0', port=5000, debug=False) + app.run(host='0.0.0.0', port=5000, debug=True)