Browse Source

remove DecryptPwdUtil

liuyuqi-dellpc 7 months ago
parent
commit
3a52665551

+ 2 - 0
C#/DecryptPwd/Program.cs

@@ -16,6 +16,8 @@ namespace DecryptPwd
             {
                 System.Console.WriteLine("Usage: DecryptPwd.exe -4624");
                 System.Console.WriteLine("       DecryptPwd.exe -4625");
+                System.Console.ReadKey();
+                return;
             }
             if (args[0] == "-NavicatCrypto")
             {

+ 7 - 1
C#/DecryptPwdGUI/DecryptPwdGUI.csproj

@@ -55,7 +55,6 @@
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Utils\DecryptPwdUtil.cs" />
     <EmbeddedResource Include="Pages\frmMain.resx">
       <DependentUpon>frmMain.cs</DependentUpon>
     </EmbeddedResource>
@@ -83,6 +82,13 @@
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Service\" />
+    <Folder Include="Utils\" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\DecryptPwd\DecryptPwd.csproj">
+      <Project>{039f2ff6-703e-4a27-9745-b68ba17dc578}</Project>
+      <Name>DecryptPwd</Name>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 59 - 20
C#/DecryptPwdGUI/Pages/frmMain.Designer.cs

@@ -36,9 +36,12 @@ namespace DecryptPwdGUI
             this.label5 = new System.Windows.Forms.Label();
             this.plLeftMenu = new System.Windows.Forms.Panel();
             this.plContent = new System.Windows.Forms.Panel();
-            this.button1 = new System.Windows.Forms.Button();
-            this.plTopMenu = new System.Windows.Forms.Panel();
+            this.label7 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.cmbAppList = new System.Windows.Forms.ComboBox();
             this.tbResult = new System.Windows.Forms.TextBox();
+            this.btnDecrypt = new System.Windows.Forms.Button();
+            this.plTopMenu = new System.Windows.Forms.Panel();
             this.plLeftMenu.SuspendLayout();
             this.plContent.SuspendLayout();
             this.SuspendLayout();
@@ -103,41 +106,73 @@ namespace DecryptPwdGUI
             // 
             // plContent
             // 
+            this.plContent.Controls.Add(this.label7);
+            this.plContent.Controls.Add(this.label6);
+            this.plContent.Controls.Add(this.cmbAppList);
             this.plContent.Controls.Add(this.tbResult);
-            this.plContent.Controls.Add(this.button1);
+            this.plContent.Controls.Add(this.btnDecrypt);
             this.plContent.Dock = System.Windows.Forms.DockStyle.Fill;
             this.plContent.Location = new System.Drawing.Point(190, 0);
             this.plContent.Name = "plContent";
             this.plContent.Size = new System.Drawing.Size(621, 469);
             this.plContent.TabIndex = 6;
             // 
-            // button1
+            // label7
             // 
-            this.button1.Location = new System.Drawing.Point(182, 390);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(205, 32);
-            this.button1.TabIndex = 0;
-            this.button1.Text = "确定";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(37, 59);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(41, 12);
+            this.label7.TabIndex = 6;
+            this.label7.Text = "软件:";
             // 
-            // plTopMenu
+            // label6
             // 
-            this.plTopMenu.Dock = System.Windows.Forms.DockStyle.Top;
-            this.plTopMenu.Location = new System.Drawing.Point(190, 0);
-            this.plTopMenu.Name = "plTopMenu";
-            this.plTopMenu.Size = new System.Drawing.Size(621, 45);
-            this.plTopMenu.TabIndex = 0;
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(37, 159);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(65, 12);
+            this.label6.TabIndex = 5;
+            this.label6.Text = "解密结果:";
+            // 
+            // cmbAppList
+            // 
+            this.cmbAppList.DropDownWidth = 567;
+            this.cmbAppList.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.cmbAppList.Font = new System.Drawing.Font("SimSun", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cmbAppList.FormattingEnabled = true;
+            this.cmbAppList.Location = new System.Drawing.Point(30, 76);
+            this.cmbAppList.Name = "cmbAppList";
+            this.cmbAppList.Size = new System.Drawing.Size(567, 27);
+            this.cmbAppList.TabIndex = 2;
             // 
             // tbResult
             // 
             this.tbResult.BorderStyle = System.Windows.Forms.BorderStyle.None;
-            this.tbResult.Location = new System.Drawing.Point(30, 68);
+            this.tbResult.Location = new System.Drawing.Point(30, 177);
             this.tbResult.Multiline = true;
             this.tbResult.Name = "tbResult";
-            this.tbResult.Size = new System.Drawing.Size(567, 274);
+            this.tbResult.Size = new System.Drawing.Size(567, 253);
             this.tbResult.TabIndex = 1;
             // 
+            // btnDecrypt
+            // 
+            this.btnDecrypt.Location = new System.Drawing.Point(181, 117);
+            this.btnDecrypt.Name = "btnDecrypt";
+            this.btnDecrypt.Size = new System.Drawing.Size(205, 32);
+            this.btnDecrypt.TabIndex = 0;
+            this.btnDecrypt.Text = "解密";
+            this.btnDecrypt.UseVisualStyleBackColor = true;
+            this.btnDecrypt.Click += new System.EventHandler(this.btnDecrypt_Click);
+            // 
+            // plTopMenu
+            // 
+            this.plTopMenu.Dock = System.Windows.Forms.DockStyle.Top;
+            this.plTopMenu.Location = new System.Drawing.Point(190, 0);
+            this.plTopMenu.Name = "plTopMenu";
+            this.plTopMenu.Size = new System.Drawing.Size(621, 45);
+            this.plTopMenu.TabIndex = 0;
+            // 
             // frmMain
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -149,6 +184,7 @@ namespace DecryptPwdGUI
             this.Name = "frmMain";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "开发密码获取工具";
+            this.Load += new System.EventHandler(this.frmMain_Load);
             this.plLeftMenu.ResumeLayout(false);
             this.plLeftMenu.PerformLayout();
             this.plContent.ResumeLayout(false);
@@ -167,8 +203,11 @@ namespace DecryptPwdGUI
         private System.Windows.Forms.Panel plLeftMenu;
         private System.Windows.Forms.Panel plContent;
         private System.Windows.Forms.Panel plTopMenu;
-        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button btnDecrypt;
         private System.Windows.Forms.TextBox tbResult;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.ComboBox cmbAppList;
     }
 }
 

