1
0
mirror of https://github.com/mastercodeon314/KsDumper-11.git synced 2024-11-23 22:41:06 +01:00

v1.3.2 update. See Readme for update notes.

This commit is contained in:
mastercodeon314 2023-12-15 14:01:15 -07:00
parent b05466ea5e
commit ed0d5b3c80
22 changed files with 1282 additions and 332 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -31,6 +31,14 @@ namespace KsDumper11
}
}
public bool IsWorking
{
get
{
return this.ProviderName.Contains("WORKING");
}
}
public KduProvider()
{

View File

@ -33,7 +33,28 @@ namespace KsDumper11
private KduProviderSettings kduSettingsJson;
public List<KduProvider> providers = new List<KduProvider>();
CrashMon crashMon;
private bool _IsDirty = false;
public event EventHandler IsDirtyChanged;
public bool IsDirty
{
get
{
return _IsDirty;
}
set
{
_IsDirty = value;
//if (IsDirtyChanged != null)
//{
// IsDirtyChanged(_IsDirty, EventArgs.Empty);
//}
}
}
//CrashMon crashMon;
public int DefaultProvider
{
@ -46,7 +67,7 @@ namespace KsDumper11
public KduWrapper(string kduPath)
{
KduPath = kduPath;
crashMon = new CrashMon();
//crashMon = new CrashMon();
kduSettingsJson = new KduProviderSettings();
@ -60,6 +81,37 @@ namespace KsDumper11
SaveProviders();
}
public void ResetProviders()
{
for (int i = 0; i < providers.Count; i++)
{
string non_W = "[NOT WORKING] ";
string W_ = "[WORKING] ";
providers[i].ProviderName = providers[i].ProviderName.Replace(non_W, "").Replace(W_, "");
}
kduSettingsJson.DefaultProvider = -1;
IsDirty = false;
SaveProviders();
//foreach (KduProvider prov in providers)
//{
// string non_W = "[NOT WORKING] ";
// string W_ = "[WORKING] ";
// prov.ProviderName = prov.ProviderName.Replace(non_W, "").Replace(W_, "");
//}
//kduSettingsJson.DefaultProvider = -1;
//IsDirty = false;
//SaveProviders();
}
private void Application_ThreadExit(object sender, EventArgs e)
{
// Create a setting for the user to determine if they want to unload the driver upon exit of KsDumper 11
@ -74,23 +126,37 @@ namespace KsDumper11
if (!File.Exists(KduSelfExtract.AssemblyDirectory + @"\\Providers.json"))
{
populateProviders();
IsDirty = false;
}
else
{
kduSettingsJson = JsonConvert.DeserializeObject<KduProviderSettings>(File.ReadAllText(KduSelfExtract.AssemblyDirectory + @"\\Providers.json"));
providers = kduSettingsJson.Providers;
if (crashMon.CheckingProvider != -1)
bool foundADirty = false;
foreach (KduProvider provider in providers)
{
//if (KsDumper11.BSOD.JustHappened())
if (provider.IsNonWorking == true || provider.IsWorking == true)
{
providers[crashMon.CheckingProvider].ProviderName = "[NOT WORKING] " + providers[crashMon.CheckingProvider].ProviderName;
SaveProviders();
crashMon.CheckingProvider = -1;
foundADirty = true;
break;
}
}
IsDirty = foundADirty;
//if (crashMon.CheckingProvider != -1)
//{
// //if (KsDumper11.BSOD.JustHappened())
// {
// providers[crashMon.CheckingProvider].ProviderName = "[NOT WORKING] " + providers[crashMon.CheckingProvider].ProviderName;
// SaveProviders();
// crashMon.CheckingProvider = -1;
// }
//}
FireProvidersLoaded();
}
}
@ -210,7 +276,7 @@ namespace KsDumper11
private void updateProvider(bool res, int idx)
{
crashMon.CheckingProvider = -1;
//crashMon.CheckingProvider = -1;
KduProvider p = providers[idx];
@ -222,10 +288,14 @@ namespace KsDumper11
ksDriver.Dispose();
providers[idx].ProviderName = "[WORKING] " + providers[idx].ProviderName;
IsDirty = true;
}
else
{
providers[idx].ProviderName = "[NOT WORKING] " + providers[idx].ProviderName;
IsDirty = true;
}
SaveProviders();
@ -303,7 +373,7 @@ namespace KsDumper11
return;
}
crashMon.CheckingProvider = providerID;
//crashMon.CheckingProvider = providerID;
Task.Run(() =>
{
@ -351,7 +421,7 @@ namespace KsDumper11
}
catch { }
}
ProcessStartInfo inf = new ProcessStartInfo("cmd.exe")
{

Binary file not shown.

Binary file not shown.

BIN
KsDumper11/Driver/drv64.dll Normal file

Binary file not shown.

BIN
KsDumper11/Driver/kdu.exe Normal file

Binary file not shown.

View File

@ -56,9 +56,11 @@
//
this.groupBox1.Controls.Add(this.logsTextBox);
this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.groupBox1.Location = new System.Drawing.Point(12, 512);
this.groupBox1.Location = new System.Drawing.Point(16, 630);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(987, 222);
this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Size = new System.Drawing.Size(1316, 273);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Logs";
@ -68,17 +70,19 @@
this.logsTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.logsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.logsTextBox.ForeColor = System.Drawing.Color.Silver;
this.logsTextBox.Location = new System.Drawing.Point(12, 19);
this.logsTextBox.Location = new System.Drawing.Point(16, 23);
this.logsTextBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.logsTextBox.Name = "logsTextBox";
this.logsTextBox.ReadOnly = true;
this.logsTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.logsTextBox.Size = new System.Drawing.Size(967, 197);
this.logsTextBox.Size = new System.Drawing.Size(1289, 242);
this.logsTextBox.TabIndex = 0;
this.logsTextBox.Text = "";
this.logsTextBox.TextChanged += new System.EventHandler(this.logsTextBox_TextChanged);
//
// contextMenuStrip1
//
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.dumpMainModuleToolStripMenuItem,
this.toolStripSeparator1,
@ -87,46 +91,46 @@
this.resumeProcessToolStripMenuItem,
this.killProcessToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(163, 120);
this.contextMenuStrip1.Size = new System.Drawing.Size(190, 130);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// dumpMainModuleToolStripMenuItem
//
this.dumpMainModuleToolStripMenuItem.Name = "dumpMainModuleToolStripMenuItem";
this.dumpMainModuleToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
this.dumpMainModuleToolStripMenuItem.Size = new System.Drawing.Size(189, 24);
this.dumpMainModuleToolStripMenuItem.Text = "Dump Process";
this.dumpMainModuleToolStripMenuItem.Click += new System.EventHandler(this.dumpMainModuleToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(159, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(186, 6);
//
// openInExplorerToolStripMenuItem
//
this.openInExplorerToolStripMenuItem.Name = "openInExplorerToolStripMenuItem";
this.openInExplorerToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
this.openInExplorerToolStripMenuItem.Size = new System.Drawing.Size(189, 24);
this.openInExplorerToolStripMenuItem.Text = "Open In Explorer";
this.openInExplorerToolStripMenuItem.Click += new System.EventHandler(this.openInExplorerToolStripMenuItem_Click);
//
// suspendProcessToolStripMenuItem
//
this.suspendProcessToolStripMenuItem.Name = "suspendProcessToolStripMenuItem";
this.suspendProcessToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
this.suspendProcessToolStripMenuItem.Size = new System.Drawing.Size(189, 24);
this.suspendProcessToolStripMenuItem.Text = "Suspend process";
this.suspendProcessToolStripMenuItem.Click += new System.EventHandler(this.suspendProcessToolStripMenuItem_Click);
//
// resumeProcessToolStripMenuItem
//
this.resumeProcessToolStripMenuItem.Name = "resumeProcessToolStripMenuItem";
this.resumeProcessToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
this.resumeProcessToolStripMenuItem.Size = new System.Drawing.Size(189, 24);
this.resumeProcessToolStripMenuItem.Text = "Resume process";
this.resumeProcessToolStripMenuItem.Click += new System.EventHandler(this.resumeProcessToolStripMenuItem_Click);
//
// killProcessToolStripMenuItem
//
this.killProcessToolStripMenuItem.Name = "killProcessToolStripMenuItem";
this.killProcessToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
this.killProcessToolStripMenuItem.Size = new System.Drawing.Size(189, 24);
this.killProcessToolStripMenuItem.Text = "Kill process";
this.killProcessToolStripMenuItem.Click += new System.EventHandler(this.killProcessToolStripMenuItem_Click);
//
@ -135,9 +139,10 @@
this.fileDumpBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.fileDumpBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.fileDumpBtn.ForeColor = System.Drawing.Color.Silver;
this.fileDumpBtn.Location = new System.Drawing.Point(227, 49);
this.fileDumpBtn.Location = new System.Drawing.Point(303, 60);
this.fileDumpBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.fileDumpBtn.Name = "fileDumpBtn";
this.fileDumpBtn.Size = new System.Drawing.Size(75, 23);
this.fileDumpBtn.Size = new System.Drawing.Size(100, 28);
this.fileDumpBtn.TabIndex = 1;
this.fileDumpBtn.Text = "Dump File";
this.fileDumpBtn.UseVisualStyleBackColor = false;
@ -146,9 +151,10 @@
// transparentLabel1
//
this.transparentLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.transparentLabel1.Location = new System.Drawing.Point(32, 4);
this.transparentLabel1.Location = new System.Drawing.Point(43, 5);
this.transparentLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.transparentLabel1.Name = "transparentLabel1";
this.transparentLabel1.Size = new System.Drawing.Size(108, 20);
this.transparentLabel1.Size = new System.Drawing.Size(144, 25);
this.transparentLabel1.TabIndex = 8;
this.transparentLabel1.Text = "KsDumper 11";
//
@ -161,9 +167,10 @@
this.closeBtn.HoverIconColor = System.Drawing.Color.Black;
this.closeBtn.IconColor = System.Drawing.Color.Black;
this.closeBtn.IconLineThickness = 2;
this.closeBtn.Location = new System.Drawing.Point(969, 1);
this.closeBtn.Location = new System.Drawing.Point(1292, 1);
this.closeBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(40, 40);
this.closeBtn.Size = new System.Drawing.Size(53, 49);
this.closeBtn.TabIndex = 7;
this.closeBtn.Text = "windowsDefaultTitleBarButton1";
this.closeBtn.UseVisualStyleBackColor = true;
@ -173,9 +180,10 @@
this.refreshBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.refreshBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.refreshBtn.ForeColor = System.Drawing.Color.Silver;
this.refreshBtn.Location = new System.Drawing.Point(12, 49);
this.refreshBtn.Location = new System.Drawing.Point(16, 60);
this.refreshBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.refreshBtn.Name = "refreshBtn";
this.refreshBtn.Size = new System.Drawing.Size(75, 23);
this.refreshBtn.Size = new System.Drawing.Size(100, 28);
this.refreshBtn.TabIndex = 10;
this.refreshBtn.Text = "Refresh";
this.refreshBtn.UseVisualStyleBackColor = false;
@ -189,9 +197,10 @@
this.autoRefreshCheckBox.CheckColor = System.Drawing.Color.CornflowerBlue;
this.autoRefreshCheckBox.FlatAppearance.BorderSize = 0;
this.autoRefreshCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.autoRefreshCheckBox.Location = new System.Drawing.Point(93, 49);
this.autoRefreshCheckBox.Location = new System.Drawing.Point(124, 60);
this.autoRefreshCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.autoRefreshCheckBox.Name = "autoRefreshCheckBox";
this.autoRefreshCheckBox.Size = new System.Drawing.Size(98, 23);
this.autoRefreshCheckBox.Size = new System.Drawing.Size(131, 28);
this.autoRefreshCheckBox.TabIndex = 11;
this.autoRefreshCheckBox.Text = "Auto Refresh";
this.autoRefreshCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -203,9 +212,10 @@
this.hideSystemProcessBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.hideSystemProcessBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.hideSystemProcessBtn.ForeColor = System.Drawing.Color.Silver;
this.hideSystemProcessBtn.Location = new System.Drawing.Point(750, 49);
this.hideSystemProcessBtn.Location = new System.Drawing.Point(1000, 60);
this.hideSystemProcessBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.hideSystemProcessBtn.Name = "hideSystemProcessBtn";
this.hideSystemProcessBtn.Size = new System.Drawing.Size(137, 23);
this.hideSystemProcessBtn.Size = new System.Drawing.Size(183, 28);
this.hideSystemProcessBtn.TabIndex = 12;
this.hideSystemProcessBtn.Text = "Show System Processes";
this.hideSystemProcessBtn.UseVisualStyleBackColor = false;
@ -219,9 +229,10 @@
this.closeDriverOnExitBox.CheckColor = System.Drawing.Color.CornflowerBlue;
this.closeDriverOnExitBox.FlatAppearance.BorderSize = 0;
this.closeDriverOnExitBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.closeDriverOnExitBox.Location = new System.Drawing.Point(611, 49);
this.closeDriverOnExitBox.Location = new System.Drawing.Point(815, 60);
this.closeDriverOnExitBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.closeDriverOnExitBox.Name = "closeDriverOnExitBox";
this.closeDriverOnExitBox.Size = new System.Drawing.Size(133, 23);
this.closeDriverOnExitBox.Size = new System.Drawing.Size(177, 28);
this.closeDriverOnExitBox.TabIndex = 13;
this.closeDriverOnExitBox.Text = "Close Driver on Exit";
this.closeDriverOnExitBox.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -234,10 +245,11 @@
this.appIcon1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.appIcon1.DragForm = this;
this.appIcon1.Image = ((System.Drawing.Image)(resources.GetObject("appIcon1.Image")));
this.appIcon1.Location = new System.Drawing.Point(5, 4);
this.appIcon1.Location = new System.Drawing.Point(7, 5);
this.appIcon1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.appIcon1.Name = "appIcon1";
this.appIcon1.Scale = 3.5F;
this.appIcon1.Size = new System.Drawing.Size(28, 28);
this.appIcon1.Size = new System.Drawing.Size(37, 34);
this.appIcon1.TabIndex = 9;
this.appIcon1.TabStop = false;
//
@ -257,11 +269,12 @@
this.processList.ForeColor = System.Drawing.Color.Silver;
this.processList.FullRowSelect = true;
this.processList.HideSelection = false;
this.processList.Location = new System.Drawing.Point(12, 78);
this.processList.Location = new System.Drawing.Point(16, 96);
this.processList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.processList.MultiSelect = false;
this.processList.Name = "processList";
this.processList.OwnerDraw = true;
this.processList.Size = new System.Drawing.Size(987, 428);
this.processList.Size = new System.Drawing.Size(1316, 527);
this.processList.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.processList.SystemProcessesHidden = true;
this.processList.TabIndex = 2;
@ -306,17 +319,19 @@
// debuggerTrigger
//
this.debuggerTrigger.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.debuggerTrigger.Location = new System.Drawing.Point(484, 28);
this.debuggerTrigger.Location = new System.Drawing.Point(645, 34);
this.debuggerTrigger.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.debuggerTrigger.Name = "debuggerTrigger";
this.debuggerTrigger.Size = new System.Drawing.Size(15, 13);
this.debuggerTrigger.Size = new System.Drawing.Size(20, 16);
this.debuggerTrigger.TabIndex = 15;
//
// trigger1
//
this.trigger1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.trigger1.Location = new System.Drawing.Point(443, 28);
this.trigger1.Location = new System.Drawing.Point(591, 34);
this.trigger1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.trigger1.Name = "trigger1";
this.trigger1.Size = new System.Drawing.Size(35, 24);
this.trigger1.Size = new System.Drawing.Size(47, 30);
this.trigger1.TabIndex = 16;
this.trigger1.Load += new System.EventHandler(this.trigger1_Load);
//
@ -325,9 +340,10 @@
this.providerBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.providerBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.providerBtn.ForeColor = System.Drawing.Color.Silver;
this.providerBtn.Location = new System.Drawing.Point(893, 49);
this.providerBtn.Location = new System.Drawing.Point(1191, 60);
this.providerBtn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.providerBtn.Name = "providerBtn";
this.providerBtn.Size = new System.Drawing.Size(106, 23);
this.providerBtn.Size = new System.Drawing.Size(141, 28);
this.providerBtn.TabIndex = 17;
this.providerBtn.Text = "Provider Selector";
this.providerBtn.UseVisualStyleBackColor = true;
@ -335,10 +351,10 @@
//
// Dumper
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.ClientSize = new System.Drawing.Size(1009, 746);
this.ClientSize = new System.Drawing.Size(1345, 918);
this.Controls.Add(this.providerBtn);
this.Controls.Add(this.trigger1);
this.Controls.Add(this.debuggerTrigger);
@ -355,6 +371,7 @@
this.DoubleBuffered = true;
this.ForeColor = System.Drawing.Color.Silver;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.Name = "Dumper";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

View File

@ -49,7 +49,7 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\..\..\..\..\..\VM Share\KsDumper VM\KsDumper v1.1\</OutputPath>
<DefineConstants>TRACE;WIN64</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
@ -114,6 +114,12 @@
<Compile Include="TriggerForm.Designer.cs">
<DependentUpon>TriggerForm.cs</DependentUpon>
</Compile>
<None Include="SplashForm.cs">
<SubType>Form</SubType>
</None>
<None Include="SplashForm.Designer.cs">
<DependentUpon>SplashForm.cs</DependentUpon>
</None>
<Compile Include="Dumper.cs">
<SubType>Form</SubType>
</Compile>
@ -146,14 +152,15 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="SplashForm.resx">
<DependentUpon>SplashForm.cs</DependentUpon>
</None>
<EmbeddedResource Include="Trigger.resx">
<DependentUpon>Trigger.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="Driver\KsDumperDriver.sys" />
<None Include="Driver\ManualLoader.bat">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Driver\ManualLoader.bat" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

View File

@ -34,16 +34,34 @@ namespace KsDumper11
{
KduWrapper wr = new KduWrapper(KduSelfExtract.AssemblyDirectory + @"\Driver\kdu.exe");
wr.LoadProviders();
wr.Start();
if (KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
if (wr.DefaultProvider != -1)
{
Application.Run(new Dumper());
wr.Start();
if (KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
Application.Run(new Dumper());
}
else
{
Environment.Exit(0);
}
}
else
{
Environment.Exit(0);
}
// Run the selector here to populate the providers and set a default provider.
Application.Run(new ProviderSelector());
if (KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
Application.Run(new Dumper());
}
else
{
Environment.Exit(0);
}
}
}
}
else

View File

@ -5,7 +5,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
[assembly: AssemblyVersion("1.3.1")]
[assembly: AssemblyVersion("1.3.2")]
[assembly: AssemblyTitle("KsDumper 11")]
[assembly: AssemblyDescription("Dump processes from kernel space !")]
[assembly: AssemblyConfiguration("")]
@ -15,4 +15,4 @@ using System.Runtime.Versioning;
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("7881b99d-0b5a-44e7-af34-80a0ecffd5db")]
[assembly: AssemblyFileVersion("1.3.1")]
[assembly: AssemblyFileVersion("1.3.2")]

View File

@ -30,74 +30,267 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProviderSelector));
this.transparentLabel1 = new DarkControls.Controls.TransparentLabel();
this.closeBtn = new DarkControls.Controls.WindowsDefaultTitleBarButton();
this.appIcon1 = new DarkControls.Controls.AppIcon();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.driverLoadedLbl = new System.Windows.Forms.Label();
this.driverLoadedLblTimer = new System.Windows.Forms.Timer(this.components);
this.label8 = new System.Windows.Forms.Label();
this.defaultProviderIDBox = new DarkControls.Controls.DarkTextBox();
this.setDefaultProviderBtn = new DarkControls.Controls.DarkButton();
this.testProviderBtn = new DarkControls.Controls.DarkButton();
this.shellcodeMaskBox = new DarkControls.Controls.DarkTextBox();
this.driverWhqlSignedBox = new DarkControls.Controls.DarkCheckBox();
this.minWinBuildBox = new DarkControls.Controls.DarkTextBox();
this.maxWinBuildBox = new DarkControls.Controls.DarkTextBox();
this.signerNameBox = new DarkControls.Controls.DarkTextBox();
this.deviceNameBox = new DarkControls.Controls.DarkTextBox();
this.driverNameBox = new DarkControls.Controls.DarkTextBox();
this.providerExtraInfoBox = new DarkControls.Controls.DarkTextBox();
this.providerList = new DarkControls.Controls.DarkListView();
this.provIdCol = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.provNameCol = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.providerExtraInfoBox = new DarkControls.Controls.DarkTextBox();
this.label1 = new System.Windows.Forms.Label();
this.driverNameBox = new DarkControls.Controls.DarkTextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.deviceNameBox = new DarkControls.Controls.DarkTextBox();
this.label4 = new System.Windows.Forms.Label();
this.signerNameBox = new DarkControls.Controls.DarkTextBox();
this.label5 = new System.Windows.Forms.Label();
this.minWinBuildBox = new DarkControls.Controls.DarkTextBox();
this.label6 = new System.Windows.Forms.Label();
this.maxWinBuildBox = new DarkControls.Controls.DarkTextBox();
this.driverWhqlSignedBox = new DarkControls.Controls.DarkCheckBox();
this.label7 = new System.Windows.Forms.Label();
this.shellcodeMaskBox = new DarkControls.Controls.DarkTextBox();
this.testProviderBtn = new DarkControls.Controls.DarkButton();
this.driverLoadedLbl = new System.Windows.Forms.Label();
this.driverLoadedLblTimer = new System.Windows.Forms.Timer(this.components);
this.setDefaultProviderBtn = new DarkControls.Controls.DarkButton();
this.label8 = new System.Windows.Forms.Label();
this.defaultProviderIDBox = new DarkControls.Controls.DarkTextBox();
this.appIcon1 = new DarkControls.Controls.AppIcon();
this.transparentLabel1 = new DarkControls.Controls.TransparentLabel();
this.closeBtn = new DarkControls.Controls.WindowsDefaultTitleBarButton();
this.wipeSettingsBtn = new DarkControls.Controls.DarkButton();
((System.ComponentModel.ISupportInitialize)(this.appIcon1)).BeginInit();
this.SuspendLayout();
//
// transparentLabel1
// label1
//
this.transparentLabel1.AutoSize = true;
this.transparentLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.transparentLabel1.Location = new System.Drawing.Point(32, 4);
this.transparentLabel1.Name = "transparentLabel1";
this.transparentLabel1.Size = new System.Drawing.Size(237, 20);
this.transparentLabel1.TabIndex = 8;
this.transparentLabel1.Text = "KsDumper 11 Provider Selection";
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(541, 416);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(115, 16);
this.label1.TabIndex = 12;
this.label1.Text = "Provider Extra Info";
//
// closeBtn
// label2
//
this.closeBtn.ButtonType = DarkControls.Controls.WindowsDefaultTitleBarButton.Type.Close;
this.closeBtn.ClickColor = System.Drawing.Color.Red;
this.closeBtn.ClickIconColor = System.Drawing.Color.Black;
this.closeBtn.HoverColor = System.Drawing.Color.OrangeRed;
this.closeBtn.HoverIconColor = System.Drawing.Color.Black;
this.closeBtn.IconColor = System.Drawing.Color.Black;
this.closeBtn.IconLineThickness = 2;
this.closeBtn.Location = new System.Drawing.Point(773, 0);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(40, 40);
this.closeBtn.TabIndex = 7;
this.closeBtn.Text = "windowsDefaultTitleBarButton1";
this.closeBtn.UseVisualStyleBackColor = true;
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(541, 41);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(83, 16);
this.label2.TabIndex = 14;
this.label2.Text = "Driver Name";
//
// appIcon1
// label3
//
this.appIcon1.AppIconImage = ((System.Drawing.Image)(resources.GetObject("appIcon1.AppIconImage")));
this.appIcon1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.appIcon1.DragForm = null;
this.appIcon1.Image = ((System.Drawing.Image)(resources.GetObject("appIcon1.Image")));
this.appIcon1.Location = new System.Drawing.Point(0, 1);
this.appIcon1.Name = "appIcon1";
this.appIcon1.Scale = 3.5F;
this.appIcon1.Size = new System.Drawing.Size(28, 28);
this.appIcon1.TabIndex = 9;
this.appIcon1.TabStop = false;
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(541, 89);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(90, 16);
this.label3.TabIndex = 16;
this.label3.Text = "Device Name";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(541, 139);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(86, 16);
this.label4.TabIndex = 18;
this.label4.Text = "Signer Name";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(541, 241);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(150, 16);
this.label5.TabIndex = 22;
this.label5.Text = "Minimum Windows build";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(541, 191);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(154, 16);
this.label6.TabIndex = 20;
this.label6.Text = "Maximum Windows build";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(541, 297);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(152, 16);
this.label7.TabIndex = 25;
this.label7.Text = "Shellcode support mask";
//
// driverLoadedLbl
//
this.driverLoadedLbl.AutoSize = true;
this.driverLoadedLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F);
this.driverLoadedLbl.Location = new System.Drawing.Point(108, 542);
this.driverLoadedLbl.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.driverLoadedLbl.Name = "driverLoadedLbl";
this.driverLoadedLbl.Size = new System.Drawing.Size(171, 29);
this.driverLoadedLbl.TabIndex = 27;
this.driverLoadedLbl.Text = "Driver Loaded!";
this.driverLoadedLbl.Visible = false;
//
// driverLoadedLblTimer
//
this.driverLoadedLblTimer.Interval = 2500;
this.driverLoadedLblTimer.Tick += new System.EventHandler(this.driverLoadedLblTimer_Tick);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(541, 350);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(119, 16);
this.label8.TabIndex = 29;
this.label8.Text = "Default Provider ID";
//
// defaultProviderIDBox
//
this.defaultProviderIDBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.defaultProviderIDBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.defaultProviderIDBox.ForeColor = System.Drawing.Color.Silver;
this.defaultProviderIDBox.Location = new System.Drawing.Point(545, 369);
this.defaultProviderIDBox.Margin = new System.Windows.Forms.Padding(4);
this.defaultProviderIDBox.Name = "defaultProviderIDBox";
this.defaultProviderIDBox.Size = new System.Drawing.Size(525, 22);
this.defaultProviderIDBox.TabIndex = 30;
//
// setDefaultProviderBtn
//
this.setDefaultProviderBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.setDefaultProviderBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.setDefaultProviderBtn.ForeColor = System.Drawing.Color.Silver;
this.setDefaultProviderBtn.Location = new System.Drawing.Point(915, 545);
this.setDefaultProviderBtn.Margin = new System.Windows.Forms.Padding(4);
this.setDefaultProviderBtn.Name = "setDefaultProviderBtn";
this.setDefaultProviderBtn.Size = new System.Drawing.Size(156, 28);
this.setDefaultProviderBtn.TabIndex = 28;
this.setDefaultProviderBtn.Text = "Set Default Provider";
this.setDefaultProviderBtn.UseVisualStyleBackColor = true;
this.setDefaultProviderBtn.Click += new System.EventHandler(this.setDefaultProviderBtn_Click);
//
// testProviderBtn
//
this.testProviderBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.testProviderBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.testProviderBtn.ForeColor = System.Drawing.Color.Silver;
this.testProviderBtn.Location = new System.Drawing.Point(0, 542);
this.testProviderBtn.Margin = new System.Windows.Forms.Padding(4);
this.testProviderBtn.Name = "testProviderBtn";
this.testProviderBtn.Size = new System.Drawing.Size(100, 28);
this.testProviderBtn.TabIndex = 26;
this.testProviderBtn.Text = "Test Driver";
this.testProviderBtn.UseVisualStyleBackColor = true;
this.testProviderBtn.Click += new System.EventHandler(this.testProviderBtn_Click);
//
// shellcodeMaskBox
//
this.shellcodeMaskBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.shellcodeMaskBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.shellcodeMaskBox.ForeColor = System.Drawing.Color.Silver;
this.shellcodeMaskBox.Location = new System.Drawing.Point(545, 316);
this.shellcodeMaskBox.Margin = new System.Windows.Forms.Padding(4);
this.shellcodeMaskBox.Name = "shellcodeMaskBox";
this.shellcodeMaskBox.Size = new System.Drawing.Size(525, 22);
this.shellcodeMaskBox.TabIndex = 24;
//
// driverWhqlSignedBox
//
this.driverWhqlSignedBox.Appearance = System.Windows.Forms.Appearance.Button;
this.driverWhqlSignedBox.BoxBorderColor = System.Drawing.Color.DarkSlateBlue;
this.driverWhqlSignedBox.BoxFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.driverWhqlSignedBox.CheckColor = System.Drawing.Color.CornflowerBlue;
this.driverWhqlSignedBox.FlatAppearance.BorderSize = 0;
this.driverWhqlSignedBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.driverWhqlSignedBox.Location = new System.Drawing.Point(871, 399);
this.driverWhqlSignedBox.Margin = new System.Windows.Forms.Padding(4);
this.driverWhqlSignedBox.Name = "driverWhqlSignedBox";
this.driverWhqlSignedBox.Size = new System.Drawing.Size(200, 33);
this.driverWhqlSignedBox.TabIndex = 23;
this.driverWhqlSignedBox.Text = "Driver is WHQL Signed";
this.driverWhqlSignedBox.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.driverWhqlSignedBox.UseVisualStyleBackColor = true;
//
// minWinBuildBox
//
this.minWinBuildBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.minWinBuildBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.minWinBuildBox.ForeColor = System.Drawing.Color.Silver;
this.minWinBuildBox.Location = new System.Drawing.Point(545, 261);
this.minWinBuildBox.Margin = new System.Windows.Forms.Padding(4);
this.minWinBuildBox.Name = "minWinBuildBox";
this.minWinBuildBox.Size = new System.Drawing.Size(525, 22);
this.minWinBuildBox.TabIndex = 21;
//
// maxWinBuildBox
//
this.maxWinBuildBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.maxWinBuildBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.maxWinBuildBox.ForeColor = System.Drawing.Color.Silver;
this.maxWinBuildBox.Location = new System.Drawing.Point(545, 210);
this.maxWinBuildBox.Margin = new System.Windows.Forms.Padding(4);
this.maxWinBuildBox.Name = "maxWinBuildBox";
this.maxWinBuildBox.Size = new System.Drawing.Size(525, 22);
this.maxWinBuildBox.TabIndex = 19;
//
// signerNameBox
//
this.signerNameBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.signerNameBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.signerNameBox.ForeColor = System.Drawing.Color.Silver;
this.signerNameBox.Location = new System.Drawing.Point(545, 159);
this.signerNameBox.Margin = new System.Windows.Forms.Padding(4);
this.signerNameBox.Name = "signerNameBox";
this.signerNameBox.Size = new System.Drawing.Size(525, 22);
this.signerNameBox.TabIndex = 17;
//
// deviceNameBox
//
this.deviceNameBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.deviceNameBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.deviceNameBox.ForeColor = System.Drawing.Color.Silver;
this.deviceNameBox.Location = new System.Drawing.Point(545, 108);
this.deviceNameBox.Margin = new System.Windows.Forms.Padding(4);
this.deviceNameBox.Name = "deviceNameBox";
this.deviceNameBox.Size = new System.Drawing.Size(525, 22);
this.deviceNameBox.TabIndex = 15;
//
// driverNameBox
//
this.driverNameBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.driverNameBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.driverNameBox.ForeColor = System.Drawing.Color.Silver;
this.driverNameBox.Location = new System.Drawing.Point(545, 60);
this.driverNameBox.Margin = new System.Windows.Forms.Padding(4);
this.driverNameBox.Name = "driverNameBox";
this.driverNameBox.Size = new System.Drawing.Size(525, 22);
this.driverNameBox.TabIndex = 13;
//
// providerExtraInfoBox
//
this.providerExtraInfoBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.providerExtraInfoBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.providerExtraInfoBox.ForeColor = System.Drawing.Color.Silver;
this.providerExtraInfoBox.Location = new System.Drawing.Point(541, 436);
this.providerExtraInfoBox.Margin = new System.Windows.Forms.Padding(4);
this.providerExtraInfoBox.Multiline = true;
this.providerExtraInfoBox.Name = "providerExtraInfoBox";
this.providerExtraInfoBox.Size = new System.Drawing.Size(529, 98);
this.providerExtraInfoBox.TabIndex = 11;
//
// providerList
//
@ -108,10 +301,11 @@
this.providerList.ForeColor = System.Drawing.Color.Silver;
this.providerList.FullRowSelect = true;
this.providerList.HideSelection = false;
this.providerList.Location = new System.Drawing.Point(0, 35);
this.providerList.Location = new System.Drawing.Point(0, 43);
this.providerList.Margin = new System.Windows.Forms.Padding(4);
this.providerList.Name = "providerList";
this.providerList.OwnerDraw = true;
this.providerList.Size = new System.Drawing.Size(400, 399);
this.providerList.Size = new System.Drawing.Size(532, 490);
this.providerList.TabIndex = 10;
this.providerList.UseCompatibleStateImageBehavior = false;
this.providerList.View = System.Windows.Forms.View.Details;
@ -126,224 +320,70 @@
this.provNameCol.Text = "Provider Name";
this.provNameCol.Width = 396;
//
// providerExtraInfoBox
// appIcon1
//
this.providerExtraInfoBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.providerExtraInfoBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.providerExtraInfoBox.ForeColor = System.Drawing.Color.Silver;
this.providerExtraInfoBox.Location = new System.Drawing.Point(406, 354);
this.providerExtraInfoBox.Multiline = true;
this.providerExtraInfoBox.Name = "providerExtraInfoBox";
this.providerExtraInfoBox.Size = new System.Drawing.Size(397, 80);
this.providerExtraInfoBox.TabIndex = 11;
this.appIcon1.AppIconImage = ((System.Drawing.Image)(resources.GetObject("appIcon1.AppIconImage")));
this.appIcon1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.appIcon1.DragForm = null;
this.appIcon1.Image = ((System.Drawing.Image)(resources.GetObject("appIcon1.Image")));
this.appIcon1.Location = new System.Drawing.Point(0, 1);
this.appIcon1.Margin = new System.Windows.Forms.Padding(4);
this.appIcon1.Name = "appIcon1";
this.appIcon1.Scale = 3.5F;
this.appIcon1.Size = new System.Drawing.Size(37, 34);
this.appIcon1.TabIndex = 9;
this.appIcon1.TabStop = false;
//
// label1
// transparentLabel1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(406, 338);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(94, 13);
this.label1.TabIndex = 12;
this.label1.Text = "Provider Extra Info";
this.transparentLabel1.AutoSize = true;
this.transparentLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.transparentLabel1.Location = new System.Drawing.Point(43, 5);
this.transparentLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.transparentLabel1.Name = "transparentLabel1";
this.transparentLabel1.Size = new System.Drawing.Size(295, 25);
this.transparentLabel1.TabIndex = 8;
this.transparentLabel1.Text = "KsDumper 11 Provider Selection";
//
// driverNameBox
// closeBtn
//
this.driverNameBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.driverNameBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.driverNameBox.ForeColor = System.Drawing.Color.Silver;
this.driverNameBox.Location = new System.Drawing.Point(409, 49);
this.driverNameBox.Name = "driverNameBox";
this.driverNameBox.Size = new System.Drawing.Size(394, 20);
this.driverNameBox.TabIndex = 13;
this.closeBtn.ButtonType = DarkControls.Controls.WindowsDefaultTitleBarButton.Type.Close;
this.closeBtn.ClickColor = System.Drawing.Color.Red;
this.closeBtn.ClickIconColor = System.Drawing.Color.Black;
this.closeBtn.HoverColor = System.Drawing.Color.OrangeRed;
this.closeBtn.HoverIconColor = System.Drawing.Color.Black;
this.closeBtn.IconColor = System.Drawing.Color.Black;
this.closeBtn.IconLineThickness = 2;
this.closeBtn.Location = new System.Drawing.Point(1031, 0);
this.closeBtn.Margin = new System.Windows.Forms.Padding(4);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(53, 49);
this.closeBtn.TabIndex = 7;
this.closeBtn.Text = "windowsDefaultTitleBarButton1";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// label2
// wipeSettingsBtn
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(406, 33);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(66, 13);
this.label2.TabIndex = 14;
this.label2.Text = "Driver Name";
this.wipeSettingsBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.wipeSettingsBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.wipeSettingsBtn.ForeColor = System.Drawing.Color.Silver;
this.wipeSettingsBtn.Location = new System.Drawing.Point(796, 545);
this.wipeSettingsBtn.Name = "wipeSettingsBtn";
this.wipeSettingsBtn.Size = new System.Drawing.Size(112, 28);
this.wipeSettingsBtn.TabIndex = 31;
this.wipeSettingsBtn.Text = "Wipe Settings";
this.wipeSettingsBtn.UseVisualStyleBackColor = true;
this.wipeSettingsBtn.Click += new System.EventHandler(this.wipeSettingsBtn_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(406, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Device Name";
//
// deviceNameBox
//
this.deviceNameBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.deviceNameBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.deviceNameBox.ForeColor = System.Drawing.Color.Silver;
this.deviceNameBox.Location = new System.Drawing.Point(409, 88);
this.deviceNameBox.Name = "deviceNameBox";
this.deviceNameBox.Size = new System.Drawing.Size(394, 20);
this.deviceNameBox.TabIndex = 15;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(406, 113);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(68, 13);
this.label4.TabIndex = 18;
this.label4.Text = "Signer Name";
//
// signerNameBox
//
this.signerNameBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.signerNameBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.signerNameBox.ForeColor = System.Drawing.Color.Silver;
this.signerNameBox.Location = new System.Drawing.Point(409, 129);
this.signerNameBox.Name = "signerNameBox";
this.signerNameBox.Size = new System.Drawing.Size(394, 20);
this.signerNameBox.TabIndex = 17;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(406, 196);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(120, 13);
this.label5.TabIndex = 22;
this.label5.Text = "Minimum Windows build";
//
// minWinBuildBox
//
this.minWinBuildBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.minWinBuildBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.minWinBuildBox.ForeColor = System.Drawing.Color.Silver;
this.minWinBuildBox.Location = new System.Drawing.Point(409, 212);
this.minWinBuildBox.Name = "minWinBuildBox";
this.minWinBuildBox.Size = new System.Drawing.Size(394, 20);
this.minWinBuildBox.TabIndex = 21;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(406, 155);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(123, 13);
this.label6.TabIndex = 20;
this.label6.Text = "Maximum Windows build";
//
// maxWinBuildBox
//
this.maxWinBuildBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.maxWinBuildBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.maxWinBuildBox.ForeColor = System.Drawing.Color.Silver;
this.maxWinBuildBox.Location = new System.Drawing.Point(409, 171);
this.maxWinBuildBox.Name = "maxWinBuildBox";
this.maxWinBuildBox.Size = new System.Drawing.Size(394, 20);
this.maxWinBuildBox.TabIndex = 19;
//
// driverWhqlSignedBox
//
this.driverWhqlSignedBox.Appearance = System.Windows.Forms.Appearance.Button;
this.driverWhqlSignedBox.BoxBorderColor = System.Drawing.Color.DarkSlateBlue;
this.driverWhqlSignedBox.BoxFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.driverWhqlSignedBox.CheckColor = System.Drawing.Color.CornflowerBlue;
this.driverWhqlSignedBox.FlatAppearance.BorderSize = 0;
this.driverWhqlSignedBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.driverWhqlSignedBox.Location = new System.Drawing.Point(653, 324);
this.driverWhqlSignedBox.Name = "driverWhqlSignedBox";
this.driverWhqlSignedBox.Size = new System.Drawing.Size(150, 27);
this.driverWhqlSignedBox.TabIndex = 23;
this.driverWhqlSignedBox.Text = "Driver is WHQL Signed";
this.driverWhqlSignedBox.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.driverWhqlSignedBox.UseVisualStyleBackColor = true;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(406, 241);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(120, 13);
this.label7.TabIndex = 25;
this.label7.Text = "Shellcode support mask";
//
// shellcodeMaskBox
//
this.shellcodeMaskBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.shellcodeMaskBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.shellcodeMaskBox.ForeColor = System.Drawing.Color.Silver;
this.shellcodeMaskBox.Location = new System.Drawing.Point(409, 257);
this.shellcodeMaskBox.Name = "shellcodeMaskBox";
this.shellcodeMaskBox.Size = new System.Drawing.Size(394, 20);
this.shellcodeMaskBox.TabIndex = 24;
//
// testProviderBtn
//
this.testProviderBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.testProviderBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.testProviderBtn.ForeColor = System.Drawing.Color.Silver;
this.testProviderBtn.Location = new System.Drawing.Point(0, 440);
this.testProviderBtn.Name = "testProviderBtn";
this.testProviderBtn.Size = new System.Drawing.Size(75, 23);
this.testProviderBtn.TabIndex = 26;
this.testProviderBtn.Text = "Test Driver";
this.testProviderBtn.UseVisualStyleBackColor = true;
this.testProviderBtn.Click += new System.EventHandler(this.testProviderBtn_Click);
//
// driverLoadedLbl
//
this.driverLoadedLbl.AutoSize = true;
this.driverLoadedLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F);
this.driverLoadedLbl.Location = new System.Drawing.Point(81, 440);
this.driverLoadedLbl.Name = "driverLoadedLbl";
this.driverLoadedLbl.Size = new System.Drawing.Size(133, 24);
this.driverLoadedLbl.TabIndex = 27;
this.driverLoadedLbl.Text = "Driver Loaded!";
this.driverLoadedLbl.Visible = false;
//
// driverLoadedLblTimer
//
this.driverLoadedLblTimer.Interval = 2500;
this.driverLoadedLblTimer.Tick += new System.EventHandler(this.driverLoadedLblTimer_Tick);
//
// setDefaultProviderBtn
//
this.setDefaultProviderBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.setDefaultProviderBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.setDefaultProviderBtn.ForeColor = System.Drawing.Color.Silver;
this.setDefaultProviderBtn.Location = new System.Drawing.Point(686, 443);
this.setDefaultProviderBtn.Name = "setDefaultProviderBtn";
this.setDefaultProviderBtn.Size = new System.Drawing.Size(117, 23);
this.setDefaultProviderBtn.TabIndex = 28;
this.setDefaultProviderBtn.Text = "Set Default Provider";
this.setDefaultProviderBtn.UseVisualStyleBackColor = true;
this.setDefaultProviderBtn.Click += new System.EventHandler(this.setDefaultProviderBtn_Click);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(406, 284);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(97, 13);
this.label8.TabIndex = 29;
this.label8.Text = "Default Provider ID";
//
// defaultProviderIDBox
//
this.defaultProviderIDBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.defaultProviderIDBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.defaultProviderIDBox.ForeColor = System.Drawing.Color.Silver;
this.defaultProviderIDBox.Location = new System.Drawing.Point(409, 300);
this.defaultProviderIDBox.Name = "defaultProviderIDBox";
this.defaultProviderIDBox.Size = new System.Drawing.Size(394, 20);
this.defaultProviderIDBox.TabIndex = 30;
//
// Form1
// ProviderSelector
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.ClientSize = new System.Drawing.Size(813, 471);
this.ClientSize = new System.Drawing.Size(1084, 580);
this.Controls.Add(this.wipeSettingsBtn);
this.Controls.Add(this.defaultProviderIDBox);
this.Controls.Add(this.label8);
this.Controls.Add(this.setDefaultProviderBtn);
@ -371,9 +411,11 @@
this.DoubleBuffered = true;
this.ForeColor = System.Drawing.Color.Silver;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "Form1";
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "ProviderSelector";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "KsDumper 11 Provider Selection";
this.Load += new System.EventHandler(this.ProviderSelector_Load);
((System.ComponentModel.ISupportInitialize)(this.appIcon1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -408,6 +450,7 @@
private DarkControls.Controls.DarkButton setDefaultProviderBtn;
private System.Windows.Forms.Label label8;
private DarkControls.Controls.DarkTextBox defaultProviderIDBox;
private DarkControls.Controls.DarkButton wipeSettingsBtn;
}
}

View File

@ -47,10 +47,16 @@ namespace KsDumper11
wrapper = new KduWrapper(KduSelfExtract.KduPath);
wrapper.DriverLoaded += Wrapper_DriverLoaded;
wrapper.ProvidersLoaded += Wrapper_ProvidersLoaded;
//wrapper.IsDirtyChanged += Wrapper_IsDirtyChanged;
wrapper.LoadProviders();
}
private void Wrapper_IsDirtyChanged(object sender, EventArgs e)
{
}
private void Wrapper_ProvidersLoaded(object sender, EventArgs e)
{
foreach (KduProvider p in wrapper.providers)
@ -72,7 +78,7 @@ namespace KsDumper11
}
if (wrapper.DefaultProvider != -1)
{
{
providerList.SelectedIndices.Add(wrapper.DefaultProvider);
}
else
@ -95,6 +101,37 @@ namespace KsDumper11
ListViewItem item = providerList.Items[idx];
for (int i = 0; i < wrapper.providers.Count; i++)
{
string non_W = "[NOT WORKING] ";
string W_ = "[WORKING] ";
if (wrapper.providers[i].ProviderName == item.SubItems[1].Text)
{
if (res)
{
wrapper.providers[i].ProviderName = W_ + wrapper.providers[i].ProviderName;
if (wrapper.IsDirty == false)
{
wrapper.IsDirty = true;
}
}
else
{
wrapper.providers[i].ProviderName = non_W + wrapper.providers[i].ProviderName;
if (wrapper.IsDirty == false)
{
wrapper.IsDirty = true;
}
}
break;
}
}
this.wipeSettingsBtn.Enabled = wrapper.IsDirty;
if (res)
{
driverLoadedLbl.ForeColor = Color.Green;
@ -147,15 +184,14 @@ namespace KsDumper11
if (p.ProviderName.Contains("[NOT WORKING]") || p.ProviderName.Contains("[WORKING]"))
{
testProviderBtn.Enabled = false;
}
else
{
testProviderBtn.Enabled = true;
}
if (p.ProviderName.Contains("[NOT WORKING]") )
if (p.ProviderName.Contains("[NOT WORKING]"))
{
setDefaultProviderBtn.Enabled = false;
}
@ -227,5 +263,26 @@ namespace KsDumper11
this.Close();
}
}
private void wipeSettingsBtn_Click(object sender, EventArgs e)
{
wrapper.ResetProviders();
providerList.Items.Clear();
Wrapper_ProvidersLoaded(sender, e);
this.wipeSettingsBtn.Enabled = false;
}
private void ProviderSelector_Load(object sender, EventArgs e)
{
this.wipeSettingsBtn.Enabled = wrapper.IsDirty;
}
private void closeBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}
}

