Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit d3accae

Browse files
committed
SignTool version 1.2
1 parent f660482 commit d3accae

37 files changed

+329
-62
lines changed

.vs/ProjectSettings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"CurrentProjectSetting": null
3+
}

.vs/SignTool/v16/.suo

66 KB
Binary file not shown.

.vs/VSWorkspaceState.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"ExpandedNodes": [
3+
""
4+
],
5+
"SelectedNode": "\\SignTool.sln",
6+
"PreviewInSolutionExplorer": false
7+
}

.vs/slnx.sqlite

88 KB
Binary file not shown.

SignTool/Form1.Designer.cs

Lines changed: 134 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SignTool/Form1.cs

Lines changed: 75 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,52 @@
88
using System.Threading.Tasks;
99
using System.Windows.Forms;
1010

11-
namespace SignTool1
11+
namespace SignTool
1212
{
1313
public partial class Form1 : Form
1414
{
1515
public Form1()
1616
{
1717
InitializeComponent();
18+
statusLabel.Text = "[INFO] Ready to Sign";
1819
}
1920

20-
private void button1_Click(object sender, EventArgs e)
21+
int fileCount = 0;
22+
int exeCount = 0;
23+
int dllCount = 0;
24+
25+
26+
private void SignFile_Click(object sender, EventArgs e)
2127
{
2228
System.Windows.Forms.OpenFileDialog open;
2329

24-
open = new OpenFileDialog();
25-
open.Filter = "Executables|*.exe;*.dll";
26-
open.Multiselect = true;
30+
open = new OpenFileDialog
31+
{
32+
Filter = "Executables|*.exe;*.dll",
33+
Multiselect = true
34+
};
2735

2836
if (open.ShowDialog() == DialogResult.OK)
2937
{
3038
foreach (string fileName in open.FileNames)
3139
{
32-
logtxt.Text += fileName + "...";
33-
40+
logtxt.Text += "[SIGNER] " + fileName + "... ";
3441
Application.DoEvents();
35-
3642
SignTool.SignWithCert(fileName, "http://timestamp.verisign.com/scripts/timstamp.dll");
37-
43+
fileCount += 1;
3844
logtxt.Text += "OK" + Environment.NewLine;
45+
statusLabel.Text = "[SIGNER] Signed " + fileCount + " File(s)";
3946
}
40-
41-
System.Windows.Forms.MessageBox.Show("Done");
47+
System.Windows.Forms.MessageBox.Show("FILE SIGNING COMPLETE" + "\n" + fileCount + " File(s) Signed in Job", "JobReport", 0, MessageBoxIcon.Information);
48+
statusLabel.Text = "[INFO] Ready to Sign";
49+
}
50+
else
51+
{
52+
statusLabel.Text = "[ERROR] Opening File Selection Dialog Failed";
4253
}
4354
}
4455

45-
private void button2_Click(object sender, EventArgs e)
56+
private void SignFolder_Click(object sender, EventArgs e)
4657
{
4758
System.Windows.Forms.FolderBrowserDialog folderDialog;
4859

@@ -55,28 +66,70 @@ private void button2_Click(object sender, EventArgs e)
5566

5667
foreach (string fileName in exefiles)
5768
{
58-
logtxt.Text += fileName + "...";
59-
69+
logtxt.Text += "[SIGNER] " + fileName + "... ";
6070
Application.DoEvents();
61-
6271
SignTool.SignWithCert(fileName, "http://timestamp.verisign.com/scripts/timstamp.dll");
63-
72+
fileCount += 1;
73+
exeCount += 1;
6474
logtxt.Text += "OK" + Environment.NewLine;
75+
statusLabel.Text = "[SIGNER] Signed " + fileCount + " File(s): " + exeCount + " EXE, " + dllCount + " DLL";
6576
}
6677

6778
foreach (string fileName in dllfiles)
6879
{
69-
logtxt.Text += fileName + "...";
70-
80+
logtxt.Text += "[SIGNER] " + fileName + "... ";
7181
Application.DoEvents();
72-
7382
SignTool.SignWithCert(fileName, "http://timestamp.verisign.com/scripts/timstamp.dll");
74-
83+
fileCount += 1;
84+
dllCount += 1;
7585
logtxt.Text += "OK" + Environment.NewLine;
86+
statusLabel.Text = "[SIGNER] Signed DLL " + fileCount + " File(s): " + dllCount + "DLL";
7687
}
7788

78-
System.Windows.Forms.MessageBox.Show("Done");
89+
System.Windows.Forms.MessageBox.Show("FOLDER SIGNING COMPLETE" + "\n" + fileCount + " File(s) Signed in Job:" + "\n" + exeCount + " EXE, " + dllCount + " DLL", "JobReport", 0, MessageBoxIcon.Information);
90+
statusLabel.Text = "[INFO] Ready to Sign";
91+
}
92+
}
93+
94+
private void SaveLog_Click(object sender, EventArgs e)
95+
{
96+
97+
}
98+
99+
private void Reset_Click(object sender, EventArgs e)
100+
{
101+
102+
}
103+
104+
private void NewJob_Click(object sender, EventArgs e)
105+
{
106+
DialogResult dialogResult = MessageBox.Show("DO YOU WANT TO RESET?" + "\n" + fileCount + " File(s) Signed: " + exeCount + " EXE, " + dllCount + " DLL", "ResetJob", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
107+
if (dialogResult == DialogResult.Yes)
108+
{
109+
fileCount = 0;
110+
exeCount = 0;
111+
dllCount = 0;
112+
logtxt.Text = "";
113+
statusLabel.Text = "[INFO] Ready to Sign, ResetJob";
114+
}
115+
}
116+
117+
private void SaveJob_Click(object sender, EventArgs e)
118+
{
119+
SaveFileDialog sfd = new SaveFileDialog
120+
{
121+
Filter = "Text Files|*.txt"
122+
};
123+
124+
if (sfd.ShowDialog() == DialogResult.OK)
125+
{
126+
System.IO.File.WriteAllText(sfd.FileName, logtxt.Text);
79127
}
80128
}
129+
130+
private void Exit_Click(object sender, EventArgs e)
131+
{
132+
Application.Exit();
133+
}
81134
}
82-
}
135+
}

SignTool/Form1.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,13 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120+
<metadata name="statusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121+
<value>17, 17</value>
122+
</metadata>
123+
<metadata name="strip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124+
<value>153, 17</value>
125+
</metadata>
126+
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
127+
<value>76</value>
128+
</metadata>
120129
</root>

SignTool/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Threading.Tasks;
55
using System.Windows.Forms;
66

7-
namespace SignTool1
7+
namespace SignTool
88
{
99
static class Program
1010
{

0 commit comments

Comments
 (0)