diff --git a/MifareOneTool/Form1.Designer.cs b/MifareOneTool/Form1.Designer.cs index 7b833ca..fa4bf86 100644 --- a/MifareOneTool/Form1.Designer.cs +++ b/MifareOneTool/Form1.Designer.cs @@ -49,9 +49,13 @@ this.buttonConSave = new System.Windows.Forms.Button(); this.buttonConClr = new System.Windows.Forms.Button(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.buttonGuide = new System.Windows.Forms.Button(); + this.buttonHexTool = new System.Windows.Forms.Button(); + this.buttonMfcuk = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); + this.groupBox4.SuspendLayout(); this.SuspendLayout(); // // groupBox1 @@ -117,7 +121,7 @@ this.richTextBox1.ReadOnly = true; this.richTextBox1.Size = new System.Drawing.Size(623, 293); this.richTextBox1.TabIndex = 1; - this.richTextBox1.Text = "Hello,cardman!\n"; + this.richTextBox1.Text = "Hello,cardman!\n建议点击\"检测\"以加快后续运行速度\n"; // // buttonMfRead // @@ -153,7 +157,7 @@ this.buttonBmfWrite.Name = "buttonBmfWrite"; this.buttonBmfWrite.Size = new System.Drawing.Size(75, 23); this.buttonBmfWrite.TabIndex = 10; - this.buttonBmfWrite.Text = "后门写"; + this.buttonBmfWrite.Text = "UID写"; this.buttonBmfWrite.UseVisualStyleBackColor = true; this.buttonBmfWrite.Click += new System.EventHandler(this.buttonBmfWrite_Click); // @@ -163,7 +167,7 @@ this.buttonBmfRead.Name = "buttonBmfRead"; this.buttonBmfRead.Size = new System.Drawing.Size(75, 23); this.buttonBmfRead.TabIndex = 9; - this.buttonBmfRead.Text = "后门读"; + this.buttonBmfRead.Text = "UID读"; this.buttonBmfRead.UseVisualStyleBackColor = true; this.buttonBmfRead.Click += new System.EventHandler(this.buttonBmfRead_Click); // @@ -271,6 +275,9 @@ // // groupBox4 // + this.groupBox4.Controls.Add(this.buttonMfcuk); + this.groupBox4.Controls.Add(this.buttonHexTool); + this.groupBox4.Controls.Add(this.buttonGuide); this.groupBox4.Location = new System.Drawing.Point(641, 101); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(169, 293); @@ -278,6 +285,36 @@ this.groupBox4.TabStop = false; this.groupBox4.Text = "工具"; // + // buttonGuide + // + this.buttonGuide.Enabled = false; + this.buttonGuide.Location = new System.Drawing.Point(6, 24); + this.buttonGuide.Name = "buttonGuide"; + this.buttonGuide.Size = new System.Drawing.Size(156, 45); + this.buttonGuide.TabIndex = 0; + this.buttonGuide.Text = "向导模式"; + this.buttonGuide.UseVisualStyleBackColor = true; + this.buttonGuide.Click += new System.EventHandler(this.buttonGuide_Click); + // + // buttonHexTool + // + this.buttonHexTool.Location = new System.Drawing.Point(6, 75); + this.buttonHexTool.Name = "buttonHexTool"; + this.buttonHexTool.Size = new System.Drawing.Size(156, 45); + this.buttonHexTool.TabIndex = 1; + this.buttonHexTool.Text = "Hex工具"; + this.buttonHexTool.UseVisualStyleBackColor = true; + // + // buttonMfcuk + // + this.buttonMfcuk.Font = new System.Drawing.Font("宋体", 8.5F); + this.buttonMfcuk.Location = new System.Drawing.Point(6, 126); + this.buttonMfcuk.Name = "buttonMfcuk"; + this.buttonMfcuk.Size = new System.Drawing.Size(156, 45); + this.buttonMfcuk.TabIndex = 3; + this.buttonMfcuk.Text = "全加密密钥恢复\r\nMFCUK"; + this.buttonMfcuk.UseVisualStyleBackColor = true; + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); @@ -297,6 +334,7 @@ this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); this.ResumeLayout(false); } @@ -324,6 +362,9 @@ private System.Windows.Forms.Button buttonKill; private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.Button buttonGuide; + private System.Windows.Forms.Button buttonHexTool; + private System.Windows.Forms.Button buttonMfcuk; } } diff --git a/MifareOneTool/Form1.cs b/MifareOneTool/Form1.cs index dff6d27..3075204 100644 --- a/MifareOneTool/Form1.cs +++ b/MifareOneTool/Form1.cs @@ -109,21 +109,7 @@ namespace MifareOneTool private void buttonMfRead_Click(object sender, EventArgs e) { if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Form1.ActiveForm.Text = "MifareOne Tool - 运行中"; - string rmfd = ""; - SaveFileDialog ofd = new SaveFileDialog(); - ofd.AddExtension = true; - ofd.DefaultExt = ".mfd"; - ofd.Title = "请选择MFD文件保存位置及文件名"; - ofd.OverwritePrompt = true; - ofd.Filter = "MFD文件|*.mfd"; - if (ofd.ShowDialog() == DialogResult.OK) - { - rmfd = ofd.FileName; - } - else - { - return; - } + string rmfd = "MfRead.tmp"; string kt = "a"; string nn = ""; switch (MessageBox.Show("使用KeyA(是)或KeyB(否),还是不使用(用于全新白卡)(取消)?", "KeyA/B/N", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information)) @@ -141,6 +127,23 @@ namespace MifareOneTool bgw.WorkerReportsProgress = true; bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt); bgw.RunWorkerAsync(new string[] { rmfd, kt,nn }); + + SaveFileDialog ofd = new SaveFileDialog(); + ofd.AddExtension = true; + ofd.DefaultExt = ".mfd"; + ofd.Title = "请选择MFD文件保存位置及文件名"; + ofd.OverwritePrompt = true; + ofd.Filter = "MFD文件|*.mfd"; + if (ofd.ShowDialog() == DialogResult.OK) + { + File.Move(rmfd, ofd.FileName); + logAppend("##已保存-" + ofd.FileName + "##"); + } + else + { + File.Delete(rmfd); + logAppend("##未保存##"); + } } void mf_read(object sender, DoWorkEventArgs e) @@ -264,7 +267,13 @@ namespace MifareOneTool private void buttonMfoc_Click(object sender, EventArgs e) { if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Form1.ActiveForm.Text = "MifareOne Tool - 运行中"; - string rmfd = ""; + string rmfd = "Mfoc.tmp"; + + BackgroundWorker bgw = new BackgroundWorker(); + bgw.DoWork += new DoWorkEventHandler(mfoc); + bgw.WorkerReportsProgress = true; + bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt); + bgw.RunWorkerAsync(rmfd); SaveFileDialog ofd = new SaveFileDialog(); ofd.AddExtension = true; ofd.DefaultExt = ".mfd"; @@ -273,17 +282,14 @@ namespace MifareOneTool ofd.Title = "请选择破解MFD的保存位置及文件名"; if (ofd.ShowDialog() == DialogResult.OK) { - rmfd = ofd.FileName; + File.Move(rmfd,ofd.FileName); + logAppend("##已保存-" + ofd.FileName + "##"); } else { - return; + File.Delete(rmfd); + logAppend("##未保存##"); } - BackgroundWorker bgw = new BackgroundWorker(); - bgw.DoWork += new DoWorkEventHandler(mfoc); - bgw.WorkerReportsProgress = true; - bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt); - bgw.RunWorkerAsync(rmfd); } void mfoc(object sender, DoWorkEventArgs e) @@ -395,7 +401,13 @@ namespace MifareOneTool private void buttonBmfRead_Click(object sender, EventArgs e) { if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } Form1.ActiveForm.Text = "MifareOne Tool - 运行中"; - string rmfd = ""; + string rmfd = "BmfRead.tmp"; + + BackgroundWorker bgw = new BackgroundWorker(); + bgw.DoWork += new DoWorkEventHandler(bmf_read); + bgw.WorkerReportsProgress = true; + bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt); + bgw.RunWorkerAsync(new string[] { rmfd }); SaveFileDialog ofd = new SaveFileDialog(); ofd.AddExtension = true; ofd.DefaultExt = ".mfd"; @@ -404,17 +416,14 @@ namespace MifareOneTool ofd.Title = "请选择MFD文件的保存位置及文件名"; if (ofd.ShowDialog() == DialogResult.OK) { - rmfd = ofd.FileName; + File.Move(rmfd, ofd.FileName); + logAppend("##已保存-" + ofd.FileName + "##"); } else { - return; + File.Delete(rmfd); + logAppend("##未保存##"); } - BackgroundWorker bgw = new BackgroundWorker(); - bgw.DoWork += new DoWorkEventHandler(bmf_read); - bgw.WorkerReportsProgress = true; - bgw.ProgressChanged += new ProgressChangedEventHandler(default_rpt); - bgw.RunWorkerAsync(new string[] { rmfd }); } void bmf_read(object sender, DoWorkEventArgs e) @@ -561,5 +570,15 @@ namespace MifareOneTool { Process.Start("https://github.com/xcicode/MifareOneTool/releases/latest"); } + + private void buttonGuide_Click(object sender, EventArgs e) + { + if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } + Text = "MifareOne Tool - 向导模式运行中"; + FormGuide fg = new FormGuide(); + fg.ShowDialog(); + lprocess = false; + Text = "MifareOne Tool - 向导模式运行完毕"; + } } } diff --git a/MifareOneTool/FormGuide.Designer.cs b/MifareOneTool/FormGuide.Designer.cs new file mode 100644 index 0000000..20eebdf --- /dev/null +++ b/MifareOneTool/FormGuide.Designer.cs @@ -0,0 +1,130 @@ +namespace MifareOneTool +{ + partial class FormGuide + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.tabPage4 = new System.Windows.Forms.TabPage(); + this.tabPage5 = new System.Windows.Forms.TabPage(); + this.tabControl1.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.Appearance = System.Windows.Forms.TabAppearance.Buttons; + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Controls.Add(this.tabPage3); + this.tabControl1.Controls.Add(this.tabPage4); + this.tabControl1.Controls.Add(this.tabPage5); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Multiline = true; + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(482, 353); + this.tabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 28); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(474, 321); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "开始"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 28); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(474, 321); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "操作"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // tabPage3 + // + this.tabPage3.Location = new System.Drawing.Point(4, 28); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Size = new System.Drawing.Size(474, 321); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "需要提供的信息"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // tabPage4 + // + this.tabPage4.Location = new System.Drawing.Point(4, 28); + this.tabPage4.Name = "tabPage4"; + this.tabPage4.Size = new System.Drawing.Size(474, 321); + this.tabPage4.TabIndex = 3; + this.tabPage4.Text = "认证(密码)"; + this.tabPage4.UseVisualStyleBackColor = true; + // + // tabPage5 + // + this.tabPage5.Location = new System.Drawing.Point(4, 28); + this.tabPage5.Name = "tabPage5"; + this.tabPage5.Size = new System.Drawing.Size(474, 321); + this.tabPage5.TabIndex = 4; + this.tabPage5.Text = "开始工作"; + this.tabPage5.UseVisualStyleBackColor = true; + // + // FormGuide + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Control; + this.ClientSize = new System.Drawing.Size(482, 353); + this.ControlBox = false; + this.Controls.Add(this.tabControl1); + this.ForeColor = System.Drawing.SystemColors.ControlLightLight; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "FormGuide"; + this.Text = "MifareOne 向导模式"; + this.Load += new System.EventHandler(this.FormGuide_Load); + this.tabControl1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.TabPage tabPage4; + private System.Windows.Forms.TabPage tabPage5; + } +} \ No newline at end of file diff --git a/MifareOneTool/FormGuide.cs b/MifareOneTool/FormGuide.cs new file mode 100644 index 0000000..1522419 --- /dev/null +++ b/MifareOneTool/FormGuide.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace MifareOneTool +{ + public partial class FormGuide : Form + { + public FormGuide() + { + InitializeComponent(); + } + + private void FormGuide_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/MifareOneTool/FormGuide.resx b/MifareOneTool/FormGuide.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/MifareOneTool/FormGuide.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MifareOneTool/MifareOneTool.csproj b/MifareOneTool/MifareOneTool.csproj index cb2d208..d5ea249 100644 --- a/MifareOneTool/MifareOneTool.csproj +++ b/MifareOneTool/MifareOneTool.csproj @@ -72,12 +72,21 @@ Form1.cs + + Form + + + FormGuide.cs + Form1.cs + + FormGuide.cs + ResXFileCodeGenerator Resources.Designer.cs