View File

@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="driverLoadedLblTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="appIcon1.AppIconImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -236,7 +239,4 @@
SUVORK5CYII=
</value>
</data>
<metadata name="driverLoadedLblTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

92
KsDumper11/SplashForm.Designer.cs generated Normal file
View File

@ -0,0 +1,92 @@
namespace KsDumper11
{
partial class SplashForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.statusLbl = new DarkControls.Controls.TransparentLabel();
this.progressBar = new DarkControls.Controls.ProgressBarEx();
this.transparentLabel1 = new DarkControls.Controls.TransparentLabel();
this.SuspendLayout();
//
// statusLbl
//
this.statusLbl.AutoSize = true;
this.statusLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.statusLbl.Location = new System.Drawing.Point(12, 72);
this.statusLbl.Name = "statusLbl";
this.statusLbl.Size = new System.Drawing.Size(0, 24);
this.statusLbl.TabIndex = 10;
//
// progressBar
//
this.progressBar.Location = new System.Drawing.Point(12, 108);
this.progressBar.MarqueeAnimationSpeed = 750;
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(660, 23);
this.progressBar.TabIndex = 9;
//
// transparentLabel1
//
this.transparentLabel1.AutoSize = true;
this.transparentLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.transparentLabel1.Location = new System.Drawing.Point(265, 9);
this.transparentLabel1.Name = "transparentLabel1";
this.transparentLabel1.Size = new System.Drawing.Size(193, 33);
this.transparentLabel1.TabIndex = 8;
this.transparentLabel1.Text = "KsDumper 11";
//
// SplashForm
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.ClientSize = new System.Drawing.Size(684, 150);
this.Controls.Add(this.statusLbl);
this.Controls.Add(this.progressBar);
this.Controls.Add(this.transparentLabel1);
this.DoubleBuffered = true;
this.ForeColor = System.Drawing.Color.Silver;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "SplashForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Basic File Box";
this.Load += new System.EventHandler(this.SplashForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private DarkControls.Controls.TransparentLabel transparentLabel1;
private DarkControls.Controls.ProgressBarEx progressBar;
private DarkControls.Controls.TransparentLabel statusLbl;
}
}