+ 41 - 8
C#/DecryptPwdGUI/Pages/frmMain.cs

@@ -1,25 +1,58 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Forms;
+using DecryptPwd.Utils;
 
 namespace DecryptPwdGUI
 {
     public partial class frmMain : Form
     {
+        string[] AppList = { "NavicatCrypto", "TeamViewer", "FileZilla", "WinSCP", "Xmangager", "LoginEvent", "Foxmail" };
         public frmMain()
         {
             InitializeComponent();
         }
 
-        private void button1_Click(object sender, EventArgs e)
+        private void btnDecrypt_Click(object sender, EventArgs e)
         {
+            string appItem = cmbAppList.SelectedItem.ToString();
+            if (appItem == AppList[0])
+            {
+                tbResult.Text = Filezilla.Decrypt();
+            }
+            else if (appItem == AppList[1])
+            {
+                tbResult.Text = Utils.DecryptPwdUtil.TeamViewerDecry();
+            }
+            else if (appItem == AppList[2])
+            {
+                tbResult.Text = Utils.DecryptPwdUtil.FileZillaDecry();
+            }
+            else if (appItem == AppList[3])
+            {
+                tbResult.Text = Utils.DecryptPwdUtil.WinSCPDecry();
+            }
+            else if (appItem == AppList[4])
+            {
+                tbResult.Text = Utils.DecryptPwdUtil.XmangagerDecry();
+            }
+            else if (appItem == AppList[5])
+            {
+                tbResult.Text = Utils.DecryptPwdUtil.LoginEventDecry();
 
+            }
+            else if (appItem == AppList[6])
+            {
+                tbResult.Text = Utils.DecryptPwdUtil.FoxmailDecry();
+            }
+        }
+
+        private void frmMain_Load(object sender, EventArgs e)
+        {
+            foreach (string app in AppList)
+            {
+                cmbAppList.Items.Add(app);
+            }
+            cmbAppList.SelectedIndex = 0;
         }
     }
 }

+ 0 - 32
C#/DecryptPwdGUI/Utils/DecryptPwdUtil.cs

@@ -1,32 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DecryptPwdGUI.Utils
-{
-    class DecryptPwdUtil
-    {
-        public static NavicateDecry(){
-
-        }
-
-        public static TeamViewerDecry(){
-
-        }
-
-        public static FileZillaDecry(){
-
-        }
-
-        public static WinSCPDecry(){
-
-        }
-
-        public static XmangagerDecry(){
-
-        }
-
-    }
-}