Init
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1259
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PipeViewer", "PipeViewer\PipeViewer.csproj", "{2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {14DCBED7-3363-40B7-854B-4C74885ACBA5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,480 @@
|
||||
namespace PipeViewer
|
||||
{
|
||||
partial class ColumnSelection
|
||||
{
|
||||
/// <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.groupBoxNamedPipe = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxReadMode = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxNumberOfLinks = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxPipeType = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxConfiguration = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxClientProcessId = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxEndpointType = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxSddl = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxName = new System.Windows.Forms.CheckBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBoxTimeStamp = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxCreationTime = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxChangeTime = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxLastWriteTime = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxLastAccessTime = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxFileCreationTime = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxIntegrityLevel = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxPermissions = new System.Windows.Forms.CheckBox();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.groupBoxSecurityDescriptor = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxGroupSid = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxOwnerSid = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxOwnerName = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxGroupName = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxDirectoryGrantedAccess = new System.Windows.Forms.CheckBox();
|
||||
this.groupBoxAccess = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxGrantedAccess = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxGrantedAccessGeneric = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxHandle = new System.Windows.Forms.CheckBox();
|
||||
this.groupBoxNamedPipe.SuspendLayout();
|
||||
this.groupBoxTimeStamp.SuspendLayout();
|
||||
this.groupBoxSecurityDescriptor.SuspendLayout();
|
||||
this.groupBoxAccess.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBoxNamedPipe
|
||||
//
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxHandle);
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxReadMode);
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxNumberOfLinks);
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxPipeType);
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxConfiguration);
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxClientProcessId);
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxEndpointType);
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxSddl);
|
||||
this.groupBoxNamedPipe.Controls.Add(this.checkBoxName);
|
||||
this.groupBoxNamedPipe.Location = new System.Drawing.Point(12, 47);
|
||||
this.groupBoxNamedPipe.Name = "groupBoxNamedPipe";
|
||||
this.groupBoxNamedPipe.Size = new System.Drawing.Size(272, 145);
|
||||
this.groupBoxNamedPipe.TabIndex = 0;
|
||||
this.groupBoxNamedPipe.TabStop = false;
|
||||
this.groupBoxNamedPipe.Text = "Named Pipe";
|
||||
//
|
||||
// checkBoxReadMode
|
||||
//
|
||||
this.checkBoxReadMode.AutoSize = true;
|
||||
this.checkBoxReadMode.Checked = true;
|
||||
this.checkBoxReadMode.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxReadMode.Location = new System.Drawing.Point(6, 99);
|
||||
this.checkBoxReadMode.Name = "checkBoxReadMode";
|
||||
this.checkBoxReadMode.Size = new System.Drawing.Size(82, 17);
|
||||
this.checkBoxReadMode.TabIndex = 7;
|
||||
this.checkBoxReadMode.Text = "Read Mode";
|
||||
this.checkBoxReadMode.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxNumberOfLinks
|
||||
//
|
||||
this.checkBoxNumberOfLinks.AutoSize = true;
|
||||
this.checkBoxNumberOfLinks.Checked = true;
|
||||
this.checkBoxNumberOfLinks.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxNumberOfLinks.Location = new System.Drawing.Point(132, 99);
|
||||
this.checkBoxNumberOfLinks.Name = "checkBoxNumberOfLinks";
|
||||
this.checkBoxNumberOfLinks.Size = new System.Drawing.Size(103, 17);
|
||||
this.checkBoxNumberOfLinks.TabIndex = 6;
|
||||
this.checkBoxNumberOfLinks.Text = "Number of Links";
|
||||
this.checkBoxNumberOfLinks.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxPipeType
|
||||
//
|
||||
this.checkBoxPipeType.AutoSize = true;
|
||||
this.checkBoxPipeType.Checked = true;
|
||||
this.checkBoxPipeType.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxPipeType.Location = new System.Drawing.Point(132, 76);
|
||||
this.checkBoxPipeType.Name = "checkBoxPipeType";
|
||||
this.checkBoxPipeType.Size = new System.Drawing.Size(74, 17);
|
||||
this.checkBoxPipeType.TabIndex = 5;
|
||||
this.checkBoxPipeType.Text = "Pipe Type";
|
||||
this.checkBoxPipeType.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxConfiguration
|
||||
//
|
||||
this.checkBoxConfiguration.AutoSize = true;
|
||||
this.checkBoxConfiguration.Checked = true;
|
||||
this.checkBoxConfiguration.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxConfiguration.Location = new System.Drawing.Point(6, 76);
|
||||
this.checkBoxConfiguration.Name = "checkBoxConfiguration";
|
||||
this.checkBoxConfiguration.Size = new System.Drawing.Size(88, 17);
|
||||
this.checkBoxConfiguration.TabIndex = 4;
|
||||
this.checkBoxConfiguration.Text = "Configuration";
|
||||
this.checkBoxConfiguration.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxClientProcessId
|
||||
//
|
||||
this.checkBoxClientProcessId.AutoSize = true;
|
||||
this.checkBoxClientProcessId.Checked = true;
|
||||
this.checkBoxClientProcessId.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxClientProcessId.Location = new System.Drawing.Point(132, 53);
|
||||
this.checkBoxClientProcessId.Name = "checkBoxClientProcessId";
|
||||
this.checkBoxClientProcessId.Size = new System.Drawing.Size(78, 17);
|
||||
this.checkBoxClientProcessId.TabIndex = 3;
|
||||
this.checkBoxClientProcessId.Text = "Client PIDs";
|
||||
this.checkBoxClientProcessId.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxEndpointType
|
||||
//
|
||||
this.checkBoxEndpointType.AutoSize = true;
|
||||
this.checkBoxEndpointType.Checked = true;
|
||||
this.checkBoxEndpointType.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxEndpointType.Location = new System.Drawing.Point(6, 53);
|
||||
this.checkBoxEndpointType.Name = "checkBoxEndpointType";
|
||||
this.checkBoxEndpointType.Size = new System.Drawing.Size(95, 17);
|
||||
this.checkBoxEndpointType.TabIndex = 2;
|
||||
this.checkBoxEndpointType.Text = "Endpoint Type";
|
||||
this.checkBoxEndpointType.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxSddl
|
||||
//
|
||||
this.checkBoxSddl.AutoSize = true;
|
||||
this.checkBoxSddl.Checked = true;
|
||||
this.checkBoxSddl.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxSddl.Location = new System.Drawing.Point(132, 30);
|
||||
this.checkBoxSddl.Name = "checkBoxSddl";
|
||||
this.checkBoxSddl.Size = new System.Drawing.Size(47, 17);
|
||||
this.checkBoxSddl.TabIndex = 1;
|
||||
this.checkBoxSddl.Text = "Sddl";
|
||||
this.checkBoxSddl.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxName
|
||||
//
|
||||
this.checkBoxName.AutoSize = true;
|
||||
this.checkBoxName.Checked = true;
|
||||
this.checkBoxName.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxName.Location = new System.Drawing.Point(7, 30);
|
||||
this.checkBoxName.Name = "checkBoxName";
|
||||
this.checkBoxName.Size = new System.Drawing.Size(54, 17);
|
||||
this.checkBoxName.TabIndex = 0;
|
||||
this.checkBoxName.Text = "Name";
|
||||
this.checkBoxName.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 19);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(243, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Select columns to appear in the Procnoid window:";
|
||||
//
|
||||
// groupBoxTimeStamp
|
||||
//
|
||||
this.groupBoxTimeStamp.Controls.Add(this.checkBoxCreationTime);
|
||||
this.groupBoxTimeStamp.Controls.Add(this.checkBoxChangeTime);
|
||||
this.groupBoxTimeStamp.Controls.Add(this.checkBoxLastWriteTime);
|
||||
this.groupBoxTimeStamp.Controls.Add(this.checkBoxLastAccessTime);
|
||||
this.groupBoxTimeStamp.Controls.Add(this.checkBoxFileCreationTime);
|
||||
this.groupBoxTimeStamp.Location = new System.Drawing.Point(12, 410);
|
||||
this.groupBoxTimeStamp.Name = "groupBoxTimeStamp";
|
||||
this.groupBoxTimeStamp.Size = new System.Drawing.Size(272, 95);
|
||||
this.groupBoxTimeStamp.TabIndex = 3;
|
||||
this.groupBoxTimeStamp.TabStop = false;
|
||||
this.groupBoxTimeStamp.Text = "Time Stamp";
|
||||
//
|
||||
// checkBoxCreationTime
|
||||
//
|
||||
this.checkBoxCreationTime.AutoSize = true;
|
||||
this.checkBoxCreationTime.Checked = true;
|
||||
this.checkBoxCreationTime.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxCreationTime.Location = new System.Drawing.Point(7, 28);
|
||||
this.checkBoxCreationTime.Name = "checkBoxCreationTime";
|
||||
this.checkBoxCreationTime.Size = new System.Drawing.Size(91, 17);
|
||||
this.checkBoxCreationTime.TabIndex = 3;
|
||||
this.checkBoxCreationTime.Text = "Creation Time";
|
||||
this.checkBoxCreationTime.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxChangeTime
|
||||
//
|
||||
this.checkBoxChangeTime.AutoSize = true;
|
||||
this.checkBoxChangeTime.Location = new System.Drawing.Point(7, 72);
|
||||
this.checkBoxChangeTime.Name = "checkBoxChangeTime";
|
||||
this.checkBoxChangeTime.Size = new System.Drawing.Size(89, 17);
|
||||
this.checkBoxChangeTime.TabIndex = 6;
|
||||
this.checkBoxChangeTime.Text = "Change Time";
|
||||
this.checkBoxChangeTime.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxLastWriteTime
|
||||
//
|
||||
this.checkBoxLastWriteTime.AutoSize = true;
|
||||
this.checkBoxLastWriteTime.Location = new System.Drawing.Point(133, 51);
|
||||
this.checkBoxLastWriteTime.Name = "checkBoxLastWriteTime";
|
||||
this.checkBoxLastWriteTime.Size = new System.Drawing.Size(100, 17);
|
||||
this.checkBoxLastWriteTime.TabIndex = 5;
|
||||
this.checkBoxLastWriteTime.Text = "Last Write Time";
|
||||
this.checkBoxLastWriteTime.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxLastAccessTime
|
||||
//
|
||||
this.checkBoxLastAccessTime.AutoSize = true;
|
||||
this.checkBoxLastAccessTime.Location = new System.Drawing.Point(7, 51);
|
||||
this.checkBoxLastAccessTime.Name = "checkBoxLastAccessTime";
|
||||
this.checkBoxLastAccessTime.Size = new System.Drawing.Size(110, 17);
|
||||
this.checkBoxLastAccessTime.TabIndex = 4;
|
||||
this.checkBoxLastAccessTime.Text = "Last Access Time";
|
||||
this.checkBoxLastAccessTime.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxFileCreationTime
|
||||
//
|
||||
this.checkBoxFileCreationTime.AutoSize = true;
|
||||
this.checkBoxFileCreationTime.Location = new System.Drawing.Point(133, 28);
|
||||
this.checkBoxFileCreationTime.Name = "checkBoxFileCreationTime";
|
||||
this.checkBoxFileCreationTime.Size = new System.Drawing.Size(110, 17);
|
||||
this.checkBoxFileCreationTime.TabIndex = 3;
|
||||
this.checkBoxFileCreationTime.Text = "File Creation Time";
|
||||
this.checkBoxFileCreationTime.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxIntegrityLevel
|
||||
//
|
||||
this.checkBoxIntegrityLevel.AutoSize = true;
|
||||
this.checkBoxIntegrityLevel.Checked = true;
|
||||
this.checkBoxIntegrityLevel.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxIntegrityLevel.Location = new System.Drawing.Point(132, 76);
|
||||
this.checkBoxIntegrityLevel.Name = "checkBoxIntegrityLevel";
|
||||
this.checkBoxIntegrityLevel.Size = new System.Drawing.Size(92, 17);
|
||||
this.checkBoxIntegrityLevel.TabIndex = 1;
|
||||
this.checkBoxIntegrityLevel.Text = "Integrity Level";
|
||||
this.checkBoxIntegrityLevel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxPermissions
|
||||
//
|
||||
this.checkBoxPermissions.AutoSize = true;
|
||||
this.checkBoxPermissions.Checked = true;
|
||||
this.checkBoxPermissions.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxPermissions.Location = new System.Drawing.Point(6, 30);
|
||||
this.checkBoxPermissions.Name = "checkBoxPermissions";
|
||||
this.checkBoxPermissions.Size = new System.Drawing.Size(81, 17);
|
||||
this.checkBoxPermissions.TabIndex = 0;
|
||||
this.checkBoxPermissions.Text = "Permissions";
|
||||
this.checkBoxPermissions.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Location = new System.Drawing.Point(113, 521);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 4;
|
||||
this.buttonOK.Text = "OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Location = new System.Drawing.Point(209, 521);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 5;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// groupBoxSecurityDescriptor
|
||||
//
|
||||
this.groupBoxSecurityDescriptor.Controls.Add(this.checkBoxGroupSid);
|
||||
this.groupBoxSecurityDescriptor.Controls.Add(this.checkBoxOwnerSid);
|
||||
this.groupBoxSecurityDescriptor.Controls.Add(this.checkBoxOwnerName);
|
||||
this.groupBoxSecurityDescriptor.Controls.Add(this.checkBoxGroupName);
|
||||
this.groupBoxSecurityDescriptor.Controls.Add(this.checkBoxPermissions);
|
||||
this.groupBoxSecurityDescriptor.Controls.Add(this.checkBoxIntegrityLevel);
|
||||
this.groupBoxSecurityDescriptor.Location = new System.Drawing.Point(12, 294);
|
||||
this.groupBoxSecurityDescriptor.Name = "groupBoxSecurityDescriptor";
|
||||
this.groupBoxSecurityDescriptor.Size = new System.Drawing.Size(272, 108);
|
||||
this.groupBoxSecurityDescriptor.TabIndex = 3;
|
||||
this.groupBoxSecurityDescriptor.TabStop = false;
|
||||
this.groupBoxSecurityDescriptor.Text = "Security Descriptor";
|
||||
//
|
||||
// checkBoxGroupSid
|
||||
//
|
||||
this.checkBoxGroupSid.AutoSize = true;
|
||||
this.checkBoxGroupSid.Location = new System.Drawing.Point(7, 76);
|
||||
this.checkBoxGroupSid.Name = "checkBoxGroupSid";
|
||||
this.checkBoxGroupSid.Size = new System.Drawing.Size(73, 17);
|
||||
this.checkBoxGroupSid.TabIndex = 3;
|
||||
this.checkBoxGroupSid.Text = "Group Sid";
|
||||
this.checkBoxGroupSid.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxOwnerSid
|
||||
//
|
||||
this.checkBoxOwnerSid.AutoSize = true;
|
||||
this.checkBoxOwnerSid.Location = new System.Drawing.Point(6, 53);
|
||||
this.checkBoxOwnerSid.Name = "checkBoxOwnerSid";
|
||||
this.checkBoxOwnerSid.Size = new System.Drawing.Size(75, 17);
|
||||
this.checkBoxOwnerSid.TabIndex = 2;
|
||||
this.checkBoxOwnerSid.Text = "Owner Sid";
|
||||
this.checkBoxOwnerSid.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxOwnerName
|
||||
//
|
||||
this.checkBoxOwnerName.AutoSize = true;
|
||||
this.checkBoxOwnerName.Checked = true;
|
||||
this.checkBoxOwnerName.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxOwnerName.Location = new System.Drawing.Point(132, 30);
|
||||
this.checkBoxOwnerName.Name = "checkBoxOwnerName";
|
||||
this.checkBoxOwnerName.Size = new System.Drawing.Size(88, 17);
|
||||
this.checkBoxOwnerName.TabIndex = 1;
|
||||
this.checkBoxOwnerName.Text = "Owner Name";
|
||||
this.checkBoxOwnerName.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxGroupName
|
||||
//
|
||||
this.checkBoxGroupName.AutoSize = true;
|
||||
this.checkBoxGroupName.Location = new System.Drawing.Point(132, 53);
|
||||
this.checkBoxGroupName.Name = "checkBoxGroupName";
|
||||
this.checkBoxGroupName.Size = new System.Drawing.Size(86, 17);
|
||||
this.checkBoxGroupName.TabIndex = 0;
|
||||
this.checkBoxGroupName.Text = "Group Name";
|
||||
this.checkBoxGroupName.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxDirectoryGrantedAccess
|
||||
//
|
||||
this.checkBoxDirectoryGrantedAccess.AutoSize = true;
|
||||
this.checkBoxDirectoryGrantedAccess.Checked = true;
|
||||
this.checkBoxDirectoryGrantedAccess.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxDirectoryGrantedAccess.Location = new System.Drawing.Point(11, 30);
|
||||
this.checkBoxDirectoryGrantedAccess.Name = "checkBoxDirectoryGrantedAccess";
|
||||
this.checkBoxDirectoryGrantedAccess.Size = new System.Drawing.Size(147, 17);
|
||||
this.checkBoxDirectoryGrantedAccess.TabIndex = 8;
|
||||
this.checkBoxDirectoryGrantedAccess.Text = "Directory Granted Access";
|
||||
this.checkBoxDirectoryGrantedAccess.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBoxAccess
|
||||
//
|
||||
this.groupBoxAccess.Controls.Add(this.checkBoxGrantedAccess);
|
||||
this.groupBoxAccess.Controls.Add(this.checkBoxDirectoryGrantedAccess);
|
||||
this.groupBoxAccess.Controls.Add(this.checkBoxGrantedAccessGeneric);
|
||||
this.groupBoxAccess.Location = new System.Drawing.Point(12, 198);
|
||||
this.groupBoxAccess.Name = "groupBoxAccess";
|
||||
this.groupBoxAccess.Size = new System.Drawing.Size(272, 91);
|
||||
this.groupBoxAccess.TabIndex = 4;
|
||||
this.groupBoxAccess.TabStop = false;
|
||||
this.groupBoxAccess.Text = "Access";
|
||||
//
|
||||
// checkBoxGrantedAccess
|
||||
//
|
||||
this.checkBoxGrantedAccess.AutoSize = true;
|
||||
this.checkBoxGrantedAccess.Checked = true;
|
||||
this.checkBoxGrantedAccess.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxGrantedAccess.Location = new System.Drawing.Point(164, 30);
|
||||
this.checkBoxGrantedAccess.Name = "checkBoxGrantedAccess";
|
||||
this.checkBoxGrantedAccess.Size = new System.Drawing.Size(102, 17);
|
||||
this.checkBoxGrantedAccess.TabIndex = 1;
|
||||
this.checkBoxGrantedAccess.Text = "Granted Access";
|
||||
this.checkBoxGrantedAccess.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxGrantedAccessGeneric
|
||||
//
|
||||
this.checkBoxGrantedAccessGeneric.AutoSize = true;
|
||||
this.checkBoxGrantedAccessGeneric.Checked = true;
|
||||
this.checkBoxGrantedAccessGeneric.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxGrantedAccessGeneric.Location = new System.Drawing.Point(11, 53);
|
||||
this.checkBoxGrantedAccessGeneric.Name = "checkBoxGrantedAccessGeneric";
|
||||
this.checkBoxGrantedAccessGeneric.Size = new System.Drawing.Size(142, 17);
|
||||
this.checkBoxGrantedAccessGeneric.TabIndex = 0;
|
||||
this.checkBoxGrantedAccessGeneric.Text = "Granted Access Generic";
|
||||
this.checkBoxGrantedAccessGeneric.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxHandle
|
||||
//
|
||||
this.checkBoxHandle.AutoSize = true;
|
||||
this.checkBoxHandle.Checked = true;
|
||||
this.checkBoxHandle.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxHandle.Location = new System.Drawing.Point(5, 122);
|
||||
this.checkBoxHandle.Name = "checkBoxHandle";
|
||||
this.checkBoxHandle.Size = new System.Drawing.Size(60, 17);
|
||||
this.checkBoxHandle.TabIndex = 8;
|
||||
this.checkBoxHandle.Text = "Handle";
|
||||
this.checkBoxHandle.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ColumnSelection
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(296, 557);
|
||||
this.Controls.Add(this.groupBoxAccess);
|
||||
this.Controls.Add(this.groupBoxSecurityDescriptor);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.groupBoxTimeStamp);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.groupBoxNamedPipe);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ColumnSelection";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "PipeViewer Column Selection";
|
||||
this.groupBoxNamedPipe.ResumeLayout(false);
|
||||
this.groupBoxNamedPipe.PerformLayout();
|
||||
this.groupBoxTimeStamp.ResumeLayout(false);
|
||||
this.groupBoxTimeStamp.PerformLayout();
|
||||
this.groupBoxSecurityDescriptor.ResumeLayout(false);
|
||||
this.groupBoxSecurityDescriptor.PerformLayout();
|
||||
this.groupBoxAccess.ResumeLayout(false);
|
||||
this.groupBoxAccess.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBoxNamedPipe;
|
||||
private System.Windows.Forms.CheckBox checkBoxEndpointType;
|
||||
private System.Windows.Forms.CheckBox checkBoxSddl;
|
||||
private System.Windows.Forms.CheckBox checkBoxName;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.GroupBox groupBoxTimeStamp;
|
||||
private System.Windows.Forms.CheckBox checkBoxChangeTime;
|
||||
private System.Windows.Forms.CheckBox checkBoxLastWriteTime;
|
||||
private System.Windows.Forms.CheckBox checkBoxLastAccessTime;
|
||||
private System.Windows.Forms.CheckBox checkBoxFileCreationTime;
|
||||
private System.Windows.Forms.CheckBox checkBoxIntegrityLevel;
|
||||
private System.Windows.Forms.CheckBox checkBoxPermissions;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.GroupBox groupBoxSecurityDescriptor;
|
||||
private System.Windows.Forms.CheckBox checkBoxGroupSid;
|
||||
private System.Windows.Forms.CheckBox checkBoxOwnerSid;
|
||||
private System.Windows.Forms.CheckBox checkBoxOwnerName;
|
||||
private System.Windows.Forms.CheckBox checkBoxGroupName;
|
||||
private System.Windows.Forms.CheckBox checkBoxCreationTime;
|
||||
private System.Windows.Forms.CheckBox checkBoxClientProcessId;
|
||||
private System.Windows.Forms.CheckBox checkBoxConfiguration;
|
||||
private System.Windows.Forms.CheckBox checkBoxPipeType;
|
||||
private System.Windows.Forms.CheckBox checkBoxDirectoryGrantedAccess;
|
||||
private System.Windows.Forms.CheckBox checkBoxReadMode;
|
||||
private System.Windows.Forms.CheckBox checkBoxNumberOfLinks;
|
||||
private System.Windows.Forms.GroupBox groupBoxAccess;
|
||||
private System.Windows.Forms.CheckBox checkBoxGrantedAccess;
|
||||
private System.Windows.Forms.CheckBox checkBoxGrantedAccessGeneric;
|
||||
private System.Windows.Forms.CheckBox checkBoxHandle;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PipeViewer
|
||||
{
|
||||
|
||||
public delegate void selectColumnsEventHandler(GroupBox i_NamedPipe, GroupBox i_Access, GroupBox i_SecurityDescriptor, GroupBox TimeStamp);
|
||||
public partial class ColumnSelection : Form
|
||||
{
|
||||
public event selectColumnsEventHandler selectColumnsUpdate;
|
||||
public ColumnSelection(System.Windows.Forms.DataGridView dataGridView1)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
List<string> visableColumns = new List<string>();
|
||||
foreach (DataGridViewColumn column in dataGridView1.Columns)
|
||||
{
|
||||
|
||||
if (column.Visible)
|
||||
{
|
||||
visableColumns.Add(column.HeaderText);
|
||||
}
|
||||
}
|
||||
|
||||
initializeCheckboxes(visableColumns);
|
||||
}
|
||||
|
||||
// The name of the CheckBox header MUST be the same as the Column header.
|
||||
private void initializeCheckboxes(List<string> visableColumns)
|
||||
{
|
||||
this.checkBoxEndpointType.Checked = visableColumns.Contains(this.checkBoxEndpointType.Text);
|
||||
this.checkBoxSddl.Checked = visableColumns.Contains(this.checkBoxSddl.Text);
|
||||
this.checkBoxName.Checked = visableColumns.Contains(this.checkBoxName.Text);
|
||||
this.checkBoxChangeTime.Checked = visableColumns.Contains(this.checkBoxChangeTime.Text);
|
||||
this.checkBoxLastWriteTime.Checked = visableColumns.Contains(this.checkBoxLastWriteTime.Text);
|
||||
this.checkBoxLastAccessTime.Checked = visableColumns.Contains(this.checkBoxLastAccessTime.Text);
|
||||
this.checkBoxFileCreationTime.Checked = visableColumns.Contains(this.checkBoxFileCreationTime.Text);
|
||||
this.checkBoxIntegrityLevel.Checked = visableColumns.Contains(this.checkBoxIntegrityLevel.Text);
|
||||
this.checkBoxPermissions.Checked = visableColumns.Contains(this.checkBoxPermissions.Text);
|
||||
this.checkBoxGroupSid.Checked = visableColumns.Contains(this.checkBoxGroupSid.Text);
|
||||
this.checkBoxOwnerSid.Checked = visableColumns.Contains(this.checkBoxOwnerSid.Text);
|
||||
this.checkBoxOwnerName.Checked = visableColumns.Contains(this.checkBoxOwnerName.Text);
|
||||
this.checkBoxGroupName.Checked = visableColumns.Contains(this.checkBoxGroupName.Text);
|
||||
this.checkBoxCreationTime.Checked = visableColumns.Contains(this.checkBoxCreationTime.Text);
|
||||
this.checkBoxClientProcessId.Checked = visableColumns.Contains(this.checkBoxClientProcessId.Text);
|
||||
this.checkBoxConfiguration.Checked = visableColumns.Contains(this.checkBoxConfiguration.Text);
|
||||
this.checkBoxPipeType.Checked = visableColumns.Contains(this.checkBoxPipeType.Text);
|
||||
this.checkBoxDirectoryGrantedAccess.Checked = visableColumns.Contains(this.checkBoxDirectoryGrantedAccess.Text);
|
||||
this.checkBoxReadMode.Checked = visableColumns.Contains(this.checkBoxReadMode.Text);
|
||||
this.checkBoxNumberOfLinks.Checked = visableColumns.Contains(this.checkBoxNumberOfLinks.Text);
|
||||
this.checkBoxGrantedAccess.Checked = visableColumns.Contains(this.checkBoxGrantedAccess.Text);
|
||||
this.checkBoxGrantedAccessGeneric.Checked = visableColumns.Contains(this.checkBoxGrantedAccessGeneric.Text);
|
||||
this.checkBoxHandle.Checked = visableColumns.Contains(this.checkBoxHandle.Text);
|
||||
}
|
||||
|
||||
|
||||
public virtual void OnselectColumnsUpdate(GroupBox i_NamedPipe, GroupBox i_Access, GroupBox i_SecurityDescriptor, GroupBox i_TimeStamp)
|
||||
{
|
||||
if (selectColumnsUpdate != null)
|
||||
{
|
||||
selectColumnsUpdate.Invoke(i_NamedPipe, i_Access, i_SecurityDescriptor, i_TimeStamp);
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnselectColumnsUpdate(groupBoxNamedPipe, groupBoxAccess, groupBoxSecurityDescriptor, groupBoxTimeStamp);
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,192 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using NtApiDotNet;
|
||||
namespace PipeViewer.Control
|
||||
{
|
||||
static class Engine
|
||||
{
|
||||
public enum NamedPipeFunctionEndType
|
||||
{
|
||||
Server,
|
||||
Client
|
||||
}
|
||||
|
||||
public static NtNamedPipeFileBase GetNamedPipeObject(string i_NamedPipe, NamedPipeFunctionEndType e_EndType)
|
||||
{
|
||||
NtNamedPipeFileBase namedPipeFileObject = null;
|
||||
|
||||
i_NamedPipe = i_NamedPipe.Replace(@"\\.\pipe\", @"\Device\NamedPipe\");
|
||||
FileShareMode ShareMode = FileShareMode.Read | FileShareMode.Write;
|
||||
FileOpenOptions Options = FileOpenOptions.SynchronousIoNonAlert;
|
||||
FileAccessRights Access = FileAccessRights.GenericRead | FileAccessRights.GenericWrite | FileAccessRights.Synchronize;
|
||||
|
||||
if (e_EndType == NamedPipeFunctionEndType.Client)
|
||||
{
|
||||
namedPipeFileObject = GetNamedPipeClientObject(i_NamedPipe, ShareMode, Options, Access);
|
||||
} else {
|
||||
namedPipeFileObject = GetNamedPipeServerObject(i_NamedPipe, ShareMode, Options, Access);
|
||||
}
|
||||
|
||||
return namedPipeFileObject;
|
||||
}
|
||||
|
||||
// https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/blob/c02ed8ba04324e54a0a188ab9877ee6aa372dfac/NtObjectManager/Cmdlets/Object/GetNtNamedPipeFileCmdlet.cs
|
||||
public static NtNamedPipeFileBase GetNamedPipeClientObject(string i_NamedPipe, FileShareMode i_ShareMode, FileOpenOptions i_Options, FileAccessRights i_Access)
|
||||
{
|
||||
NtNamedPipeFileBase namedPipeFileObject = null;
|
||||
|
||||
//i_NamedPipe = @"\Device\NamedPipe\Winsock2\CatalogChangeListener-5c0-0";
|
||||
//i_NamedPipe = @"\Device\NamedPipe\WiFiNetworkManagerTask";
|
||||
//i_NamedPipe = @"\Device\NamedPipe\initShutdown";
|
||||
|
||||
using (ObjectAttributes obj_attributes = new ObjectAttributes(i_NamedPipe))
|
||||
{
|
||||
try
|
||||
{
|
||||
// https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/issues/65
|
||||
// https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/blob/c02ed8ba04324e54a0a188ab9877ee6aa372dfac/NtObjectManager/Cmdlets/Object/GetNtNamedPipeFileCmdlet.cs
|
||||
// https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/blob/c02ed8ba04324e54a0a188ab9877ee6aa372dfac/NtObjectManager/Cmdlets/Object/GetNtFileCmdlet.cs
|
||||
namedPipeFileObject = (NtNamedPipeFileBase)NtFile.Open(obj_attributes, i_Access, i_ShareMode, i_Options);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// In the future we can write to log
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return namedPipeFileObject;
|
||||
}
|
||||
|
||||
public static NtNamedPipeFileBase GetNamedPipeServerObject(string i_NamedPipe, FileShareMode i_ShareMode, FileOpenOptions i_Options, FileAccessRights i_Access)
|
||||
{
|
||||
NtNamedPipeFileBase namedPipeFileObject = null;
|
||||
|
||||
using (ObjectAttributes obj_attributes = new ObjectAttributes(i_NamedPipe))
|
||||
{
|
||||
try
|
||||
{
|
||||
namedPipeFileObject = NtFile.CreateNamedPipe(obj_attributes, i_Access, i_ShareMode, i_Options, FileDisposition.Open, NamedPipeType.Bytestream,
|
||||
NamedPipeReadMode.ByteStream, NamedPipeCompletionMode.CompleteOperation, 0, 0, 0, NtWaitTimeout.FromMilliseconds(0));
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// In the future we can write to log
|
||||
}
|
||||
};
|
||||
|
||||
return namedPipeFileObject;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* These permissions are based on tests we did on files
|
||||
* https://learn.microsoft.com/en-us/windows/win32/secauthz/standard-access-rights
|
||||
* https://blog.cjwdev.co.uk/2011/06/28/permissions-not-included-in-net-accessrule-filesystemrights-enum/
|
||||
* https://www.installsetupconfig.com/win32programming/accesscontrollistacl2_1.html
|
||||
* https://superuser.com/questions/1752766/what-are-the-access-rules-of-standard-access-rights-and-object-specific-acces
|
||||
*
|
||||
Read: 00000000 00010010 00000000 10001001 : 00120089
|
||||
Read & Execute: 00000000 00010010 00000000 10101001 : 001200A9
|
||||
Write: 00000000 00010000 00000001 00010110 : 00100116
|
||||
Read & Write 00000000 00010010 00000001 10011111 : 0012019F
|
||||
Read & Write & Execute 00000000 00010010 00000001 10111111 : 001201BF
|
||||
Modify 00000000 00010011 00000001 10111111 : 001301BF
|
||||
Full 00000000 00011111 00000001 11111111 : 001F01FF
|
||||
|
||||
Read ("Traverse folder / execute", "List folder / Read data",
|
||||
"Read Attribute", "Read Extended Attributes", "Read permissions")
|
||||
|
||||
All advanced permissions separated:
|
||||
List folder / Read data 00000000 00010000 00000000 00000001 : 00100001 -> R (accesschk.exe)
|
||||
Read Attribute 00000000 00010000 00000000 10000000 : 00100080 -> no R (accesschk.exe)
|
||||
Read Extended Attributes 00000000 00010000 00000000 00001000 : 00100008 -> no R (accesschk.exe)
|
||||
Read permissions 00000000 00010010 00000000 00000000 : 00120000 -> no R (accesschk.exe)
|
||||
Traverse folder / execute 00000000 00010000 00000000 00100000 : 00100020 -> R (accesschk.exe)
|
||||
Create files / write data 00000000 00010000 00000000 00000010 : 00100002 -> W (accesschk.exe)
|
||||
Create folders / append data 00000000 00010000 00000000 00000100 : 00100004 -> W (accesschk.exe)
|
||||
Write attributes 00000000 00010000 00000001 00000000 : 00100100 -> no W (accesschk.exe)
|
||||
Write Extended eattributes 00000000 00010000 00000000 00010000 : 00100010 -> no W (accesschk.exe)
|
||||
Delete 00000000 00010001 00000000 00000000 : 00110000 -> W (accesschk.exe)
|
||||
Change permissions 00000000 00010100 00000000 00000000 : 00140000 -> RW (accesschk.exe)
|
||||
Change ownership 00000000 00011000 00000000 00000000 : 00180000 -> RW (accesschk.exe)
|
||||
|
||||
|
||||
R ("List folder / Read data", "Traverse folder / execute") -> 00000000 00010000 00000000 00100001 : 0x100021 (bits 0, 5, and 20)
|
||||
W ("Create files / write data", "Create folders / append data", "Delete") -> 00000000 00010001 00000000 00000110 : 0x110006 (bits 1, 2, 16, and 20)
|
||||
RW ("Change permissions", "Change ownership") -> 00000000 00011100 00000000 00000000 : 0x1c0000 (bits 18, 19, and 20)
|
||||
|
||||
* */
|
||||
enum PermissionsAccessMask
|
||||
{
|
||||
Read = 0x00120089,
|
||||
ReadAndExecute = 0x001200A9,
|
||||
Write = 0x00100116,
|
||||
ReadWrite = 0x0012019F,
|
||||
ReadWriteExecute = 0x001201BF,
|
||||
Modify = 0x001301BF,
|
||||
Full = 0x001F01FF,
|
||||
ListFolderReadData = 0x00100001,
|
||||
ReadAttribute = 0x00100080,
|
||||
ReadExtendedAttributes = 0x00100008,
|
||||
ReadPermissions = 0x00120000,
|
||||
TraverseFolderExecute = 0x00100020,
|
||||
CreateFilesWriteData = 0x00100002,
|
||||
CreateFoldersAppendData = 0x00100004,
|
||||
WriteAttributes = 0x00100100,
|
||||
WriteExtendedAttributes = 0x00100010,
|
||||
Delete = 0x00110000,
|
||||
ChangePermissions = 0x00140000,
|
||||
ChangeOwnership = 0x00180000
|
||||
}
|
||||
|
||||
|
||||
public static string ConvertAccessMaskToSimplePermissions(uint i_AccessMask)
|
||||
{
|
||||
// Eviatar: Should we consider bit number 20 ? On files it always set to 1 but on named pipe it's not.
|
||||
// We currently left it 0.
|
||||
string permissions = "";
|
||||
|
||||
//byte[] byteArray = BitConverter.GetBytes(i_AccessMask);
|
||||
byte[] binaryArray = Convert.ToString(i_AccessMask, 2)
|
||||
.PadLeft(32, '0')
|
||||
.Select(c => byte.Parse(c.ToString()))
|
||||
.Reverse()
|
||||
.ToArray();
|
||||
|
||||
if ((binaryArray[0] == 1 || binaryArray[5] == 1))// && binaryArray[20] == 1)
|
||||
{
|
||||
permissions += "R";
|
||||
}
|
||||
|
||||
if ((binaryArray[1] == 1 || binaryArray[2] == 1 || binaryArray[16] == 1))// && binaryArray[20] == 1)
|
||||
{
|
||||
permissions += "W";
|
||||
}
|
||||
|
||||
if ((binaryArray[18] == 1 || binaryArray[19] == 1) )//&& binaryArray[20] == 1)
|
||||
{
|
||||
permissions = "RW";
|
||||
}
|
||||
|
||||
//uint readPermissions = ((uint)PermissionsAccessMask.ListFolderReadData | (uint)PermissionsAccessMask.TraverseFolderExecute) & i_AccessMask;
|
||||
|
||||
return permissions;
|
||||
}
|
||||
|
||||
//public static NtFile CreateNamedPipe(string name, NtObject root, FileAccessRights desired_access,
|
||||
// FileShareMode share_access, FileOpenOptions open_options, FileDisposition disposition, NamedPipeType pipe_type,
|
||||
// NamedPipeReadMode read_mode, NamedPipeCompletionMode completion_mode, int maximum_instances, int input_quota,
|
||||
// int output_quota, NtWaitTimeout default_timeout)
|
||||
//{
|
||||
// using (ObjectAttributes obj_attributes = new ObjectAttributes(name, AttributeFlags.CaseInsensitive, root))
|
||||
// {
|
||||
// return NtFile.CreateNamedPipe(obj_attributes, desired_access, share_access, open_options, disposition, pipe_type,
|
||||
// read_mode, completion_mode, maximum_instances, input_quota, output_quota, default_timeout);
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,503 @@
|
||||
namespace PipeViewer
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <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.components = new System.ComponentModel.Container();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabelTotalNamedPipes = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripButtonRefresh = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonClear = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonFilter = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonFind = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonHighLight = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonGrid = new System.Windows.Forms.ToolStripButton();
|
||||
this.hScrollBar1 = new System.Windows.Forms.HScrollBar();
|
||||
this.contextMenuStripRightClickGridView = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.copyRowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyCellToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnIntegrityLevel = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnPermissions = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnSddl = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnClientPID = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnPipeType = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnConfiguration = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnReadMode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnNumberOfLinks = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnDirectoryGrantedAccess = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnGrantedAccess = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnGrantedAccessGeneric = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnCreationTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnOwnerSid = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnOwnerName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnGroupSid = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnEndPointType = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnHandle = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnFileCreationTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnLastAccessTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnLastWriteTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnChangeTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.contextMenuStripRightClickGridView.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.ColumnName,
|
||||
this.ColumnIntegrityLevel,
|
||||
this.ColumnPermissions,
|
||||
this.ColumnSddl,
|
||||
this.ColumnClientPID,
|
||||
this.ColumnPipeType,
|
||||
this.ColumnConfiguration,
|
||||
this.ColumnReadMode,
|
||||
this.ColumnNumberOfLinks,
|
||||
this.ColumnDirectoryGrantedAccess,
|
||||
this.ColumnGrantedAccess,
|
||||
this.ColumnGrantedAccessGeneric,
|
||||
this.ColumnCreationTime,
|
||||
this.ColumnOwnerSid,
|
||||
this.ColumnOwnerName,
|
||||
this.ColumnGroupSid,
|
||||
this.ColumnGroupName,
|
||||
this.ColumnEndPointType,
|
||||
this.ColumnHandle,
|
||||
this.ColumnFileCreationTime,
|
||||
this.ColumnLastAccessTime,
|
||||
this.ColumnLastWriteTime,
|
||||
this.ColumnChangeTime});
|
||||
this.dataGridView1.Location = new System.Drawing.Point(3, 52);
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.ReadOnly = true;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(951, 400);
|
||||
this.dataGridView1.TabIndex = 0;
|
||||
this.dataGridView1.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseClick);
|
||||
this.dataGridView1.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_ColumnHeaderMouseClick);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(955, 24);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.aboutToolStripMenuItem});
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// aboutToolStripMenuItem
|
||||
//
|
||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
|
||||
this.aboutToolStripMenuItem.Text = "About...";
|
||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabelTotalNamedPipes});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 432);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(955, 22);
|
||||
this.statusStrip1.TabIndex = 2;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// toolStripStatusLabelTotalNamedPipes
|
||||
//
|
||||
this.toolStripStatusLabelTotalNamedPipes.Name = "toolStripStatusLabelTotalNamedPipes";
|
||||
this.toolStripStatusLabelTotalNamedPipes.Size = new System.Drawing.Size(118, 17);
|
||||
this.toolStripStatusLabelTotalNamedPipes.Text = "toolStripStatusLabel1";
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripButtonRefresh,
|
||||
this.toolStripButtonClear,
|
||||
this.toolStripButtonFilter,
|
||||
this.toolStripButtonFind,
|
||||
this.toolStripButtonHighLight,
|
||||
this.toolStripButtonGrid});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(955, 25);
|
||||
this.toolStrip1.TabIndex = 3;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
// toolStripButtonRefresh
|
||||
//
|
||||
this.toolStripButtonRefresh.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonRefresh.Image = global::PipeViewer.Properties.Resources.refresh;
|
||||
this.toolStripButtonRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonRefresh.Name = "toolStripButtonRefresh";
|
||||
this.toolStripButtonRefresh.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonRefresh.Text = "Refresh";
|
||||
this.toolStripButtonRefresh.Click += new System.EventHandler(this.toolStripButtonRefresh_Click);
|
||||
//
|
||||
// toolStripButtonClear
|
||||
//
|
||||
this.toolStripButtonClear.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonClear.Image = global::PipeViewer.Properties.Resources.eraser;
|
||||
this.toolStripButtonClear.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonClear.Name = "toolStripButtonClear";
|
||||
this.toolStripButtonClear.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonClear.Text = "Clear (Ctrl+X)";
|
||||
this.toolStripButtonClear.Click += new System.EventHandler(this.toolStripButtonClear_Click);
|
||||
//
|
||||
// toolStripButtonFilter
|
||||
//
|
||||
this.toolStripButtonFilter.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonFilter.Image = global::PipeViewer.Properties.Resources.filter;
|
||||
this.toolStripButtonFilter.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonFilter.Name = "toolStripButtonFilter";
|
||||
this.toolStripButtonFilter.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonFilter.Text = "Filter (Ctrl+L)";
|
||||
this.toolStripButtonFilter.Click += new System.EventHandler(this.toolStripButtonFilter_Click);
|
||||
//
|
||||
// toolStripButtonFind
|
||||
//
|
||||
this.toolStripButtonFind.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonFind.Image = global::PipeViewer.Properties.Resources.find;
|
||||
this.toolStripButtonFind.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonFind.Name = "toolStripButtonFind";
|
||||
this.toolStripButtonFind.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonFind.Text = "Find (Ctrl+F)";
|
||||
this.toolStripButtonFind.Click += new System.EventHandler(this.toolStripButtonFind_Click);
|
||||
//
|
||||
// toolStripButtonHighLight
|
||||
//
|
||||
this.toolStripButtonHighLight.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonHighLight.Image = global::PipeViewer.Properties.Resources.highlighter;
|
||||
this.toolStripButtonHighLight.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonHighLight.Name = "toolStripButtonHighLight";
|
||||
this.toolStripButtonHighLight.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonHighLight.Text = "HighLight (Ctrk+H)";
|
||||
this.toolStripButtonHighLight.Click += new System.EventHandler(this.toolStripButtonHighLight_Click);
|
||||
//
|
||||
// toolStripButtonGrid
|
||||
//
|
||||
this.toolStripButtonGrid.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonGrid.Image = global::PipeViewer.Properties.Resources.grid_disable;
|
||||
this.toolStripButtonGrid.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonGrid.Name = "toolStripButtonGrid";
|
||||
this.toolStripButtonGrid.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonGrid.Text = "Show Grid";
|
||||
this.toolStripButtonGrid.Click += new System.EventHandler(this.toolStripButtonGrid_Click);
|
||||
//
|
||||
// hScrollBar1
|
||||
//
|
||||
this.hScrollBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.hScrollBar1.Location = new System.Drawing.Point(0, 414);
|
||||
this.hScrollBar1.Name = "hScrollBar1";
|
||||
this.hScrollBar1.Size = new System.Drawing.Size(955, 18);
|
||||
this.hScrollBar1.TabIndex = 5;
|
||||
this.hScrollBar1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hScrollBar1_Scroll);
|
||||
//
|
||||
// contextMenuStripRightClickGridView
|
||||
//
|
||||
this.contextMenuStripRightClickGridView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.copyRowToolStripMenuItem,
|
||||
this.copyCellToolStripMenuItem});
|
||||
this.contextMenuStripRightClickGridView.Name = "contextMenuStripRightClickGridView";
|
||||
this.contextMenuStripRightClickGridView.Size = new System.Drawing.Size(129, 48);
|
||||
//
|
||||
// copyRowToolStripMenuItem
|
||||
//
|
||||
this.copyRowToolStripMenuItem.Name = "copyRowToolStripMenuItem";
|
||||
this.copyRowToolStripMenuItem.Size = new System.Drawing.Size(128, 22);
|
||||
this.copyRowToolStripMenuItem.Text = "Copy Row";
|
||||
this.copyRowToolStripMenuItem.Click += new System.EventHandler(this.copyRowToolStripMenuItem_Click);
|
||||
//
|
||||
// copyCellToolStripMenuItem
|
||||
//
|
||||
this.copyCellToolStripMenuItem.Name = "copyCellToolStripMenuItem";
|
||||
this.copyCellToolStripMenuItem.Size = new System.Drawing.Size(128, 22);
|
||||
this.copyCellToolStripMenuItem.Text = "Copy Cell";
|
||||
this.copyCellToolStripMenuItem.Click += new System.EventHandler(this.copyCellToolStripMenuItem_Click);
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.saveToolStripMenuItem.Text = "Save...";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// ColumnName
|
||||
//
|
||||
this.ColumnName.HeaderText = "Name";
|
||||
this.ColumnName.Name = "ColumnName";
|
||||
this.ColumnName.ReadOnly = true;
|
||||
//
|
||||
// ColumnIntegrityLevel
|
||||
//
|
||||
this.ColumnIntegrityLevel.HeaderText = "Integrity Level";
|
||||
this.ColumnIntegrityLevel.Name = "ColumnIntegrityLevel";
|
||||
this.ColumnIntegrityLevel.ReadOnly = true;
|
||||
//
|
||||
// ColumnPermissions
|
||||
//
|
||||
this.ColumnPermissions.HeaderText = "Permissions";
|
||||
this.ColumnPermissions.Name = "ColumnPermissions";
|
||||
this.ColumnPermissions.ReadOnly = true;
|
||||
//
|
||||
// ColumnSddl
|
||||
//
|
||||
this.ColumnSddl.HeaderText = "Sddl";
|
||||
this.ColumnSddl.Name = "ColumnSddl";
|
||||
this.ColumnSddl.ReadOnly = true;
|
||||
this.ColumnSddl.Visible = false;
|
||||
//
|
||||
// ColumnClientPID
|
||||
//
|
||||
this.ColumnClientPID.HeaderText = "Client PIDs";
|
||||
this.ColumnClientPID.Name = "ColumnClientPID";
|
||||
this.ColumnClientPID.ReadOnly = true;
|
||||
//
|
||||
// ColumnPipeType
|
||||
//
|
||||
this.ColumnPipeType.HeaderText = "Pipe Type";
|
||||
this.ColumnPipeType.Name = "ColumnPipeType";
|
||||
this.ColumnPipeType.ReadOnly = true;
|
||||
//
|
||||
// ColumnConfiguration
|
||||
//
|
||||
this.ColumnConfiguration.HeaderText = "Configuration";
|
||||
this.ColumnConfiguration.Name = "ColumnConfiguration";
|
||||
this.ColumnConfiguration.ReadOnly = true;
|
||||
//
|
||||
// ColumnReadMode
|
||||
//
|
||||
this.ColumnReadMode.HeaderText = "Read Mode";
|
||||
this.ColumnReadMode.Name = "ColumnReadMode";
|
||||
this.ColumnReadMode.ReadOnly = true;
|
||||
//
|
||||
// ColumnNumberOfLinks
|
||||
//
|
||||
this.ColumnNumberOfLinks.HeaderText = "Number of Links";
|
||||
this.ColumnNumberOfLinks.Name = "ColumnNumberOfLinks";
|
||||
this.ColumnNumberOfLinks.ReadOnly = true;
|
||||
//
|
||||
// ColumnDirectoryGrantedAccess
|
||||
//
|
||||
this.ColumnDirectoryGrantedAccess.HeaderText = "Directory Granted Access";
|
||||
this.ColumnDirectoryGrantedAccess.Name = "ColumnDirectoryGrantedAccess";
|
||||
this.ColumnDirectoryGrantedAccess.ReadOnly = true;
|
||||
//
|
||||
// ColumnGrantedAccess
|
||||
//
|
||||
this.ColumnGrantedAccess.HeaderText = "Granted Access";
|
||||
this.ColumnGrantedAccess.Name = "ColumnGrantedAccess";
|
||||
this.ColumnGrantedAccess.ReadOnly = true;
|
||||
//
|
||||
// ColumnGrantedAccessGeneric
|
||||
//
|
||||
this.ColumnGrantedAccessGeneric.HeaderText = "Granted Access Generic";
|
||||
this.ColumnGrantedAccessGeneric.Name = "ColumnGrantedAccessGeneric";
|
||||
this.ColumnGrantedAccessGeneric.ReadOnly = true;
|
||||
//
|
||||
// ColumnCreationTime
|
||||
//
|
||||
this.ColumnCreationTime.HeaderText = "Creation Time";
|
||||
this.ColumnCreationTime.Name = "ColumnCreationTime";
|
||||
this.ColumnCreationTime.ReadOnly = true;
|
||||
//
|
||||
// ColumnOwnerSid
|
||||
//
|
||||
this.ColumnOwnerSid.HeaderText = "Owner Sid";
|
||||
this.ColumnOwnerSid.Name = "ColumnOwnerSid";
|
||||
this.ColumnOwnerSid.ReadOnly = true;
|
||||
this.ColumnOwnerSid.Visible = false;
|
||||
//
|
||||
// ColumnOwnerName
|
||||
//
|
||||
this.ColumnOwnerName.HeaderText = "Owner Name";
|
||||
this.ColumnOwnerName.Name = "ColumnOwnerName";
|
||||
this.ColumnOwnerName.ReadOnly = true;
|
||||
//
|
||||
// ColumnGroupSid
|
||||
//
|
||||
this.ColumnGroupSid.HeaderText = "Group Sid";
|
||||
this.ColumnGroupSid.Name = "ColumnGroupSid";
|
||||
this.ColumnGroupSid.ReadOnly = true;
|
||||
this.ColumnGroupSid.Visible = false;
|
||||
//
|
||||
// ColumnGroupName
|
||||
//
|
||||
this.ColumnGroupName.HeaderText = "Group Name";
|
||||
this.ColumnGroupName.Name = "ColumnGroupName";
|
||||
this.ColumnGroupName.ReadOnly = true;
|
||||
this.ColumnGroupName.Visible = false;
|
||||
//
|
||||
// ColumnEndPointType
|
||||
//
|
||||
this.ColumnEndPointType.HeaderText = "Endpoint Type";
|
||||
this.ColumnEndPointType.Name = "ColumnEndPointType";
|
||||
this.ColumnEndPointType.ReadOnly = true;
|
||||
//
|
||||
// ColumnHandle
|
||||
//
|
||||
this.ColumnHandle.HeaderText = "Handle";
|
||||
this.ColumnHandle.Name = "ColumnHandle";
|
||||
this.ColumnHandle.ReadOnly = true;
|
||||
//
|
||||
// ColumnFileCreationTime
|
||||
//
|
||||
this.ColumnFileCreationTime.HeaderText = "File Creation Time";
|
||||
this.ColumnFileCreationTime.Name = "ColumnFileCreationTime";
|
||||
this.ColumnFileCreationTime.ReadOnly = true;
|
||||
this.ColumnFileCreationTime.Visible = false;
|
||||
//
|
||||
// ColumnLastAccessTime
|
||||
//
|
||||
this.ColumnLastAccessTime.HeaderText = "Last Access Time";
|
||||
this.ColumnLastAccessTime.Name = "ColumnLastAccessTime";
|
||||
this.ColumnLastAccessTime.ReadOnly = true;
|
||||
this.ColumnLastAccessTime.Visible = false;
|
||||
//
|
||||
// ColumnLastWriteTime
|
||||
//
|
||||
this.ColumnLastWriteTime.HeaderText = "Last Write Time";
|
||||
this.ColumnLastWriteTime.Name = "ColumnLastWriteTime";
|
||||
this.ColumnLastWriteTime.ReadOnly = true;
|
||||
this.ColumnLastWriteTime.Visible = false;
|
||||
//
|
||||
// ColumnChangeTime
|
||||
//
|
||||
this.ColumnChangeTime.HeaderText = "Change Time";
|
||||
this.ColumnChangeTime.Name = "ColumnChangeTime";
|
||||
this.ColumnChangeTime.ReadOnly = true;
|
||||
this.ColumnChangeTime.Visible = false;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(955, 454);
|
||||
this.Controls.Add(this.hScrollBar1);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "Form1";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "PipeViewer";
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.contextMenuStripRightClickGridView.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelTotalNamedPipes;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonClear;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonFilter;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonFind;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonHighLight;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonGrid;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonRefresh;
|
||||
private System.Windows.Forms.HScrollBar hScrollBar1;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripRightClickGridView;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyRowToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyCellToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnIntegrityLevel;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnPermissions;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnSddl;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnClientPID;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnPipeType;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnConfiguration;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnReadMode;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnNumberOfLinks;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDirectoryGrantedAccess;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnGrantedAccess;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnGrantedAccessGeneric;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnCreationTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnOwnerSid;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnOwnerName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnGroupSid;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnGroupName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnEndPointType;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnHandle;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnFileCreationTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnLastAccessTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnLastWriteTime;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnChangeTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,909 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using PipeViewer.Control;
|
||||
using NtApiDotNet;
|
||||
using System.Runtime.InteropServices;
|
||||
using NamePipeViewer;
|
||||
using System.IO.Pipes;
|
||||
using System.IO;
|
||||
using System.Security.AccessControl;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PipeViewer
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
|
||||
private int m_NamedPipesNumber;
|
||||
private ListView m_LastListViewColumnFilter = new ListView();
|
||||
private ListView m_LastListViewHighlighFilter = new ListView();
|
||||
private const int SW_SHOW = 5;
|
||||
private const uint SEE_MASK_INVOKEIDLIST = 12;
|
||||
private string m_LastSearchValue;
|
||||
private bool m_IsGridButtonPressed = false;
|
||||
private static Dictionary<string, int> m_ColumnIndexes = new Dictionary<string, int>();
|
||||
private static Dictionary<int, string> m_ProcessPIDsDictionary = new Dictionary<int, string>();
|
||||
int m_CurrentRowIndexRightClick, m_CurrentColumnIndexRightClick;
|
||||
private IDictionary<string, List<ListViewItem>> m_IncludeFilterDict = new Dictionary<string, List<ListViewItem>>();
|
||||
private IDictionary<string, List<ListViewItem>> m_ExcludeFilterDict = new Dictionary<string, List<ListViewItem>>();
|
||||
private IDictionary<string, List<ListViewItem>> m_IncludeHighlightDict = new Dictionary<string, List<ListViewItem>>();
|
||||
private IDictionary<string, List<ListViewItem>> m_ExcludeHighlightDict = new Dictionary<string, List<ListViewItem>>();
|
||||
|
||||
// https://stackoverflow.com/questions/1936682/how-do-i-display-a-files-properties-dialog-from-c
|
||||
// https://stackoverflow.com/a/32503655/2153777
|
||||
// https://stackoverflow.com/a/28297300/2153777
|
||||
[DllImport("shell32.dll", CharSet = CharSet.Auto)]
|
||||
static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct SHELLEXECUTEINFO
|
||||
{
|
||||
public int cbSize;
|
||||
public uint fMask;
|
||||
public IntPtr hwnd;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string lpVerb;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string lpFile;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string lpParameters;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string lpDirectory;
|
||||
public int nShow;
|
||||
public IntPtr hInstApp;
|
||||
public IntPtr lpIDList;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string lpClass;
|
||||
public IntPtr hkeyClass;
|
||||
public uint dwHotKey;
|
||||
public IntPtr hIcon;
|
||||
public IntPtr hProcess;
|
||||
}
|
||||
|
||||
|
||||
public static bool ShowFileProperties(string Filename)
|
||||
{
|
||||
SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();
|
||||
info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);
|
||||
info.lpVerb = "properties";
|
||||
info.lpFile = Filename;
|
||||
info.nShow = SW_SHOW;
|
||||
info.fMask = SEE_MASK_INVOKEIDLIST;
|
||||
info.lpParameters = "Security";
|
||||
return ShellExecuteEx(ref info);
|
||||
}
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitalizeColumnsHeaderDictionary();
|
||||
|
||||
typeof(DataGridView).InvokeMember(
|
||||
"DoubleBuffered",
|
||||
BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty,
|
||||
null,
|
||||
dataGridView1,
|
||||
new object[] { true });
|
||||
|
||||
|
||||
//dummRowsForDebug();
|
||||
//dummyLoopRowsForDebug();
|
||||
// Task.Run(() => dummyLoopRowsForDebug());
|
||||
Task.Run(() => InitializePipeListWithProcesses());
|
||||
|
||||
//Thread t = new Thread(new ThreadStart(InitializePipeListWithProcesses));
|
||||
//t.Start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//private delegate void InitializePipeListWithProcessesCallBack();
|
||||
//private void InitializePipeListWithProcesses()
|
||||
//{
|
||||
// if (this.InvokeRequired)
|
||||
// {
|
||||
// InitializePipeListWithProcessesCallBack s = new InitializePipeListWithProcessesCallBack(InitializePipeListWithProcesses);
|
||||
// this.Invoke(s);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Process[] processCollection = Process.GetProcesses();
|
||||
// foreach (Process p in processCollection)
|
||||
// {
|
||||
// m_ProcessPIDsDictionary.Add(p.Id, p.ProcessName);
|
||||
// }
|
||||
|
||||
// initializePipeList();
|
||||
// }
|
||||
//}
|
||||
|
||||
private void InitializePipeListWithProcesses()
|
||||
{
|
||||
Process[] processCollection = Process.GetProcesses();
|
||||
foreach (Process p in processCollection)
|
||||
{
|
||||
m_ProcessPIDsDictionary.Add(p.Id, p.ProcessName);
|
||||
}
|
||||
|
||||
initializePipeList();
|
||||
}
|
||||
|
||||
private delegate void addNamedPipeToDataGridViewCallBack(string i_NamedPipe);
|
||||
|
||||
private void InitalizeColumnsHeaderDictionary()
|
||||
{
|
||||
// Populate the dictionary with the column header text and its index
|
||||
for (int i = 0; i < dataGridView1.Columns.Count; i++)
|
||||
{
|
||||
m_ColumnIndexes[dataGridView1.Columns[i].HeaderText] = i;
|
||||
}
|
||||
}
|
||||
|
||||
private void initializePipeList()
|
||||
{
|
||||
String[] listOfPipes = System.IO.Directory.GetFiles(@"\\.\pipe\");
|
||||
foreach (var namedPipe in listOfPipes)
|
||||
{
|
||||
addNamedPipeToDataGridView(namedPipe);
|
||||
}
|
||||
}
|
||||
|
||||
//private delegate void initializePipeListCallBack();
|
||||
//private void initializePipeList()
|
||||
//{
|
||||
// if (this.InvokeRequired)
|
||||
// {
|
||||
// initializePipeListCallBack s = new initializePipeListCallBack(initializePipeList);
|
||||
// this.Invoke(s);
|
||||
// }else
|
||||
// {
|
||||
// String[] listOfPipes = System.IO.Directory.GetFiles(@"\\.\pipe\");
|
||||
// foreach (var namedPipe in listOfPipes)
|
||||
// {
|
||||
// addNamedPipeToDataGridView(namedPipe);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
// https://blog.cjwdev.co.uk/2011/06/28/permissions-not-included-in-net-accessrule-filesystemrights-enum/
|
||||
private void addNamedPipeToDataGridView(string i_NamedPipe)
|
||||
{
|
||||
//i_NamedPipe = @"\\.\pipe\MyPipe";
|
||||
string permissions;
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
addNamedPipeToDataGridViewCallBack s = new addNamedPipeToDataGridViewCallBack(addNamedPipeToDataGridView);
|
||||
this.Invoke(s, i_NamedPipe);
|
||||
}
|
||||
else
|
||||
{
|
||||
DataGridViewRow row = new DataGridViewRow();
|
||||
row.CreateCells(dataGridView1);
|
||||
row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = i_NamedPipe;
|
||||
|
||||
row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
NtNamedPipeFileBase namedPipeObject = Engine.GetNamedPipeObject(i_NamedPipe, Engine.NamedPipeFunctionEndType.Client);
|
||||
if (namedPipeObject == null)
|
||||
{
|
||||
namedPipeObject = Engine.GetNamedPipeObject(i_NamedPipe, Engine.NamedPipeFunctionEndType.Server);
|
||||
}
|
||||
|
||||
// NtNamedPipeFileBase namedPipeObjectClient = Engine.GetNamedPipeClientObject(i_NamedPipe);
|
||||
// We added a check for empty name because it caused an exception with named pipe \\.\pipe\dbxsvc which wasn't NULL
|
||||
// but add partial value exist on one machine.
|
||||
|
||||
// We added try\catch because one specific bug with \\.\pipe\dbxsvc (DropBox). Maybe there is a better way to handle it?
|
||||
try
|
||||
{
|
||||
if (namedPipeObject != null)
|
||||
{
|
||||
row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = namedPipeObject.Sddl;
|
||||
|
||||
if (namedPipeObject.SecurityDescriptor.Dacl.Count != 0)
|
||||
{
|
||||
permissions = "";
|
||||
foreach (Ace dacl in namedPipeObject.SecurityDescriptor.Dacl)
|
||||
{
|
||||
permissions += dacl.Type.ToString() + " ";
|
||||
permissions += Engine.ConvertAccessMaskToSimplePermissions(dacl.Mask.Access);
|
||||
permissions += " " + dacl.Sid.Name + "; \n";
|
||||
}
|
||||
|
||||
row.Cells[m_ColumnIndexes[ColumnPermissions.HeaderText]].Value = permissions;
|
||||
}
|
||||
|
||||
row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = namedPipeObject.SecurityDescriptor.Owner.Sid.ToString();
|
||||
row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = namedPipeObject.SecurityDescriptor.Owner.Sid.Name;
|
||||
row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = namedPipeObject.SecurityDescriptor.Group.Sid.ToString();
|
||||
row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = namedPipeObject.SecurityDescriptor.Group.Sid.Name;
|
||||
row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = namedPipeObject.SecurityDescriptor.IntegrityLevel;
|
||||
row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = namedPipeObject.EndPointType;
|
||||
row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = namedPipeObject.Configuration;
|
||||
|
||||
row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = getProcessNameWithProcessPIDs(namedPipeObject);
|
||||
row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = namedPipeObject.PipeType;
|
||||
row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = namedPipeObject.ReadMode;
|
||||
row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = namedPipeObject.NumberOfLinks;
|
||||
row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = namedPipeObject.DirectoryGrantedAccess;
|
||||
row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = namedPipeObject.GrantedAccess;
|
||||
row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = namedPipeObject.GrantedAccessGeneric;
|
||||
|
||||
row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = namedPipeObject.Handle.ToString();
|
||||
row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = namedPipeObject.CreationTime;
|
||||
row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = namedPipeObject.FileCreationTime;
|
||||
row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = namedPipeObject.LastAccessTime;
|
||||
row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = namedPipeObject.LastWriteTime;
|
||||
row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = namedPipeObject.ChangeTime;
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
dataGridView1.Rows.Add(row);
|
||||
this.m_NamedPipesNumber += 1;
|
||||
this.toolStripStatusLabelTotalNamedPipes.Text = "Total Named Pipes: " + this.m_NamedPipesNumber;
|
||||
}
|
||||
}
|
||||
|
||||
private string getProcessNameWithProcessPIDs(NtNamedPipeFileBase i_NamedPipe)
|
||||
{
|
||||
var processNames = i_NamedPipe.GetUsingProcessIds()
|
||||
.Select(pid =>
|
||||
{
|
||||
if (m_ProcessPIDsDictionary.TryGetValue(pid, out string processName))
|
||||
{
|
||||
return processName + " ("+ pid.ToString() + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var p = Process.GetProcessById(pid))
|
||||
{
|
||||
m_ProcessPIDsDictionary.Add(p.Id, p.ProcessName);
|
||||
return p.ProcessName + " (" + pid.ToString() + ")";
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_ProcessPIDsDictionary.Add(pid, "<no_process>");
|
||||
return "<no_process>" + "(" + pid.ToString() + ")";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return string.Join("; ", processNames.Select(nameAndPid => nameAndPid));
|
||||
}
|
||||
|
||||
|
||||
//private string getProcessNameWithProcessPIDs(NtNamedPipeFileBase i_NamedPipe)
|
||||
//{
|
||||
// string clientPids = "";
|
||||
// foreach (int pid in i_NamedPipe.GetUsingProcessIds())
|
||||
// {
|
||||
|
||||
// if (m_ProcessPIDsDictionary.ContainsKey(pid))
|
||||
// {
|
||||
// clientPids += m_ProcessPIDsDictionary[pid] + " (" + pid.ToString() + "); ";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// using (var p = Process.GetProcessById(pid))
|
||||
// {
|
||||
// clientPids += p.ProcessName + " (" + pid.ToString() + "); ";
|
||||
// m_ProcessPIDsDictionary.Add(p.Id, p.ProcessName);
|
||||
// }
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// clientPids += "<no_process>" + " (" + pid.ToString() + "); ";
|
||||
// m_ProcessPIDsDictionary.Add(pid, "<no_process>");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// return clientPids;
|
||||
//}
|
||||
|
||||
// TODO: For testing right click on named pipe and display permissions
|
||||
//private void button1_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// string path = @"\\.\pipe\InitShutdown";
|
||||
// //path = @"\Device\NamedPipe\InitShutdown";
|
||||
// //path = @"C:\tmp";
|
||||
// //ShowFileProperties(path);
|
||||
// PermissionDialog.Show(IntPtr.Zero, path);
|
||||
//}
|
||||
|
||||
private void toolStripButtonClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
dataGridView1.Rows.Clear();
|
||||
dataGridView1.Refresh();
|
||||
m_NamedPipesNumber = 0;
|
||||
toolStripStatusLabelTotalNamedPipes.Text = "Total Named Pipes: 0";
|
||||
}
|
||||
|
||||
private void toolStripButtonGrid_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!m_IsGridButtonPressed)
|
||||
{
|
||||
toolStripButtonGrid.Image = global::PipeViewer.Properties.Resources.grid;
|
||||
m_IsGridButtonPressed = true;
|
||||
this.dataGridView1.AdvancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
toolStripButtonGrid.Image = global::PipeViewer.Properties.Resources.grid_disable;
|
||||
m_IsGridButtonPressed = false;
|
||||
this.dataGridView1.AdvancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.Single;
|
||||
}
|
||||
}
|
||||
|
||||
private void toolStripButtonFind_Click(object sender, EventArgs e)
|
||||
{
|
||||
openFindWindow();
|
||||
}
|
||||
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (keyData == (Keys.Control | Keys.L))
|
||||
{
|
||||
openColumnFilterWindow();
|
||||
result = true;
|
||||
}
|
||||
else if (keyData == (Keys.Control | Keys.B))
|
||||
{
|
||||
Font boldFont = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Bold);
|
||||
Font font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
|
||||
foreach (DataGridViewCell cell in dataGridView1.SelectedCells)
|
||||
{
|
||||
|
||||
if (!dataGridView1.Rows[cell.RowIndex].DefaultCellStyle.Font.Bold)
|
||||
{
|
||||
font = boldFont;
|
||||
}
|
||||
|
||||
dataGridView1.Rows[cell.RowIndex].DefaultCellStyle.Font = font;
|
||||
}
|
||||
|
||||
foreach (DataGridViewRow selectedRow in dataGridView1.SelectedRows)
|
||||
{
|
||||
|
||||
if (!selectedRow.DefaultCellStyle.Font.Bold)
|
||||
{
|
||||
font = boldFont;
|
||||
}
|
||||
|
||||
dataGridView1.Rows[selectedRow.Index].DefaultCellStyle.Font = font;
|
||||
|
||||
}
|
||||
result = true;
|
||||
}
|
||||
else if (keyData == (Keys.Control | Keys.F))
|
||||
{
|
||||
openFindWindow();
|
||||
result = true;
|
||||
}
|
||||
else if (keyData == (Keys.Control | Keys.H))
|
||||
{
|
||||
openHighlightWindows();
|
||||
result = true;
|
||||
}
|
||||
else if (keyData == (Keys.F3))
|
||||
{
|
||||
// We need to implement the options for the search
|
||||
FindWindow_searchForMatch(m_LastSearchValue, true, false, false);
|
||||
}
|
||||
else if (keyData == (Keys.Shift | Keys.F3))
|
||||
{
|
||||
// We need to implement the options for the search
|
||||
FindWindow_searchForMatch(m_LastSearchValue, false, false, false);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void toolStripButtonRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
dataGridView1.Rows.Clear();
|
||||
dataGridView1.Refresh();
|
||||
m_NamedPipesNumber = 0;
|
||||
Task.Run(() => initializePipeList());
|
||||
}
|
||||
|
||||
private void openFindWindow()
|
||||
{
|
||||
FormSearch findWindow = new FormSearch();
|
||||
findWindow.searchForMatch += new FormSearch.searchEventHandler(FindWindow_searchForMatch);
|
||||
findWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void FindWindow_searchForMatch(string i_SearchString, bool i_SearchDown, bool i_MatchWholeWord, bool i_MatchSensitive)
|
||||
{
|
||||
int startIndex = 0;
|
||||
m_LastSearchValue = i_SearchString;
|
||||
bool foundMatch = false;
|
||||
int step = 1;
|
||||
if (!i_SearchDown)
|
||||
{
|
||||
step = -1;
|
||||
}
|
||||
|
||||
if (dataGridView1.SelectedRows != null && dataGridView1.SelectedRows.Count > 0)
|
||||
{
|
||||
DataGridViewRow selectedRow = dataGridView1.SelectedRows[0];
|
||||
startIndex = selectedRow.Index;
|
||||
}
|
||||
|
||||
if (dataGridView1.SelectedCells != null && dataGridView1.SelectedCells.Count > 0)
|
||||
{
|
||||
DataGridViewCell selectedCell = dataGridView1.SelectedCells[0];
|
||||
startIndex = selectedCell.RowIndex;
|
||||
}
|
||||
|
||||
startIndex += step;
|
||||
for (int i = startIndex; i < dataGridView1.Rows.Count; i += step)
|
||||
{
|
||||
|
||||
if (i < 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (DataGridViewCell cell in dataGridView1.Rows[i].Cells)
|
||||
{
|
||||
// TODO: Add support in Case Sensitive, replicate to RPCMon.
|
||||
if (dataGridView1.Rows[i].Visible && cell.Value != null && cell.Value.ToString().ToLower().Contains(i_SearchString.ToLower()))
|
||||
{
|
||||
cleanAllSelectedCells();
|
||||
dataGridView1.Rows[i].Selected = true;
|
||||
foundMatch = true;
|
||||
dataGridView1.CurrentCell = dataGridView1.Rows[i].Cells[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundMatch)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!foundMatch)
|
||||
{
|
||||
MessageBox.Show(string.Format("Cannot find string \"{0}\"", i_SearchString), "PipeViewer", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanAllSelectedCells()
|
||||
{
|
||||
for (int i = 0; i < dataGridView1.SelectedCells.Count; i++)
|
||||
{
|
||||
dataGridView1.SelectedCells[i].Selected = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void openColumnSelectionWindow()
|
||||
{
|
||||
ColumnSelection columnSelection = new ColumnSelection(dataGridView1);
|
||||
columnSelection.selectColumnsUpdate += new selectColumnsEventHandler(this.ColumnSelection_selectColumnsUpdate);
|
||||
columnSelection.ShowDialog();
|
||||
}
|
||||
|
||||
private void ColumnSelection_selectColumnsUpdate(GroupBox i_NamedPipe, GroupBox i_Access, GroupBox i_SecurityDescriptor, GroupBox i_TimeStamp)
|
||||
{
|
||||
foreach (DataGridViewColumn column in dataGridView1.Columns)
|
||||
{
|
||||
modifyColumnSelection(column, i_NamedPipe);
|
||||
modifyColumnSelection(column, i_Access);
|
||||
modifyColumnSelection(column, i_SecurityDescriptor);
|
||||
modifyColumnSelection(column, i_TimeStamp);
|
||||
}
|
||||
}
|
||||
|
||||
private void modifyColumnSelection(DataGridViewColumn i_Column, GroupBox i_GroupBox)
|
||||
{
|
||||
foreach (CheckBox checkBox in i_GroupBox.Controls)
|
||||
{
|
||||
if (checkBox.Text == i_Column.HeaderText)
|
||||
{
|
||||
if (checkBox.Checked)
|
||||
{
|
||||
dataGridView1.Columns[i_Column.Index].Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
dataGridView1.Columns[i_Column.Index].Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void dataGridView1_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
|
||||
{
|
||||
if (e.Button == System.Windows.Forms.MouseButtons.Right)
|
||||
{
|
||||
openColumnSelectionWindow();
|
||||
}
|
||||
}
|
||||
|
||||
private void hScrollBar1_Scroll(object sender, ScrollEventArgs e)
|
||||
{
|
||||
// TODO: Whenimplement...
|
||||
}
|
||||
|
||||
#region Column Filter
|
||||
|
||||
private void toolStripButtonFilter_Click(object sender, EventArgs e)
|
||||
{
|
||||
openColumnFilterWindow();
|
||||
}
|
||||
|
||||
private void openColumnFilterWindow()
|
||||
{
|
||||
FormColumnFilter columnFilter = new FormColumnFilter(ref m_LastListViewColumnFilter);
|
||||
columnFilter.FilterOKUpdate += new FilterOKEventHandler(ColumnFilter_OKFilter);
|
||||
columnFilter.ShowDialog();
|
||||
}
|
||||
|
||||
private void openHighlightWindows()
|
||||
{
|
||||
FormHighlighting hightlightWindow = new FormHighlighting(ref m_LastListViewHighlighFilter);
|
||||
hightlightWindow.hightlightRowsUpdate += HightlightWindow_hightlightRowsUpdate;
|
||||
hightlightWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void HightlightWindow_hightlightRowsUpdate(ListView i_ListView)
|
||||
{
|
||||
m_LastListViewHighlighFilter = i_ListView;
|
||||
updateFilterDicts(i_ListView, Utils.eFormNames.FormHighlighFilter);
|
||||
if (m_IncludeHighlightDict.Count.Equals(0))
|
||||
{
|
||||
foreach (DataGridViewRow row in this.dataGridView1.Rows)
|
||||
{
|
||||
this.dataGridView1.Rows[row.Index].DefaultCellStyle.BackColor = Color.White;
|
||||
}
|
||||
return;
|
||||
}
|
||||
filterRowsByFilterRules(Utils.eFormNames.FormHighlighFilter);
|
||||
}
|
||||
|
||||
private void ColumnFilter_OKFilter(ListView i_ListView)
|
||||
{
|
||||
m_LastListViewColumnFilter = i_ListView;
|
||||
updateFilterDicts(i_ListView, Utils.eFormNames.FormColumnFilter);
|
||||
if (m_IncludeFilterDict.Count.Equals(0))
|
||||
{
|
||||
foreach (DataGridViewRow row in this.dataGridView1.Rows)
|
||||
{
|
||||
row.Visible = true;
|
||||
}
|
||||
}
|
||||
filterRowsByFilterRules(Utils.eFormNames.FormColumnFilter);
|
||||
}
|
||||
|
||||
private void filterRowsByFilterRules(Utils.eFormNames i_FormName)
|
||||
{
|
||||
|
||||
// TODO: What happens if one row is already Filtered\Highlight? It will hide it. Need to fix it
|
||||
// so there will be OR between the rules
|
||||
foreach (DataGridViewRow row in this.dataGridView1.Rows)
|
||||
{
|
||||
filterSingleRowByFilterRules(i_FormName, row);
|
||||
}
|
||||
}
|
||||
|
||||
private void filterSingleRowByFilterRules(Utils.eFormNames i_FormName, DataGridViewRow row)
|
||||
{
|
||||
if (i_FormName == Utils.eFormNames.FormColumnFilter)
|
||||
{
|
||||
filterRow(i_FormName, row, m_IncludeFilterDict, m_ExcludeFilterDict);
|
||||
}
|
||||
else
|
||||
{
|
||||
filterRow(i_FormName, row, m_IncludeHighlightDict, m_ExcludeHighlightDict);
|
||||
}
|
||||
}
|
||||
private void filterRow(Utils.eFormNames i_FormName, DataGridViewRow row, IDictionary<string, List<ListViewItem>> includeDict, IDictionary<string, List<ListViewItem>> excludeDict)
|
||||
{
|
||||
bool visable = false;
|
||||
foreach (var pair in excludeDict)
|
||||
{
|
||||
foreach (var rule in pair.Value)
|
||||
{
|
||||
if (checkIfShouldBeVisable(rule, row, pair.Key))
|
||||
{
|
||||
hideFilterRowBasedOnForm(i_FormName, row.Index);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!excludeDict.Count.Equals(0))
|
||||
{
|
||||
filterRowBasedOnForm(i_FormName, row.Index, "Include");
|
||||
}
|
||||
|
||||
|
||||
foreach (var pair in includeDict)
|
||||
{
|
||||
foreach (var rule in pair.Value)
|
||||
{
|
||||
if (checkIfShouldBeVisable(rule, row, pair.Key))
|
||||
{
|
||||
visable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!visable)
|
||||
{
|
||||
hideFilterRowBasedOnForm(i_FormName, row.Index);
|
||||
return;
|
||||
}
|
||||
visable = false;
|
||||
}
|
||||
if (!includeDict.Count.Equals(0))
|
||||
{
|
||||
filterRowBasedOnForm(i_FormName, row.Index, "Include");
|
||||
}
|
||||
}
|
||||
|
||||
private bool checkIfShouldBeVisable(ListViewItem rule, DataGridViewRow row, String key)
|
||||
{
|
||||
DataGridViewCell cellValueFromGridViewCell = row.Cells["Column" + rule.SubItems[0].Text];
|
||||
string valueFromFilter = rule.SubItems[(int)Utils.eFilterNames.Value].Text;
|
||||
if (rule.SubItems[(int)Utils.eFilterNames.Relation].Text == "contains")
|
||||
{
|
||||
if (row.Cells["Column" + key].Value != null && row.Cells["Column" + key].Value.ToString().Contains(rule.SubItems[(int)Utils.eFilterNames.Value].Text))
|
||||
{
|
||||
if (cellValueFromGridViewCell.Value.ToString().Contains(valueFromFilter))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (rule.SubItems[(int)Utils.eFilterNames.Relation].Text == "is")
|
||||
{
|
||||
if (cellValueFromGridViewCell.Value.ToString() == valueFromFilter)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (rule.SubItems[(int)Utils.eFilterNames.Relation].Text == "begins with")
|
||||
{
|
||||
if (cellValueFromGridViewCell.Value.ToString().StartsWith(valueFromFilter))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (rule.SubItems[(int)Utils.eFilterNames.Relation].Text == "ends with")
|
||||
{
|
||||
|
||||
if (cellValueFromGridViewCell.Value.ToString().EndsWith(valueFromFilter))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void updateFilterDicts(ListView i_ListView, Utils.eFormNames i_FormName)
|
||||
{
|
||||
if (i_FormName == Utils.eFormNames.FormColumnFilter)
|
||||
{
|
||||
m_IncludeFilterDict.Clear();
|
||||
m_ExcludeFilterDict.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_IncludeHighlightDict.Clear();
|
||||
m_ExcludeHighlightDict.Clear();
|
||||
}
|
||||
foreach (ListViewItem rule in i_ListView.Items)
|
||||
{
|
||||
if (rule.Checked)
|
||||
{
|
||||
addItemToFilterDict(rule, rule.SubItems[(int)Utils.eFilterNames.Action].Text == "Exclude", i_FormName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addItemToFilterDict(ListViewItem rule, bool addToExcludeList, Utils.eFormNames i_FormName)
|
||||
{
|
||||
if (i_FormName == Utils.eFormNames.FormColumnFilter)
|
||||
{
|
||||
if (addToExcludeList)
|
||||
{
|
||||
if (!m_ExcludeFilterDict.ContainsKey(rule.SubItems[0].Text))
|
||||
{
|
||||
m_ExcludeFilterDict.Add(rule.SubItems[0].Text, new List<ListViewItem>());
|
||||
}
|
||||
m_ExcludeFilterDict[rule.SubItems[0].Text].Add(rule);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_IncludeFilterDict.ContainsKey(rule.SubItems[0].Text))
|
||||
{
|
||||
m_IncludeFilterDict.Add(rule.SubItems[0].Text, new List<ListViewItem>());
|
||||
}
|
||||
m_IncludeFilterDict[rule.SubItems[0].Text].Add(rule);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (addToExcludeList)
|
||||
{
|
||||
if (!m_ExcludeHighlightDict.ContainsKey(rule.SubItems[0].Text))
|
||||
{
|
||||
m_ExcludeHighlightDict.Add(rule.SubItems[0].Text, new List<ListViewItem>());
|
||||
}
|
||||
m_ExcludeHighlightDict[rule.SubItems[0].Text].Add(rule);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_IncludeHighlightDict.ContainsKey(rule.SubItems[0].Text))
|
||||
{
|
||||
m_IncludeHighlightDict.Add(rule.SubItems[0].Text, new List<ListViewItem>());
|
||||
}
|
||||
m_IncludeHighlightDict[rule.SubItems[0].Text].Add(rule);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void filterRowBasedOnForm(Utils.eFormNames i_FormName, int i_RowIndex, string i_Action)
|
||||
{
|
||||
if (i_FormName == Utils.eFormNames.FormColumnFilter)
|
||||
{
|
||||
this.dataGridView1.Rows[i_RowIndex].Visible = (i_Action == "Include");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.dataGridView1.Rows[i_RowIndex].DefaultCellStyle.BackColor = getHighlighColorIfRequired(i_Action);
|
||||
}
|
||||
}
|
||||
|
||||
private void hideFilterRowBasedOnForm(Utils.eFormNames i_FormName, int i_RowIndex)
|
||||
{
|
||||
if (i_FormName == Utils.eFormNames.FormColumnFilter)
|
||||
{
|
||||
this.dataGridView1.Rows[i_RowIndex].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.dataGridView1.Rows[i_RowIndex].DefaultCellStyle.BackColor = Color.White;
|
||||
}
|
||||
}
|
||||
|
||||
private Color getHighlighColorIfRequired(string i_Action)
|
||||
{
|
||||
Color resultColor = Color.White;
|
||||
if (i_Action == "Include")
|
||||
{
|
||||
resultColor = Color.Cyan;
|
||||
}
|
||||
|
||||
return resultColor;
|
||||
}
|
||||
|
||||
#endregion Column Filter
|
||||
|
||||
private void toolStripButtonHighLight_Click(object sender, EventArgs e)
|
||||
{
|
||||
openHighlightWindows();
|
||||
}
|
||||
|
||||
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
FormAbout about = new FormAbout();
|
||||
about.ShowDialog();
|
||||
// MessageBox.Show(@"Author: Eviatar Gerzi (@g3rzi)
|
||||
//Contributers: Natan Tunik
|
||||
//Version: 1.0
|
||||
//Link: https://github.com/cyberark/PipeViewer
|
||||
//Copyright (c) 2022 CyberArk Software Ltd. All rights reserved", "About");
|
||||
}
|
||||
|
||||
#region Cell Mouse Click
|
||||
|
||||
|
||||
private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
|
||||
{
|
||||
if (e.Button == System.Windows.Forms.MouseButtons.Right)
|
||||
{
|
||||
m_CurrentRowIndexRightClick = e.RowIndex;
|
||||
m_CurrentColumnIndexRightClick = e.ColumnIndex;
|
||||
contextMenuStripRightClickGridView.Show(Cursor.Position.X, Cursor.Position.Y);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyRowToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
string copiedRow = "";
|
||||
|
||||
foreach (DataGridViewCell cell in dataGridView1.Rows[m_CurrentRowIndexRightClick].Cells)
|
||||
{
|
||||
copiedRow += cell.Value + " ";
|
||||
}
|
||||
|
||||
if (copiedRow != "")
|
||||
{
|
||||
System.Windows.Forms.Clipboard.SetText(copiedRow);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Save
|
||||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog saveDialog = new SaveFileDialog();
|
||||
saveDialog.Title = "Save results as CSV";
|
||||
saveDialog.InitialDirectory = @"c:\";
|
||||
saveDialog.Filter = "CSV files (*.csv)|*.csv|All files (*.*)|*.*";
|
||||
saveDialog.FilterIndex = 2;
|
||||
saveDialog.RestoreDirectory = true;
|
||||
if (saveDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
saveDataGridViewToCSV(saveDialog.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
// Taken from https://stackoverflow.com/a/26259909/2153777
|
||||
private void saveDataGridViewToCSV(string filename)
|
||||
{
|
||||
DataGridView tempDataGridView = dataGridView1;
|
||||
foreach (DataGridViewColumn column in tempDataGridView.Columns)
|
||||
{
|
||||
tempDataGridView.Columns[column.Index].Visible = true;
|
||||
}
|
||||
// Choose whether to write header. Use EnableWithoutHeaderText instead to omit header.
|
||||
tempDataGridView.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableAlwaysIncludeHeaderText;
|
||||
// Select all the cells
|
||||
tempDataGridView.SelectAll();
|
||||
// Copy selected cells to DataObject
|
||||
DataObject dataObject = tempDataGridView.GetClipboardContent();
|
||||
// Get the text of the DataObject, and serialize it to a file
|
||||
File.WriteAllText(filename, dataObject.GetText(TextDataFormat.CommaSeparatedValue).Replace("\n", ""));
|
||||
}
|
||||
|
||||
private void copyCellToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
string copiedCell = "";
|
||||
if (dataGridView1.Rows[m_CurrentRowIndexRightClick] != null)
|
||||
{
|
||||
if (dataGridView1.Rows[m_CurrentRowIndexRightClick].Cells[m_CurrentColumnIndexRightClick].Value != null)
|
||||
{
|
||||
copiedCell = dataGridView1.Rows[m_CurrentRowIndexRightClick].Cells[m_CurrentColumnIndexRightClick].Value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
if (copiedCell != "")
|
||||
{
|
||||
System.Windows.Forms.Clipboard.SetText(copiedCell);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
<?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>
|
||||
<metadata name="ColumnName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnIntegrityLevel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnPermissions.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnSddl.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnClientPID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnPipeType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnConfiguration.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnReadMode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnNumberOfLinks.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnDirectoryGrantedAccess.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnGrantedAccess.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnGrantedAccessGeneric.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnCreationTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnOwnerSid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnOwnerName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnGroupSid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnGroupName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnEndPointType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnHandle.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnFileCreationTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnLastAccessTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnLastWriteTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ColumnChangeTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>248, 17</value>
|
||||
</metadata>
|
||||
<metadata name="contextMenuStripRightClickGridView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>353, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,77 @@
|
||||
namespace PipeViewer
|
||||
{
|
||||
partial class FormAbout
|
||||
{
|
||||
/// <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.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox1.Location = new System.Drawing.Point(12, 19);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
this.textBox1.Size = new System.Drawing.Size(346, 179);
|
||||
this.textBox1.TabIndex = 0;
|
||||
this.textBox1.Text = "Author: Eviatar Gerzi (@g3rzi)\r\n\r\nContributers: Natan Tunik\r\n\r\nVersion: 1.0\r\n\r\n\r\n" +
|
||||
"\r\nCopyright (c) 2022 CyberArk Software Ltd. All rights reserved\r\n\r\n";
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(12, 104);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(199, 13);
|
||||
this.linkLabel1.TabIndex = 1;
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Text = "https://github.com/cyberark/PipeViewer";
|
||||
//
|
||||
// FormAbout
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(379, 210);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Name = "FormAbout";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "About";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PipeViewer
|
||||
{
|
||||
public partial class FormAbout : Form
|
||||
{
|
||||
public FormAbout()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,266 @@
|
||||
namespace PipeViewer
|
||||
{
|
||||
partial class FormColumnFilter
|
||||
{
|
||||
/// <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.label1 = new System.Windows.Forms.Label();
|
||||
this.comboBoxSearchByColumn = new System.Windows.Forms.ComboBox();
|
||||
this.comboBoxRelation = new System.Windows.Forms.ComboBox();
|
||||
this.comboBoxValue = new System.Windows.Forms.ComboBox();
|
||||
this.listViewColumnFilters = new System.Windows.Forms.ListView();
|
||||
this.columnHeaderColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderRelation = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderAction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.comboBoxAction = new System.Windows.Forms.ComboBox();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonAdd = new System.Windows.Forms.Button();
|
||||
this.buttonRemove = new System.Windows.Forms.Button();
|
||||
this.labelThen = new System.Windows.Forms.Label();
|
||||
this.buttonReset = new System.Windows.Forms.Button();
|
||||
this.buttonApply = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(205, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Display entried matching these conditions:";
|
||||
//
|
||||
// comboBoxSearchByColumn
|
||||
//
|
||||
this.comboBoxSearchByColumn.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.comboBoxSearchByColumn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxSearchByColumn.FormattingEnabled = true;
|
||||
this.comboBoxSearchByColumn.Items.AddRange(Utils.ColumnNames);
|
||||
this.comboBoxSearchByColumn.Location = new System.Drawing.Point(12, 25);
|
||||
this.comboBoxSearchByColumn.Name = "comboBoxSearchByColumn";
|
||||
this.comboBoxSearchByColumn.Size = new System.Drawing.Size(121, 21);
|
||||
this.comboBoxSearchByColumn.TabIndex = 1;
|
||||
//
|
||||
// comboBoxRelation
|
||||
//
|
||||
this.comboBoxRelation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxRelation.FormattingEnabled = true;
|
||||
this.comboBoxRelation.Items.AddRange(new object[] {
|
||||
"contains",
|
||||
"is",
|
||||
"begins with",
|
||||
"ends with"});
|
||||
this.comboBoxRelation.Location = new System.Drawing.Point(140, 26);
|
||||
this.comboBoxRelation.Name = "comboBoxRelation";
|
||||
this.comboBoxRelation.Size = new System.Drawing.Size(87, 21);
|
||||
this.comboBoxRelation.TabIndex = 2;
|
||||
//
|
||||
// comboBoxValue
|
||||
//
|
||||
this.comboBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.comboBoxValue.FormattingEnabled = true;
|
||||
this.comboBoxValue.Location = new System.Drawing.Point(244, 25);
|
||||
this.comboBoxValue.Name = "comboBoxValue";
|
||||
this.comboBoxValue.Size = new System.Drawing.Size(412, 21);
|
||||
this.comboBoxValue.TabIndex = 3;
|
||||
//
|
||||
// listViewColumnFilters
|
||||
//
|
||||
this.listViewColumnFilters.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listViewColumnFilters.CheckBoxes = true;
|
||||
this.listViewColumnFilters.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeaderColumn,
|
||||
this.columnHeaderRelation,
|
||||
this.columnHeaderValue,
|
||||
this.columnHeaderAction});
|
||||
this.listViewColumnFilters.HideSelection = false;
|
||||
this.listViewColumnFilters.Location = new System.Drawing.Point(15, 85);
|
||||
this.listViewColumnFilters.Name = "listViewColumnFilters";
|
||||
this.listViewColumnFilters.Size = new System.Drawing.Size(776, 312);
|
||||
this.listViewColumnFilters.TabIndex = 4;
|
||||
this.listViewColumnFilters.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewColumnFilters.View = System.Windows.Forms.View.Details;
|
||||
this.listViewColumnFilters.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listViewColumnFilters_MouseDoubleClick);
|
||||
//
|
||||
// columnHeaderColumn
|
||||
//
|
||||
this.columnHeaderColumn.Text = "Column";
|
||||
this.columnHeaderColumn.Width = 92;
|
||||
//
|
||||
// columnHeaderRelation
|
||||
//
|
||||
this.columnHeaderRelation.Text = "Relation";
|
||||
//
|
||||
// columnHeaderValue
|
||||
//
|
||||
this.columnHeaderValue.Text = "Value";
|
||||
//
|
||||
// columnHeaderAction
|
||||
//
|
||||
this.columnHeaderAction.Text = "Action";
|
||||
//
|
||||
// comboBoxAction
|
||||
//
|
||||
this.comboBoxAction.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.comboBoxAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxAction.FormattingEnabled = true;
|
||||
this.comboBoxAction.Items.AddRange(new object[] {
|
||||
"Include",
|
||||
"Exclude"});
|
||||
this.comboBoxAction.Location = new System.Drawing.Point(704, 25);
|
||||
this.comboBoxAction.Name = "comboBoxAction";
|
||||
this.comboBoxAction.Size = new System.Drawing.Size(84, 21);
|
||||
this.comboBoxAction.TabIndex = 5;
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonOK.Location = new System.Drawing.Point(551, 415);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 6;
|
||||
this.buttonOK.Text = "OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.Location = new System.Drawing.Point(632, 415);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 7;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// buttonAdd
|
||||
//
|
||||
this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonAdd.Location = new System.Drawing.Point(623, 56);
|
||||
this.buttonAdd.Name = "buttonAdd";
|
||||
this.buttonAdd.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonAdd.TabIndex = 8;
|
||||
this.buttonAdd.Text = "Add";
|
||||
this.buttonAdd.UseVisualStyleBackColor = true;
|
||||
this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click);
|
||||
//
|
||||
// buttonRemove
|
||||
//
|
||||
this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonRemove.Location = new System.Drawing.Point(713, 56);
|
||||
this.buttonRemove.Name = "buttonRemove";
|
||||
this.buttonRemove.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonRemove.TabIndex = 9;
|
||||
this.buttonRemove.Text = "Remove";
|
||||
this.buttonRemove.UseVisualStyleBackColor = true;
|
||||
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
|
||||
//
|
||||
// labelThen
|
||||
//
|
||||
this.labelThen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelThen.AutoSize = true;
|
||||
this.labelThen.Location = new System.Drawing.Point(662, 28);
|
||||
this.labelThen.Name = "labelThen";
|
||||
this.labelThen.Size = new System.Drawing.Size(28, 13);
|
||||
this.labelThen.TabIndex = 10;
|
||||
this.labelThen.Text = "then";
|
||||
//
|
||||
// buttonReset
|
||||
//
|
||||
this.buttonReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonReset.Location = new System.Drawing.Point(15, 56);
|
||||
this.buttonReset.Name = "buttonReset";
|
||||
this.buttonReset.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonReset.TabIndex = 11;
|
||||
this.buttonReset.Text = "Reset";
|
||||
this.buttonReset.UseVisualStyleBackColor = true;
|
||||
this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click);
|
||||
//
|
||||
// buttonApply
|
||||
//
|
||||
this.buttonApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonApply.Location = new System.Drawing.Point(716, 415);
|
||||
this.buttonApply.Name = "buttonApply";
|
||||
this.buttonApply.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonApply.TabIndex = 13;
|
||||
this.buttonApply.Text = "Apply";
|
||||
this.buttonApply.UseVisualStyleBackColor = true;
|
||||
this.buttonApply.Click += new System.EventHandler(this.buttonApply_Click);
|
||||
//
|
||||
// FormColumnFilter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.buttonApply);
|
||||
this.Controls.Add(this.buttonReset);
|
||||
this.Controls.Add(this.labelThen);
|
||||
this.Controls.Add(this.buttonRemove);
|
||||
this.Controls.Add(this.buttonAdd);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.comboBoxAction);
|
||||
this.Controls.Add(this.listViewColumnFilters);
|
||||
this.Controls.Add(this.comboBoxValue);
|
||||
this.Controls.Add(this.comboBoxRelation);
|
||||
this.Controls.Add(this.comboBoxSearchByColumn);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "FormColumnFilter";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "PipeViewer Filter";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox comboBoxSearchByColumn;
|
||||
private System.Windows.Forms.ComboBox comboBoxRelation;
|
||||
private System.Windows.Forms.ComboBox comboBoxValue;
|
||||
private System.Windows.Forms.ListView listViewColumnFilters;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderColumn;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderRelation;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderValue;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderAction;
|
||||
private System.Windows.Forms.ComboBox comboBoxAction;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonAdd;
|
||||
private System.Windows.Forms.Button buttonRemove;
|
||||
private System.Windows.Forms.Label labelThen;
|
||||
private System.Windows.Forms.Button buttonReset;
|
||||
private System.Windows.Forms.Button buttonApply;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using static System.Windows.Forms.ListViewItem;
|
||||
|
||||
namespace PipeViewer
|
||||
{
|
||||
public delegate void FilterOKEventHandler(ListView i_listViewColumnFilter);
|
||||
public partial class FormColumnFilter : Form
|
||||
{
|
||||
private DataGridView m_DataGridView;
|
||||
public event FilterOKEventHandler FilterOKUpdate;
|
||||
public FormColumnFilter(ref ListView i_ListViewColumnFilter)
|
||||
{
|
||||
InitializeComponentWrapper();
|
||||
|
||||
foreach (ListViewItem item in i_ListViewColumnFilter.Items)
|
||||
{
|
||||
ListViewItem clonedItem = (ListViewItem)item.Clone();
|
||||
this.listViewColumnFilters.Items.Add(clonedItem);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnFilterOKUpdate(ListView i_listViewColumnFilter)
|
||||
{
|
||||
bool empty = true;
|
||||
foreach (ListViewItem item in i_listViewColumnFilter.Items)
|
||||
{
|
||||
if (item.Checked)
|
||||
{
|
||||
empty = false;
|
||||
}
|
||||
}
|
||||
if (empty)
|
||||
{
|
||||
i_listViewColumnFilter = new ListView();
|
||||
}
|
||||
if (FilterOKUpdate != null)
|
||||
{
|
||||
FilterOKUpdate.Invoke(i_listViewColumnFilter);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeComponentWrapper()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.comboBoxSearchByColumn.SelectedIndex = 0;
|
||||
this.comboBoxRelation.SelectedIndex = 0;
|
||||
this.comboBoxAction.SelectedIndex = 0;
|
||||
this.listViewColumnFilters.FullRowSelect = true;
|
||||
}
|
||||
|
||||
public FormColumnFilter(ref DataGridView i_DataGridView)
|
||||
{
|
||||
m_DataGridView = i_DataGridView;
|
||||
InitializeComponentWrapper();
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
buttonAdd_Click(sender, e);
|
||||
OnFilterOKUpdate(this.listViewColumnFilters);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
// DUPLICATED function in FormHighlighting
|
||||
// Maybe create a shared function in Utils but it threw an exception for "type initializer"
|
||||
private bool isRowExist(string i_Column, string i_Relation, string i_Value, string i_Action)
|
||||
{
|
||||
bool isExist = false;
|
||||
string newRow = i_Column + i_Relation + i_Value + i_Action;
|
||||
foreach (ListViewItem item in listViewColumnFilters.Items)
|
||||
{
|
||||
string rawRow = "";
|
||||
foreach (ListViewSubItem subItem in item.SubItems)
|
||||
{
|
||||
rawRow += subItem.Text;
|
||||
}
|
||||
|
||||
if (newRow == rawRow)
|
||||
{
|
||||
isExist = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return isExist;
|
||||
}
|
||||
|
||||
private void buttonAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!isRowExist(comboBoxSearchByColumn.Text, comboBoxRelation.Text, comboBoxValue.Text, comboBoxAction.Text))
|
||||
{
|
||||
ListViewItem item = new ListViewItem(comboBoxSearchByColumn.Text);
|
||||
item.SubItems.Add(comboBoxRelation.Text);
|
||||
item.SubItems.Add(comboBoxValue.Text);
|
||||
item.SubItems.Add(comboBoxAction.Text);
|
||||
item.Checked = true;
|
||||
this.listViewColumnFilters.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonRemove_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (ListViewItem item in this.listViewColumnFilters.SelectedItems)
|
||||
{
|
||||
item.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void listViewColumnFilters_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
foreach (ListViewItem item in ((ListView)sender).SelectedItems)
|
||||
{
|
||||
this.comboBoxSearchByColumn.Text = item.SubItems[0].Text;
|
||||
this.comboBoxRelation.Text = item.SubItems[1].Text;
|
||||
this.comboBoxValue.Text = item.SubItems[2].Text;
|
||||
this.comboBoxAction.Text = item.SubItems[3].Text;
|
||||
item.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
listViewColumnFilters.Items.Clear();
|
||||
}
|
||||
|
||||
private void buttonApply_Click(object sender, EventArgs e)
|
||||
{
|
||||
buttonAdd_Click(sender, e);
|
||||
OnFilterOKUpdate(this.listViewColumnFilters);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,267 @@
|
||||
namespace PipeViewer
|
||||
{
|
||||
partial class FormHighlighting
|
||||
{
|
||||
/// <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.labelHighlight = new System.Windows.Forms.Label();
|
||||
this.comboBoxColumn = new System.Windows.Forms.ComboBox();
|
||||
this.comboBoxRelation = new System.Windows.Forms.ComboBox();
|
||||
this.comboBoxValue = new System.Windows.Forms.ComboBox();
|
||||
this.labelThen = new System.Windows.Forms.Label();
|
||||
this.comboBoxAction = new System.Windows.Forms.ComboBox();
|
||||
this.listViewHighlights = new System.Windows.Forms.ListView();
|
||||
this.columnHeaderColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderRelation = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeaderAction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonAdd = new System.Windows.Forms.Button();
|
||||
this.buttonRemove = new System.Windows.Forms.Button();
|
||||
this.buttonReset = new System.Windows.Forms.Button();
|
||||
this.buttonApply = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelHighlight
|
||||
//
|
||||
this.labelHighlight.AutoSize = true;
|
||||
this.labelHighlight.Location = new System.Drawing.Point(12, 9);
|
||||
this.labelHighlight.Name = "labelHighlight";
|
||||
this.labelHighlight.Size = new System.Drawing.Size(211, 13);
|
||||
this.labelHighlight.TabIndex = 0;
|
||||
this.labelHighlight.Text = "Highlight entries matching these conditions:";
|
||||
//
|
||||
// comboBoxColumn
|
||||
//
|
||||
this.comboBoxColumn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxColumn.FormattingEnabled = true;
|
||||
this.comboBoxColumn.Items.AddRange(Utils.ColumnNames);
|
||||
this.comboBoxColumn.Location = new System.Drawing.Point(12, 25);
|
||||
this.comboBoxColumn.Name = "comboBoxColumn";
|
||||
this.comboBoxColumn.Size = new System.Drawing.Size(121, 21);
|
||||
this.comboBoxColumn.TabIndex = 1;
|
||||
//
|
||||
// comboBoxRelation
|
||||
//
|
||||
this.comboBoxRelation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxRelation.FormattingEnabled = true;
|
||||
this.comboBoxRelation.Items.AddRange(new object[] {
|
||||
"contains",
|
||||
"is",
|
||||
"begins with",
|
||||
"ends with"});
|
||||
this.comboBoxRelation.Location = new System.Drawing.Point(139, 25);
|
||||
this.comboBoxRelation.Name = "comboBoxRelation";
|
||||
this.comboBoxRelation.Size = new System.Drawing.Size(71, 21);
|
||||
this.comboBoxRelation.TabIndex = 2;
|
||||
//
|
||||
// comboBoxValue
|
||||
//
|
||||
this.comboBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.comboBoxValue.FormattingEnabled = true;
|
||||
this.comboBoxValue.Location = new System.Drawing.Point(216, 25);
|
||||
this.comboBoxValue.Name = "comboBoxValue";
|
||||
this.comboBoxValue.Size = new System.Drawing.Size(297, 21);
|
||||
this.comboBoxValue.TabIndex = 3;
|
||||
//
|
||||
// labelThen
|
||||
//
|
||||
this.labelThen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelThen.AutoSize = true;
|
||||
this.labelThen.Location = new System.Drawing.Point(519, 25);
|
||||
this.labelThen.Name = "labelThen";
|
||||
this.labelThen.Size = new System.Drawing.Size(28, 13);
|
||||
this.labelThen.TabIndex = 4;
|
||||
this.labelThen.Text = "then";
|
||||
//
|
||||
// comboBoxAction
|
||||
//
|
||||
this.comboBoxAction.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.comboBoxAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxAction.FormattingEnabled = true;
|
||||
this.comboBoxAction.Items.AddRange(new object[] {
|
||||
"Include",
|
||||
"Exclude"});
|
||||
this.comboBoxAction.Location = new System.Drawing.Point(557, 22);
|
||||
this.comboBoxAction.Name = "comboBoxAction";
|
||||
this.comboBoxAction.Size = new System.Drawing.Size(71, 21);
|
||||
this.comboBoxAction.TabIndex = 5;
|
||||
//
|
||||
// listViewHighlights
|
||||
//
|
||||
this.listViewHighlights.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listViewHighlights.CheckBoxes = true;
|
||||
this.listViewHighlights.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeaderColumn,
|
||||
this.columnHeaderRelation,
|
||||
this.columnHeaderValue,
|
||||
this.columnHeaderAction});
|
||||
this.listViewHighlights.HideSelection = false;
|
||||
this.listViewHighlights.Location = new System.Drawing.Point(12, 85);
|
||||
this.listViewHighlights.Name = "listViewHighlights";
|
||||
this.listViewHighlights.Size = new System.Drawing.Size(619, 267);
|
||||
this.listViewHighlights.TabIndex = 6;
|
||||
this.listViewHighlights.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewHighlights.View = System.Windows.Forms.View.Details;
|
||||
this.listViewHighlights.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listViewHighlights_MouseDoubleClick);
|
||||
//
|
||||
// columnHeaderColumn
|
||||
//
|
||||
this.columnHeaderColumn.Text = "Column";
|
||||
//
|
||||
// columnHeaderRelation
|
||||
//
|
||||
this.columnHeaderRelation.Text = "Relation";
|
||||
//
|
||||
// columnHeaderValue
|
||||
//
|
||||
this.columnHeaderValue.Text = "Value";
|
||||
//
|
||||
// columnHeaderAction
|
||||
//
|
||||
this.columnHeaderAction.Text = "Action";
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonOK.Location = new System.Drawing.Point(391, 358);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 7;
|
||||
this.buttonOK.Text = "OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.Location = new System.Drawing.Point(472, 358);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 8;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// buttonAdd
|
||||
//
|
||||
this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonAdd.Location = new System.Drawing.Point(472, 56);
|
||||
this.buttonAdd.Name = "buttonAdd";
|
||||
this.buttonAdd.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonAdd.TabIndex = 9;
|
||||
this.buttonAdd.Text = "Add";
|
||||
this.buttonAdd.UseVisualStyleBackColor = true;
|
||||
this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click);
|
||||
//
|
||||
// buttonRemove
|
||||
//
|
||||
this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonRemove.Location = new System.Drawing.Point(553, 56);
|
||||
this.buttonRemove.Name = "buttonRemove";
|
||||
this.buttonRemove.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonRemove.TabIndex = 10;
|
||||
this.buttonRemove.Text = "Remove";
|
||||
this.buttonRemove.UseVisualStyleBackColor = true;
|
||||
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
|
||||
//
|
||||
// buttonReset
|
||||
//
|
||||
this.buttonReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonReset.Location = new System.Drawing.Point(12, 56);
|
||||
this.buttonReset.Name = "buttonReset";
|
||||
this.buttonReset.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonReset.TabIndex = 11;
|
||||
this.buttonReset.Text = "Reset";
|
||||
this.buttonReset.UseVisualStyleBackColor = true;
|
||||
this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click);
|
||||
//
|
||||
// buttonApply
|
||||
//
|
||||
this.buttonApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonApply.Location = new System.Drawing.Point(553, 358);
|
||||
this.buttonApply.Name = "buttonApply";
|
||||
this.buttonApply.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonApply.TabIndex = 12;
|
||||
this.buttonApply.Text = "Apply";
|
||||
this.buttonApply.UseVisualStyleBackColor = true;
|
||||
this.buttonApply.Click += new System.EventHandler(this.buttonApply_Click);
|
||||
//
|
||||
// FormHighlighting
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(643, 393);
|
||||
this.Controls.Add(this.buttonApply);
|
||||
this.Controls.Add(this.buttonReset);
|
||||
this.Controls.Add(this.buttonRemove);
|
||||
this.Controls.Add(this.buttonAdd);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.listViewHighlights);
|
||||
this.Controls.Add(this.comboBoxAction);
|
||||
this.Controls.Add(this.labelThen);
|
||||
this.Controls.Add(this.comboBoxValue);
|
||||
this.Controls.Add(this.comboBoxRelation);
|
||||
this.Controls.Add(this.comboBoxColumn);
|
||||
this.Controls.Add(this.labelHighlight);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FormHighlighting";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "PipeViewer Highlighting";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label labelHighlight;
|
||||
private System.Windows.Forms.ComboBox comboBoxColumn;
|
||||
private System.Windows.Forms.ComboBox comboBoxRelation;
|
||||
private System.Windows.Forms.ComboBox comboBoxValue;
|
||||
private System.Windows.Forms.Label labelThen;
|
||||
private System.Windows.Forms.ComboBox comboBoxAction;
|
||||
private System.Windows.Forms.ListView listViewHighlights;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonAdd;
|
||||
private System.Windows.Forms.Button buttonRemove;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderColumn;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderRelation;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderValue;
|
||||
private System.Windows.Forms.ColumnHeader columnHeaderAction;
|
||||
private System.Windows.Forms.Button buttonReset;
|
||||
private System.Windows.Forms.Button buttonApply;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using static System.Windows.Forms.ListViewItem;
|
||||
|
||||
namespace PipeViewer
|
||||
{
|
||||
public delegate void highlightRowsEventHandler(ListView i_ListView);
|
||||
public partial class FormHighlighting : Form
|
||||
{
|
||||
public event highlightRowsEventHandler hightlightRowsUpdate;
|
||||
|
||||
public FormHighlighting(ref ListView i_ListViewHighlighFilter)
|
||||
{
|
||||
InitializeComponentWrapper();
|
||||
|
||||
foreach (ListViewItem item in i_ListViewHighlighFilter.Items)
|
||||
{
|
||||
ListViewItem clonedItem = (ListViewItem)item.Clone();
|
||||
this.listViewHighlights.Items.Add(clonedItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeComponentWrapper()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.comboBoxColumn.SelectedIndex = 0;
|
||||
this.comboBoxRelation.SelectedIndex = 0;
|
||||
this.comboBoxAction.SelectedIndex = 0;
|
||||
this.listViewHighlights.FullRowSelect = true;
|
||||
}
|
||||
|
||||
|
||||
// DUPLICATED function in ColumnFilter
|
||||
// Maybe create a shared function in Utils but it threw an exception for "type initializer"
|
||||
private bool isRowExist(string i_Column, string i_Relation, string i_Value, string i_Action)
|
||||
{
|
||||
bool isExist = false;
|
||||
string newRow = i_Column + i_Relation + i_Value + i_Action;
|
||||
foreach (ListViewItem item in listViewHighlights.Items)
|
||||
{
|
||||
string rawRow = "";
|
||||
foreach (ListViewSubItem subItem in item.SubItems)
|
||||
{
|
||||
rawRow += subItem.Text;
|
||||
}
|
||||
|
||||
if (newRow == rawRow)
|
||||
{
|
||||
isExist = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return isExist;
|
||||
}
|
||||
|
||||
private void buttonAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!isRowExist(comboBoxColumn.Text, comboBoxRelation.Text, comboBoxValue.Text, comboBoxAction.Text) && !comboBoxValue.Text.Equals(""))
|
||||
{
|
||||
ListViewItem item = new ListViewItem(comboBoxColumn.Text);
|
||||
item.SubItems.Add(comboBoxRelation.Text);
|
||||
item.SubItems.Add(comboBoxValue.Text);
|
||||
item.SubItems.Add(comboBoxAction.Text);
|
||||
item.Checked = true;
|
||||
this.listViewHighlights.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonRemove_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (ListViewItem item in this.listViewHighlights.SelectedItems)
|
||||
{
|
||||
item.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void listViewHighlights_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
foreach (ListViewItem item in ((ListView)sender).SelectedItems)
|
||||
{
|
||||
this.comboBoxColumn.Text = item.SubItems[0].Text;
|
||||
this.comboBoxRelation.Text = item.SubItems[1].Text;
|
||||
this.comboBoxValue.Text = item.SubItems[2].Text;
|
||||
this.comboBoxAction.Text = item.SubItems[3].Text;
|
||||
item.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnHighlightRowsUpdate(ListView i_ListView)
|
||||
{
|
||||
if (hightlightRowsUpdate != null)
|
||||
{
|
||||
hightlightRowsUpdate.Invoke(i_ListView);
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
buttonAdd_Click(sender, e);
|
||||
OnHighlightRowsUpdate(listViewHighlights);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.listViewHighlights.Clear();
|
||||
}
|
||||
|
||||
private void buttonApply_Click(object sender, EventArgs e)
|
||||
{
|
||||
buttonAdd_Click(sender, e);
|
||||
OnHighlightRowsUpdate(listViewHighlights);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,142 @@
|
||||
namespace PipeViewer
|
||||
{
|
||||
partial class FormSearch
|
||||
{
|
||||
/// <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.label1 = new System.Windows.Forms.Label();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.buttonFind = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.groupBoxDirection = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonUp = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonDown = new System.Windows.Forms.RadioButton();
|
||||
this.groupBoxDirection.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(13, 13);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(56, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Find what:";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Location = new System.Drawing.Point(76, 13);
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Size = new System.Drawing.Size(215, 21);
|
||||
this.comboBox1.TabIndex = 1;
|
||||
//
|
||||
// buttonFind
|
||||
//
|
||||
this.buttonFind.Location = new System.Drawing.Point(314, 11);
|
||||
this.buttonFind.Name = "buttonFind";
|
||||
this.buttonFind.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonFind.TabIndex = 2;
|
||||
this.buttonFind.Text = "Find Next";
|
||||
this.buttonFind.UseVisualStyleBackColor = true;
|
||||
this.buttonFind.Click += new System.EventHandler(this.buttonFind_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Location = new System.Drawing.Point(314, 53);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 3;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// groupBoxDirection
|
||||
//
|
||||
this.groupBoxDirection.Controls.Add(this.radioButtonDown);
|
||||
this.groupBoxDirection.Controls.Add(this.radioButtonUp);
|
||||
this.groupBoxDirection.Location = new System.Drawing.Point(178, 53);
|
||||
this.groupBoxDirection.Name = "groupBoxDirection";
|
||||
this.groupBoxDirection.Size = new System.Drawing.Size(113, 63);
|
||||
this.groupBoxDirection.TabIndex = 4;
|
||||
this.groupBoxDirection.TabStop = false;
|
||||
this.groupBoxDirection.Text = "Direction";
|
||||
//
|
||||
// radioButtonUp
|
||||
//
|
||||
this.radioButtonUp.AutoSize = true;
|
||||
this.radioButtonUp.Location = new System.Drawing.Point(7, 29);
|
||||
this.radioButtonUp.Name = "radioButtonUp";
|
||||
this.radioButtonUp.Size = new System.Drawing.Size(39, 17);
|
||||
this.radioButtonUp.TabIndex = 0;
|
||||
this.radioButtonUp.Text = "Up";
|
||||
this.radioButtonUp.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonDown
|
||||
//
|
||||
this.radioButtonDown.AutoSize = true;
|
||||
this.radioButtonDown.Checked = true;
|
||||
this.radioButtonDown.Location = new System.Drawing.Point(52, 29);
|
||||
this.radioButtonDown.Name = "radioButtonDown";
|
||||
this.radioButtonDown.Size = new System.Drawing.Size(53, 17);
|
||||
this.radioButtonDown.TabIndex = 1;
|
||||
this.radioButtonDown.TabStop = true;
|
||||
this.radioButtonDown.Text = "Down";
|
||||
this.radioButtonDown.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FormSearch
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(415, 144);
|
||||
this.Controls.Add(this.groupBoxDirection);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonFind);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FormSearch";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "Find";
|
||||
this.groupBoxDirection.ResumeLayout(false);
|
||||
this.groupBoxDirection.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox comboBox1;
|
||||
private System.Windows.Forms.Button buttonFind;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.GroupBox groupBoxDirection;
|
||||
private System.Windows.Forms.RadioButton radioButtonDown;
|
||||
private System.Windows.Forms.RadioButton radioButtonUp;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PipeViewer
|
||||
{
|
||||
public partial class FormSearch : Form
|
||||
{
|
||||
public delegate void searchEventHandler(string i_SearchString, bool i_SearchDown, bool i_MatchWholeWord, bool i_MatchSensitive);
|
||||
|
||||
public event searchEventHandler searchForMatch;
|
||||
|
||||
public FormSearch()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
public virtual void OnSearchForMatch(string i_SearchString, bool i_SearchDown, bool i_MatchWholeWord, bool i_MatchSensitive)
|
||||
{
|
||||
if (searchForMatch != null)
|
||||
{
|
||||
searchForMatch.Invoke(i_SearchString, i_SearchDown, i_MatchWholeWord, i_MatchSensitive);
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonFind_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnSearchForMatch(comboBox1.Text, radioButtonDown.Checked, false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace NamePipeViewer
|
||||
{
|
||||
|
||||
// TODO: not used yet, it might help to create the properties windows to view the security of the pipes
|
||||
// and other details in a nice way.
|
||||
// https://stackoverflow.com/questions/28035464/how-does-one-invoke-the-windows-permissions-dialog-programmatically
|
||||
public static class PermissionDialog
|
||||
{
|
||||
public static bool Show(IntPtr hwndParent, string path)
|
||||
{
|
||||
if (path == null)
|
||||
throw new ArgumentNullException("path");
|
||||
|
||||
SafePidlHandle folderPidl;
|
||||
int hr;
|
||||
var a = Path.GetDirectoryName(path);
|
||||
hr = SHILCreateFromPath(Path.GetDirectoryName(path), out folderPidl, IntPtr.Zero);
|
||||
if (hr != 0)
|
||||
throw new Win32Exception(hr);
|
||||
|
||||
SafePidlHandle filePidl;
|
||||
hr = SHILCreateFromPath(path, out filePidl, IntPtr.Zero);
|
||||
if (hr != 0)
|
||||
throw new Win32Exception(hr);
|
||||
|
||||
IntPtr file = ILFindLastID(filePidl);
|
||||
|
||||
System.Runtime.InteropServices.ComTypes.IDataObject ido;
|
||||
hr = SHCreateDataObject(folderPidl, 1, new IntPtr[] { file }, null, typeof(System.Runtime.InteropServices.ComTypes.IDataObject).GUID, out ido);
|
||||
if (hr != 0)
|
||||
throw new Win32Exception(hr);
|
||||
|
||||
// if you get a 'no such interface' error here, make sure the running thread is STA
|
||||
IShellExtInit sei = (IShellExtInit)new SecPropSheetExt();
|
||||
sei.Initialize(IntPtr.Zero, ido, IntPtr.Zero);
|
||||
|
||||
IShellPropSheetExt spse = (IShellPropSheetExt)sei;
|
||||
IntPtr securityPage = IntPtr.Zero;
|
||||
spse.AddPages((p, lp) =>
|
||||
{
|
||||
securityPage = p;
|
||||
return true;
|
||||
}, IntPtr.Zero);
|
||||
|
||||
PROPSHEETHEADER psh = new PROPSHEETHEADER();
|
||||
psh.dwSize = Marshal.SizeOf(psh);
|
||||
psh.hwndParent = hwndParent;
|
||||
psh.nPages = 1;
|
||||
psh.phpage = Marshal.AllocHGlobal(IntPtr.Size);
|
||||
Marshal.WriteIntPtr(psh.phpage, securityPage);
|
||||
|
||||
// TODO: adjust title & icon here, also check out the available flags
|
||||
psh.pszCaption = "Permissions for '" + path + "'";
|
||||
|
||||
IntPtr res;
|
||||
try
|
||||
{
|
||||
res = PropertySheet(ref psh);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.FreeHGlobal(psh.phpage);
|
||||
}
|
||||
return res == IntPtr.Zero;
|
||||
}
|
||||
|
||||
private class SafePidlHandle : SafeHandle
|
||||
{
|
||||
public SafePidlHandle()
|
||||
: base(IntPtr.Zero, true)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsInvalid
|
||||
{
|
||||
get { return handle == IntPtr.Zero; }
|
||||
}
|
||||
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
if (IsInvalid)
|
||||
return false;
|
||||
|
||||
Marshal.FreeCoTaskMem(handle);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
private struct PROPSHEETHEADER
|
||||
{
|
||||
public int dwSize;
|
||||
public int dwFlags;
|
||||
public IntPtr hwndParent;
|
||||
public IntPtr hInstance;
|
||||
public IntPtr hIcon;
|
||||
public string pszCaption;
|
||||
public int nPages;
|
||||
public IntPtr nStartPage;
|
||||
public IntPtr phpage;
|
||||
public IntPtr pfnCallback;
|
||||
}
|
||||
|
||||
[DllImport("shell32.dll")]
|
||||
private static extern IntPtr ILFindLastID(SafePidlHandle pidl);
|
||||
|
||||
[DllImport("shell32.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern int SHILCreateFromPath(string pszPath, out SafePidlHandle ppidl, IntPtr rgflnOut);
|
||||
|
||||
[DllImport("shell32.dll")]
|
||||
private static extern int SHCreateDataObject(SafePidlHandle pidlFolder, int cidl, IntPtr[] apidl, System.Runtime.InteropServices.ComTypes.IDataObject pdtInner, [MarshalAs(UnmanagedType.LPStruct)] Guid riid, out System.Runtime.InteropServices.ComTypes.IDataObject ppv);
|
||||
|
||||
[DllImport("comctl32.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern IntPtr PropertySheet(ref PROPSHEETHEADER lppsph);
|
||||
|
||||
private delegate bool AddPropSheetPage(IntPtr page, IntPtr lParam);
|
||||
|
||||
[ComImport]
|
||||
[Guid("1f2e5c40-9550-11ce-99d2-00aa006e086c")] // this GUID points to the property sheet handler for permissions
|
||||
private class SecPropSheetExt
|
||||
{
|
||||
}
|
||||
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
[Guid("000214E8-0000-0000-C000-000000000046")]
|
||||
private interface IShellExtInit
|
||||
{
|
||||
void Initialize(IntPtr pidlFolder, System.Runtime.InteropServices.ComTypes.IDataObject pdtobj, IntPtr hkeyProgID);
|
||||
}
|
||||
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
[Guid("000214E9-0000-0000-C000-000000000046")]
|
||||
private interface IShellPropSheetExt
|
||||
{
|
||||
void AddPages([MarshalAs(UnmanagedType.FunctionPtr)] AddPropSheetPage pfnAddPage, IntPtr lParam);
|
||||
void ReplacePage(); // not fully defined, we don't use it
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>PipeViewer</RootNamespace>
|
||||
<AssemblyName>PipeViewer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="NtApiDotNet">
|
||||
<HintPath>..\..\..\..\karaken\cyberark\RPCMon\Packages\NtApiDotNet.1.1.33\lib\net461\NtApiDotNet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ColumnSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ColumnSelection.Designer.cs">
|
||||
<DependentUpon>ColumnSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Control\Engine.cs" />
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormAbout.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormAbout.Designer.cs">
|
||||
<DependentUpon>FormAbout.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormColumnFilter.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormColumnFilter.Designer.cs">
|
||||
<DependentUpon>FormColumnFilter.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormHighlighting.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormHighlighting.Designer.cs">
|
||||
<DependentUpon>FormHighlighting.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormSearch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormSearch.Designer.cs">
|
||||
<DependentUpon>FormSearch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PermissionDialog.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
<EmbeddedResource Include="ColumnSelection.resx">
|
||||
<DependentUpon>ColumnSelection.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormAbout.resx">
|
||||
<DependentUpon>FormAbout.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormColumnFilter.resx">
|
||||
<DependentUpon>FormColumnFilter.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormHighlighting.resx">
|
||||
<DependentUpon>FormHighlighting.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\eraser.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\filter.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\find.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\highlighter.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\grid.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\grid-disable.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\refresh.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PipeViewer
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PipeViewer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PipeViewer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("2419cedc-bf3a-4d8d-98f7-6403415beea4")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,133 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace PipeViewer.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PipeViewer.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap eraser {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("eraser", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap filter {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("filter", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap find {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("find", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap grid {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("grid", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap grid_disable {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("grid-disable", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap highlighter {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("highlighter", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap refresh {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("refresh", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
<?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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="eraser" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\eraser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="filter" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\filter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="grid" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\grid.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="grid-disable" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\grid-disable.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="highlighter" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\highlighter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="find" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\find.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace PipeViewer.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
|
After Width: | Height: | Size: 915 B |
|
After Width: | Height: | Size: 727 B |
|
After Width: | Height: | Size: 747 B |
|
After Width: | Height: | Size: 919 B |
|
After Width: | Height: | Size: 805 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,404 @@
|
||||
namespace PipeViewer
|
||||
{
|
||||
public class Utils
|
||||
{
|
||||
public enum eFormNames
|
||||
{
|
||||
FormColumnFilter,
|
||||
FormHighlighFilter
|
||||
}
|
||||
|
||||
public enum eFilterNames
|
||||
{
|
||||
Column, Relation, Value, Action
|
||||
}
|
||||
|
||||
//public enum eColumnNames
|
||||
//{
|
||||
// Name = 0,
|
||||
// IntegrityLevel,
|
||||
// Permissions,
|
||||
// Sddl,
|
||||
// ClientPID,
|
||||
// PipeType,
|
||||
// Configuration,
|
||||
// ReadMode,
|
||||
// NumberOfLinks,
|
||||
// DirectoryGrantedAccess,
|
||||
// GrantedAccess,
|
||||
// GrantedAccessGeneric,
|
||||
// CreationTime,
|
||||
// OwnerSid,
|
||||
// OwnerName,
|
||||
// GroupSid,
|
||||
// GroupName,
|
||||
// EndPointType,
|
||||
// Handle,
|
||||
// FileCreationTime,
|
||||
// LastAccessTime,
|
||||
// LastWriteTime,
|
||||
// ChangeTime,
|
||||
//}
|
||||
|
||||
public static string[] ColumnNames = new string[]
|
||||
{
|
||||
"Name",
|
||||
"IntegrityLevel",
|
||||
"Permissions",
|
||||
"SDDL",
|
||||
"ClientPID",
|
||||
"PipeType",
|
||||
"Configuration",
|
||||
"ReadMode",
|
||||
"NumberOfLinks",
|
||||
"DirectoryGrantedAccess",
|
||||
"GrantedAccess",
|
||||
"GrantedAccessGeneric",
|
||||
"OwnerSid",
|
||||
"OwnerName",
|
||||
"GroupSid",
|
||||
"GroupName",
|
||||
"EndPointType",
|
||||
"Handle",
|
||||
"CreationTime",
|
||||
"FileCreationTime",
|
||||
"LastAccessTime",
|
||||
"LastWriteTime",
|
||||
"ChangeTime"
|
||||
};
|
||||
|
||||
//static Utils()
|
||||
//{
|
||||
// m_ColumnMapToIndex = new Dictionary<string, int>();
|
||||
|
||||
// // Populate the dictionary with the values of the eColumnNames enum
|
||||
// foreach (eColumnNames column in Enum.GetValues(typeof(eColumnNames)))
|
||||
// {
|
||||
// m_ColumnMapToIndex.Add(column.ToString(), (int)column);
|
||||
// }
|
||||
//}
|
||||
|
||||
// TODO: Can we make it dynamic? like use a static constructor?
|
||||
//public static readonly Dictionary<string, int> m_ColumnMapToIndex = new Dictionary<string, int>()
|
||||
//{
|
||||
// { eColumnNames.Name.ToString(), (int)eColumnNames.Name },
|
||||
// { eColumnNames.IntegrityLevel.ToString(), (int)eColumnNames.IntegrityLevel },
|
||||
// { eColumnNames.Permissions.ToString(), (int)eColumnNames.Permissions },
|
||||
// { eColumnNames.Sddl.ToString(), (int)eColumnNames.Sddl },
|
||||
// { eColumnNames.ClientPID.ToString(), (int)eColumnNames.ClientPID },
|
||||
// { eColumnNames.PipeType.ToString(), (int)eColumnNames.PipeType },
|
||||
// { eColumnNames.Configuration.ToString(), (int)eColumnNames.Configuration },
|
||||
// { eColumnNames.ReadMode.ToString(), (int)eColumnNames.ReadMode },
|
||||
// { eColumnNames.NumberOfLinks.ToString(), (int)eColumnNames.NumberOfLinks },
|
||||
// { eColumnNames.DirectoryGrantedAccess.ToString(), (int)eColumnNames.DirectoryGrantedAccess },
|
||||
// { eColumnNames.GrantedAccess.ToString(), (int)eColumnNames.GrantedAccess },
|
||||
// { eColumnNames.GrantedAccessGeneric.ToString(), (int)eColumnNames.GrantedAccessGeneric },
|
||||
// { eColumnNames.CreationTime.ToString(), (int)eColumnNames.CreationTime },
|
||||
// { eColumnNames.OwnerSid.ToString(), (int)eColumnNames.OwnerSid },
|
||||
// { eColumnNames.OwnerName.ToString(), (int)eColumnNames.OwnerName },
|
||||
// { eColumnNames.GroupSid.ToString(), (int)eColumnNames.GroupSid },
|
||||
// { eColumnNames.GroupName.ToString(), (int)eColumnNames.GroupName },
|
||||
// { eColumnNames.EndPointType.ToString(), (int)eColumnNames.EndPointType },
|
||||
// { eColumnNames.Handle.ToString(), (int)eColumnNames.Handle },
|
||||
// { eColumnNames.FileCreationTime.ToString(), (int)eColumnNames.FileCreationTime },
|
||||
// { eColumnNames.LastAccessTime.ToString(), (int)eColumnNames.LastAccessTime },
|
||||
// { eColumnNames.LastWriteTime.ToString(), (int)eColumnNames.LastWriteTime},
|
||||
// { eColumnNames.ChangeTime.ToString(), (int)eColumnNames.ChangeTime}
|
||||
//};
|
||||
|
||||
|
||||
//public static void CreateDummyPipeForTesting()
|
||||
//{
|
||||
// // Create a new named pipe server
|
||||
// //NamedPipeServerStream pipeServer = new NamedPipeServerStream("MyPipe", PipeDirection.InOut, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous);
|
||||
// /**
|
||||
// * This will create a named pipe with the name "myPipe" and full privileges for everyone.
|
||||
// * The PipeAccessRights.FullControl flag grants full control over the named pipe to all users,
|
||||
// * including the ability to read, write, and execute.
|
||||
// * The PipeAccessRights.AccessSystemSecurity flag grants the ability to access the system security descriptor associated with the named pipe.
|
||||
// * */
|
||||
|
||||
// // get the pipe security object and add an access rule granting full control to everyone
|
||||
// PipeSecurity pipeSecurity = new PipeSecurity();
|
||||
// pipeSecurity.AddAccessRule(new PipeAccessRule("Everyone", PipeAccessRights.FullControl, AccessControlType.Allow));
|
||||
// // Set DACL to NULL.
|
||||
// /*
|
||||
// * The SetAccessRuleProtection method is used to set the DACL to NULL.
|
||||
// * The first argument specifies whether to protect the DACL from inheriting access control entries (ACEs) from the parent object.
|
||||
// * The second argument specifies whether to protect the DACL from being modified.
|
||||
// * Setting both arguments to true will set the DACL to NULL.
|
||||
// * */
|
||||
// pipeSecurity.SetAccessRuleProtection(true, true);
|
||||
|
||||
// NamedPipeServerStream pipeServer = new NamedPipeServerStream("myPipe", PipeDirection.InOut,
|
||||
// -1, PipeTransmissionMode.Byte, PipeOptions.None, 4096, 4096, pipeSecurity);
|
||||
|
||||
// // Wait for a client to connect
|
||||
// Console.WriteLine("Waiting for client connection...");
|
||||
// pipeServer.WaitForConnection();
|
||||
|
||||
// Console.WriteLine("Client connected.");
|
||||
|
||||
// // Read and write to the pipe
|
||||
// using (StreamReader reader = new StreamReader(pipeServer))
|
||||
// using (StreamWriter writer = new StreamWriter(pipeServer))
|
||||
// {
|
||||
// while (true)
|
||||
// {
|
||||
// // Read a message from the client
|
||||
// string message = reader.ReadLine();
|
||||
// Console.WriteLine("Received message: " + message);
|
||||
|
||||
// // Write a message to the client
|
||||
// writer.WriteLine("Hello from the server!");
|
||||
// writer.Flush();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//public static void dummyLoopRowsForDebug()
|
||||
//{
|
||||
// for (int i = 0; i < 1000; i++)
|
||||
// {
|
||||
// Thread.Sleep(500);
|
||||
// DataGridViewRow row = new DataGridViewRow();
|
||||
// row.CreateCells(dataGridView1);
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = @"\\.\pipe\mypipe";
|
||||
// row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = "SidName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = "GroupName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = "Medium";
|
||||
// row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = "FullDuplex";
|
||||
// row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = "lsass (1)";
|
||||
// row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = "";
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = "0x1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = "";
|
||||
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
// dataGridView1.Rows.Add(row);
|
||||
// }
|
||||
//}
|
||||
//private void dummRowsForDebug()
|
||||
//{
|
||||
// DataGridViewRow row = new DataGridViewRow();
|
||||
// row.CreateCells(dataGridView1);
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = @"\\.\pipe\mypipe";
|
||||
// row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = "SidName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = "GroupName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = "Medium";
|
||||
// row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = "FullDuplex";
|
||||
// row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = "lsass (1)";
|
||||
// row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = "";
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = "0x1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = "";
|
||||
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
// dataGridView1.Rows.Add(row);
|
||||
|
||||
// row = new DataGridViewRow();
|
||||
// row.CreateCells(dataGridView1);
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = @"\\.\pipe\mypipe";
|
||||
// row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = "SidName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = "GroupName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = "Medium";
|
||||
// row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = "FullDuplex";
|
||||
// row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = "lsass (1)";
|
||||
// row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = "0x1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = "";
|
||||
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
// dataGridView1.Rows.Add(row);
|
||||
|
||||
// row = new DataGridViewRow();
|
||||
// row.CreateCells(dataGridView1);
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = @"\\.\pipe\mypipe";
|
||||
// row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = "SidName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = "GroupName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = "Medium";
|
||||
// row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = "FullDuplex";
|
||||
// row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = "lsass (1)";
|
||||
// row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = "0x1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = "";
|
||||
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
// dataGridView1.Rows.Add(row);
|
||||
|
||||
// row = new DataGridViewRow();
|
||||
// row.CreateCells(dataGridView1);
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = @"\\.\pipe\mypipe";
|
||||
// row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = "SidName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = "GroupName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = "Medium";
|
||||
// row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = "FullDuplex";
|
||||
// row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = "lsass (1)";
|
||||
// row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = "0x1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = "";
|
||||
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
// dataGridView1.Rows.Add(row);
|
||||
|
||||
// row = new DataGridViewRow();
|
||||
// row.CreateCells(dataGridView1);
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = @"\\.\pipe\mypipe";
|
||||
// row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = "SidName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = "GroupName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = "Medium";
|
||||
// row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = "";
|
||||
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = "lsass (1)";
|
||||
// row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = "";
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = "0x1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = "";
|
||||
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
// dataGridView1.Rows.Add(row);
|
||||
|
||||
// row = new DataGridViewRow();
|
||||
// row.CreateCells(dataGridView1);
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = @"\\.\pipe\mypipe";
|
||||
// row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = "SidName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = "GroupName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = "Medium";
|
||||
// row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = "FullDuplex";
|
||||
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = "lsass (1)";
|
||||
// row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = "";
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = "0x1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = "";
|
||||
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
// dataGridView1.Rows.Add(row);
|
||||
|
||||
// row = new DataGridViewRow();
|
||||
// row.CreateCells(dataGridView1);
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnName.HeaderText]].Value = @"\\.\pipe\mypipe";
|
||||
// row.Cells[m_ColumnIndexes[ColumnSddl.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnOwnerName.HeaderText]].Value = "SidName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupSid.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGroupName.HeaderText]].Value = "GroupName";
|
||||
// row.Cells[m_ColumnIndexes[ColumnIntegrityLevel.HeaderText]].Value = "Medium";
|
||||
// row.Cells[m_ColumnIndexes[ColumnEndPointType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnConfiguration.HeaderText]].Value = "FullDuplex";
|
||||
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnClientPID.HeaderText]].Value = "lsass (1)";
|
||||
// row.Cells[m_ColumnIndexes[ColumnPipeType.HeaderText]].Value = "Client";
|
||||
// row.Cells[m_ColumnIndexes[ColumnReadMode.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnNumberOfLinks.HeaderText]].Value = "1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnDirectoryGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccess.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnGrantedAccessGeneric.HeaderText]].Value = "";
|
||||
|
||||
// row.Cells[m_ColumnIndexes[ColumnHandle.HeaderText]].Value = "0x1";
|
||||
// row.Cells[m_ColumnIndexes[ColumnCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnFileCreationTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastAccessTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnLastWriteTime.HeaderText]].Value = "";
|
||||
// row.Cells[m_ColumnIndexes[ColumnChangeTime.HeaderText]].Value = "";
|
||||
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
|
||||
// dataGridView1.Rows.Add(row);
|
||||
//}
|
||||
}
|
||||
}
|
||||