diff --git a/MifareOneTool/ClassMifareS50.cs b/MifareOneTool/ClassMifareS50.cs
new file mode 100644
index 0000000..f3e7c0d
--- /dev/null
+++ b/MifareOneTool/ClassMifareS50.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace MifareOneTool
+{
+ class S50Sector
+ {
+ private byte[,] _sector = new byte[4, 16];
+ public byte[,] Sector
+ {
+ get { return _sector; }
+ set { _sector = value; }
+ }
+ private bool _isSector0 = false;
+ public void Wipe()
+ {
+ if (_isSector0)
+ {
+ this._sector = new byte[4, 16]{
+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0x07,0x80,0x69,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
+ };
+ }
+ else
+ {
+ this._sector = new byte[4, 16]{
+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+ {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0x07,0x80,0x69,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
+ };
+ }
+ }
+ public S50Sector(bool sector0 = false)
+ {
+ this._isSector0 = sector0;
+ }
+ }
+ class S50
+ {
+
+ }
+}
diff --git a/MifareOneTool/Form1.Designer.cs b/MifareOneTool/Form1.Designer.cs
index a783892..ba5fa81 100644
--- a/MifareOneTool/Form1.Designer.cs
+++ b/MifareOneTool/Form1.Designer.cs
@@ -54,6 +54,7 @@
this.buttonHexTool = new System.Windows.Forms.Button();
this.buttonTool1 = new System.Windows.Forms.Button();
this.toolTipHelp = new System.Windows.Forms.ToolTip(this.components);
+ this.buttonSuperCard = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -278,6 +279,7 @@
//
// groupBox4
//
+ this.groupBox4.Controls.Add(this.buttonSuperCard);
this.groupBox4.Controls.Add(this.buttonMfcuk);
this.groupBox4.Controls.Add(this.buttonHexTool);
this.groupBox4.Controls.Add(this.buttonTool1);
@@ -327,6 +329,16 @@
this.toolTipHelp.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.toolTipHelp.ToolTipTitle = "提示";
//
+ // buttonSuperCard
+ //
+ this.buttonSuperCard.Location = new System.Drawing.Point(6, 177);
+ this.buttonSuperCard.Name = "buttonSuperCard";
+ this.buttonSuperCard.Size = new System.Drawing.Size(156, 45);
+ this.buttonSuperCard.TabIndex = 4;
+ this.buttonSuperCard.Text = "超级卡工具";
+ this.buttonSuperCard.UseVisualStyleBackColor = true;
+ this.buttonSuperCard.Click += new System.EventHandler(this.buttonSuperCard_Click);
+ //
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -378,6 +390,7 @@
private System.Windows.Forms.Button buttonHexTool;
private System.Windows.Forms.Button buttonMfcuk;
private System.Windows.Forms.ToolTip toolTipHelp;
+ private System.Windows.Forms.Button buttonSuperCard;
}
}
diff --git a/MifareOneTool/Form1.cs b/MifareOneTool/Form1.cs
index 482a1f5..40e534e 100644
--- a/MifareOneTool/Form1.cs
+++ b/MifareOneTool/Form1.cs
@@ -52,6 +52,9 @@ namespace MifareOneTool
ofd.Filter = "MFD文件|*.mfd";
if (ofd.ShowDialog() == DialogResult.OK)
{
+ if(File.Exists(ofd.FileName)){
+ File.Delete(ofd.FileName);
+ }
File.Move(omfd, ofd.FileName);
logAppend("##已保存-" + ofd.FileName + "##");
}
@@ -602,24 +605,25 @@ Text = "MifareOne Tool - 运行完毕";
void Mfcuk(object sender, DoWorkEventArgs e)
{
- if (lprocess) { return; }
- ProcessStartInfo psi = new ProcessStartInfo("nfc-bin/mfcuk.exe");
- psi.Arguments = "-v 4 -C -R -1";
- psi.CreateNoWindow = true;
- psi.UseShellExecute = false;
- psi.RedirectStandardOutput = true;
- psi.RedirectStandardError = true;
+ if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
+ ProcessStartInfo psi = new ProcessStartInfo("cmd");
+ psi.Arguments = "/k mfcuk.exe -v 4 -C -R -1";
+ psi.WorkingDirectory = "nfc-bin";
lprocess = true;
BackgroundWorker b = (BackgroundWorker)sender;
- process = Process.Start(psi);
- process.OutputDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
- process.ErrorDataReceived += (s, _e) => b.ReportProgress(0, _e.Data);
- //StreamReader stderr = process.StandardError;
- process.BeginOutputReadLine();
- process.BeginErrorReadLine();
+ process=Process.Start(psi);
process.WaitForExit();
lprocess = false;
b.ReportProgress(100, "##运行完毕##");
}
+
+ private void buttonSuperCard_Click(object sender, EventArgs e)
+ {
+ if (lprocess) { MessageBox.Show("有任务运行中,不可执行。", "设备忙", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
+ FormSuperCard fsc = new FormSuperCard(ref process);
+ lprocess = true;
+ fsc.ShowDialog();
+ lprocess = false;
+ }
}
}
diff --git a/MifareOneTool/Form1.resx b/MifareOneTool/Form1.resx
index 7e534fd..53f7160 100644
--- a/MifareOneTool/Form1.resx
+++ b/MifareOneTool/Form1.resx
@@ -120,4 +120,7 @@
17, 17
+
+ 17, 17
+
\ No newline at end of file
diff --git a/MifareOneTool/FormKeyMfd.Designer.cs b/MifareOneTool/FormKeyMfd.Designer.cs
new file mode 100644
index 0000000..1f3326e
--- /dev/null
+++ b/MifareOneTool/FormKeyMfd.Designer.cs
@@ -0,0 +1,61 @@
+namespace MifareOneTool
+{
+ partial class FormKeyMfd
+ {
+ ///
+ /// 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.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(200, 100);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "扇区列表";
+ //
+ // FormKeyMfd
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(524, 396);
+ this.ControlBox = false;
+ this.Controls.Add(this.groupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.Name = "FormKeyMfd";
+ this.Text = "key.mfd生成";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ }
+}
\ No newline at end of file
diff --git a/MifareOneTool/FormKeyMfd.cs b/MifareOneTool/FormKeyMfd.cs
new file mode 100644
index 0000000..39e2979
--- /dev/null
+++ b/MifareOneTool/FormKeyMfd.cs
@@ -0,0 +1,19 @@
+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 FormKeyMfd : Form
+ {
+ public FormKeyMfd()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/MifareOneTool/FormKeyMfd.resx b/MifareOneTool/FormKeyMfd.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/MifareOneTool/FormKeyMfd.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/FormSuperCard.Designer.cs b/MifareOneTool/FormSuperCard.Designer.cs
new file mode 100644
index 0000000..abd6dae
--- /dev/null
+++ b/MifareOneTool/FormSuperCard.Designer.cs
@@ -0,0 +1,130 @@
+namespace MifareOneTool
+{
+ partial class FormSuperCard
+ {
+ ///
+ /// 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.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.buttonWriteCFuid = new System.Windows.Forms.Button();
+ this.buttonLockUfuid = new System.Windows.Forms.Button();
+ this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+ this.buttonExit = new System.Windows.Forms.Button();
+ this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.buttonWriteCFuid);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(258, 67);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "CUID/FUID写入";
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.buttonLockUfuid);
+ this.groupBox2.Location = new System.Drawing.Point(12, 85);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(258, 67);
+ this.groupBox2.TabIndex = 0;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "UFUID封卡";
+ //
+ // buttonWriteCFuid
+ //
+ this.buttonWriteCFuid.Enabled = false;
+ this.buttonWriteCFuid.Location = new System.Drawing.Point(6, 24);
+ this.buttonWriteCFuid.Name = "buttonWriteCFuid";
+ this.buttonWriteCFuid.Size = new System.Drawing.Size(246, 30);
+ this.buttonWriteCFuid.TabIndex = 0;
+ this.buttonWriteCFuid.Text = "执行!";
+ this.buttonWriteCFuid.UseVisualStyleBackColor = true;
+ //
+ // buttonLockUfuid
+ //
+ this.buttonLockUfuid.Enabled = false;
+ this.buttonLockUfuid.Location = new System.Drawing.Point(6, 24);
+ this.buttonLockUfuid.Name = "buttonLockUfuid";
+ this.buttonLockUfuid.Size = new System.Drawing.Size(246, 30);
+ this.buttonLockUfuid.TabIndex = 1;
+ this.buttonLockUfuid.Text = "执行!";
+ this.buttonLockUfuid.UseVisualStyleBackColor = true;
+ //
+ // richTextBox1
+ //
+ this.richTextBox1.BackColor = System.Drawing.Color.Black;
+ this.richTextBox1.ForeColor = System.Drawing.Color.Lime;
+ this.richTextBox1.Location = new System.Drawing.Point(12, 158);
+ this.richTextBox1.Name = "richTextBox1";
+ this.richTextBox1.ReadOnly = true;
+ this.richTextBox1.Size = new System.Drawing.Size(258, 323);
+ this.richTextBox1.TabIndex = 1;
+ this.richTextBox1.Text = "等待中……\n";
+ //
+ // buttonExit
+ //
+ this.buttonExit.Location = new System.Drawing.Point(189, 487);
+ this.buttonExit.Name = "buttonExit";
+ this.buttonExit.Size = new System.Drawing.Size(75, 23);
+ this.buttonExit.TabIndex = 2;
+ this.buttonExit.Text = "退出";
+ this.buttonExit.UseVisualStyleBackColor = true;
+ this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click);
+ //
+ // FormSuperCard
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(282, 522);
+ this.ControlBox = false;
+ this.Controls.Add(this.buttonExit);
+ this.Controls.Add(this.richTextBox1);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.Name = "FormSuperCard";
+ this.Text = "超级卡工具";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox2.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Button buttonWriteCFuid;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.Button buttonLockUfuid;
+ private System.Windows.Forms.RichTextBox richTextBox1;
+ private System.Windows.Forms.Button buttonExit;
+ }
+}
\ No newline at end of file
diff --git a/MifareOneTool/FormSuperCard.cs b/MifareOneTool/FormSuperCard.cs
new file mode 100644
index 0000000..f3ef0b5
--- /dev/null
+++ b/MifareOneTool/FormSuperCard.cs
@@ -0,0 +1,28 @@
+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;
+using System.Diagnostics;
+
+namespace MifareOneTool
+{
+ public partial class FormSuperCard : Form
+ {
+ public FormSuperCard(ref Process pro)
+ {
+ InitializeComponent();
+ this.pro = pro;
+ }
+
+ Process pro;
+
+ private void buttonExit_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/MifareOneTool/FormSuperCard.resx b/MifareOneTool/FormSuperCard.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/MifareOneTool/FormSuperCard.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..79c29c4 100644
--- a/MifareOneTool/MifareOneTool.csproj
+++ b/MifareOneTool/MifareOneTool.csproj
@@ -66,18 +66,37 @@
+
Form
Form1.cs
+
+ Form
+
+
+ FormKeyMfd.cs
+
+
+ Form
+
+
+ FormSuperCard.cs
+
Form1.cs
+
+ FormKeyMfd.cs
+
+
+ FormSuperCard.cs
+
ResXFileCodeGenerator
Resources.Designer.cs
diff --git a/MifareOneTool/Properties/AssemblyInfo.cs b/MifareOneTool/Properties/AssemblyInfo.cs
index f5aedda..39e5b70 100644
--- a/MifareOneTool/Properties/AssemblyInfo.cs
+++ b/MifareOneTool/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
+[assembly: AssemblyVersion("1.3.1.0")]
+[assembly: AssemblyFileVersion("1.3.1.0")]