512
KsDumper11/SplashForm.cs Normal file
View File

@ -0,0 +1,512 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
using DarkControls;
using KsDumper11.Driver;
using System.Runtime.Remoting.Contexts;
using System.Runtime.InteropServices.ComTypes;
using Microsoft.Win32;
namespace KsDumper11
{
public partial class SplashForm : Form
{
[DllImport("kernel32.dll", SetLastError = true)]
private static extern bool FlushFileBuffers(IntPtr handle);
protected override CreateParams CreateParams
{
get
{
// Activate double buffering at the form level. All child controls will be double buffered as well.
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
return cp;
}
}
public bool IsAfterburnerRunning
{
get
{
Process[] procs = Process.GetProcessesByName("MSIAfterburner");
if (procs != null)
{
if (procs.Length > 0)
{
if (procs[0].ProcessName == "MSIAfterburner")
{
return true;
}
}
}
return false;
}
}
int maxProviders = 31;
//int maxProviders = 9;
List<int> workingProviders = new List<int>();
string logFolder = Environment.CurrentDirectory + "\\Logs";
string workingProvidersPath = Environment.CurrentDirectory + "\\Providers.txt";
string scanningPath = Environment.CurrentDirectory + "\\Scanning.txt";
Random rnd = new Random();
void saveProviders(int providerID)
{
StringBuilder b = new StringBuilder();
for (int i = 0; i < workingProviders.Count; i++)
{
if (i == workingProviders.Count - 1)
{
b.Append(workingProviders[i]);
}
else
{
b.Append(workingProviders[i].ToString() + "|");
}
}
if (providerID != maxProviders)
{
writeToDisk(scanningPath, providerID.ToString());
}
else
{
File.Delete(scanningPath);
}
writeToDisk(workingProvidersPath, b.ToString());
Thread.Sleep(1000);
}
private void writeToDisk(string path, string text)
{
if (!File.Exists(path))
{
FileStream fs = File.Create(path);
StreamWriter sw = new StreamWriter(fs);
sw.Write(text);
sw.Flush();
FlushFileBuffers(fs.Handle);
sw.Close();
sw.Dispose();
}
else
{
File.Delete(path);
FileStream fs = File.Create(path);
StreamWriter sw = new StreamWriter(fs);
sw.Write(text);
sw.Flush();
FlushFileBuffers(fs.Handle);
sw.Close();
sw.Dispose();
}
}
private void StartDriver()
{
if (!Directory.Exists(logFolder))
{
Directory.CreateDirectory(logFolder);
}
int timeout = 5;
int retryCountDown = 5;
if (IsAfterburnerRunning)
{
while (true)
{
if (retryCountDown == 0)
{
retryCountDown = timeout;
if (!IsAfterburnerRunning)
{
break;
}
}
UpdateStatus($"Waiting MSI Afterburner to be closed... Retry in {retryCountDown}s", 0);
Thread.Sleep(1000);
retryCountDown -= 1;
}
retryCountDown = 3;
while (retryCountDown != 0)
{
UpdateStatus($"Sleeping {retryCountDown}s to ensure MSI Afterburner driver is unloaded", 0);
Thread.Sleep(1000);
retryCountDown -= 1;
}
}
int idx = 0;
int providerID = 0;
if (File.Exists(scanningPath))
{
if (File.Exists(workingProvidersPath))
{
string provsStr = File.ReadAllText(workingProvidersPath);
if (provsStr != String.Empty && provsStr != null)
{
string[] parts = provsStr.Split('|');
foreach (string provider in parts)
{
workingProviders.Add(int.Parse(provider));
}
}
}
providerID = int.Parse(File.ReadAllText(scanningPath));
// Save the crash providerID to a blacklist.
providerID++;
if (scan(providerID))
{
File.Delete(scanningPath);
return;
}
}
if (File.Exists(workingProvidersPath))
{
UpdateStatus($"Saved providers found, trying each provider until one works...", 50);
Thread.Sleep(1000);
string provsStr = File.ReadAllText(workingProvidersPath);
if (provsStr != String.Empty && provsStr != null)
{
string[] parts = provsStr.Split('|');
foreach (string provider in parts)
{
workingProviders.Add(int.Parse(provider));
}
}
while (!KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
if (idx == workingProviders.Count)
{
retryCountDown = 3;
while (retryCountDown != 0)
{
UpdateStatus($"Driver failed to start, no saved providers worked! Exiting in {retryCountDown}s", 50);
Thread.Sleep(1000);
retryCountDown -= 1;
}
Environment.Exit(0);
break;
}
providerID = workingProviders[idx];
tryLoad(providerID);
if (!KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
UpdateStatus($"Saved Provider: {providerID} failed!", 50);
Thread.Sleep(1000);
idx++;
continue;
}
else
{
UpdateStatus($"Saved Provider: {providerID} worked!", 100);
Thread.Sleep(1000);
LoadedDriver();
return;
}
}
}
string logPath = Environment.CurrentDirectory + "\\driverLoading.log";
//Thread.Sleep(750);
//{
// UpdateStatus("Starting driver with default provider #1", 50);
// string args = " /c " + Environment.CurrentDirectory + "\\Driver\\kdu.exe -prv 1 -map .\\Driver\\KsDumperDriver.sys > " + "\"" + logPath + "\"";
// ProcessStartInfo inf = new ProcessStartInfo("cmd")
// {
// Arguments = args,
// CreateNoWindow = true,
// UseShellExecute = false,
// };
// Process proc = Process.Start(inf);
// proc.WaitForExit();
//}
scan(0);
UpdateStatus("Driver Started!", 100);
Thread.Sleep(750);
LoadedDriver();
}
public static void DisableDriverBlockList()
{
RegistryKey configKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\CI\Config", true);
if (configKey == null)
{
configKey = Registry.LocalMachine.CreateSubKey(@"SYSTEM\CurrentControlSet\Control\CI\Config");
}
if (configKey != null)
{
if (configKey.GetValue("VulnerableDriverBlocklistEnable") == null)
{
configKey.SetValue("VulnerableDriverBlocklistEnable", 0);
}
}
}
bool scan(int providerID)
{
int retryCountDown = 3;
if (!KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
retryCountDown = 3;
UpdateStatus("Scanning for working providers...", 50);
while (!KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
if (providerID == maxProviders)
{
if (workingProviders.Count > 0)
{
UpdateStatus("Saving working providers!", 50);
Thread.Sleep(500);
saveProviders(providerID);
providerID = workingProviders[rnd.Next(0, workingProviders.Count - 1)];
tryLoad(providerID);
if (KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
LoadedDriver();
return true;
}
else
{
retryCountDown = 3;
while (retryCountDown != 0)
{
UpdateStatus($"Providers found, but driver not loaded! Exiting in {retryCountDown}s", 50);
Thread.Sleep(1000);
retryCountDown -= 1;
}
Environment.Exit(0);
}
}
else
{
retryCountDown = 3;
while (retryCountDown != 0)
{
UpdateStatus($"No working providers found! Exiting in {retryCountDown}s", 50);
Thread.Sleep(1000);
retryCountDown -= 1;
}
Environment.Exit(0);
}
}
if (providerID == 7)// || providerID == 29 || providerID == 28)
{
providerID++;
continue;
}
saveProviders(providerID);
tryLoad(providerID);
if (!KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
UpdateStatus($"Provider: {providerID} failed!", 50);
Thread.Sleep(1000);
providerID++;
continue;
}
else
{
UpdateStatus($"Provider: {providerID} works", 50);
workingProviders.Add(providerID);
KsDumperDriverInterface.OpenKsDumperDriver().UnloadDriver();
Thread.Sleep(1000);
providerID++;
continue;
}
}
if (!KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
while (retryCountDown != 0)
{
UpdateStatus($"Driver failed to start! Exiting in {retryCountDown}s", 0);
Thread.Sleep(1000);
retryCountDown -= 1;
}
Environment.Exit(0);
}
}
return false;
}
void tryLoad(int providerID)
{
UpdateStatus($"Starting driver with provider: {providerID}", 50);
string logPath = logFolder + $"\\driverLoading_ProviderID_{providerID}.log";
string args = " /c " + Environment.CurrentDirectory + $"\\Driver\\kdu.exe -prv {providerID} -map .\\Driver\\KsDumperDriver.sys > " + "\"" + logPath + "\"";
ProcessStartInfo inf = new ProcessStartInfo("cmd.exe")
{
Arguments = args,
CreateNoWindow = true,
UseShellExecute = false,
};
Process proc = Process.Start(inf);
proc.WaitForExit(12500);
inf = new ProcessStartInfo("cmd.exe")
{
Arguments = "/c taskkill /IM \"kdu.exe\"",
CreateNoWindow = true,
UseShellExecute = false,
};
proc = Process.Start(inf);
proc.WaitForExit(12500);
inf = new ProcessStartInfo("cmd")
{
Arguments = " /c \"taskkill /im kdu.exe\"",
CreateNoWindow = true,
UseShellExecute = false,
};
proc = Process.Start(inf);
if (!proc.WaitForExit(12500))
{
proc.Kill();
}
//}
//if (!DriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
//{
// retryCountDown = 3;
// while (retryCountDown != 0)
// {
// UpdateStatus($"Driver failed to start! Exiting in {retryCountDown}s", 0);
// Thread.Sleep(1000);
// retryCountDown -= 1;
// }
// Environment.Exit(0);
//}
//UpdateStatus("Driver Started!...", 100);
}
public SplashForm()
{
InitializeComponent();
this.FormBorderStyle = FormBorderStyle.None;
this.Region = Region.FromHrgn(Utils.CreateRoundRectRgn(0, 0, Width, Height, 10, 10));
}
private void SplashForm_Load(object sender, EventArgs e)
{
//StartProgressBar();
Task.Run(() =>
{
try
{
StartDriver();
}
catch (Exception ex)
{
return;
}
});
}
private void StartProgressBar()
{
progressBar.Style = ProgressBarStyle.Marquee;
progressBar.Show();
}
private void StopProgressBar()
{
progressBar.Style = ProgressBarStyle.Blocks;
}
public delegate void UpdateStatusDel(string txt, int progress);
public void UpdateStatus(string txt, int progress)
{
if (this.InvokeRequired)
{
this.Invoke(new UpdateStatusDel(UpdateStatus), new object[] { txt, progress });
}
else
{
this.statusLbl.Text = txt;
this.progressBar.Value = progress;
}
}
public delegate void LoadedDriverDel();
public void LoadedDriver()
{
if (this.InvokeRequired)
{
this.Invoke(new LoadedDriverDel(LoadedDriver), new object[] { });
}
else
{
StopProgressBar();
this.Close();
}
}
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == Utils.WM_NCHITTEST)
m.Result = (IntPtr)(Utils.HT_CAPTION);
}
}
}

120
KsDumper11/SplashForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,6 +1,12 @@
# KsDumper-11
https://github.com/mastercodeon314/KsDumper-11/assets/78676320/56f0a8f5-409c-4d89-8a07-989e98994745
## Whats new v1.3.2
+ Provider selction window now has a button to reset or wipe provider settings.
This means that all the providers will be reset to needing to be tested, and the default provider will be reset.
+ Fixed a bug in the provider selection window that would prevent it from being closed when opened from the main Dumper window.
![image](https://github.com/mastercodeon314/KsDumper-11/assets/78676320/9ffeb3a7-86c6-40ef-95f7-cd140b20143d)
## Whats new v1.3.1
+ Updated KDU to v1.4.0! Provider count is now 44