├── static
├── icon.ico
├── icon.png
├── icon.xcf
├── assets
│ ├── logo.png
│ └── gear.svg
├── ioctlpus_example.png
└── ioctlpus_example_old.png
├── ioctlpus
├── icon.ico
├── Resources
│ ├── add.png
│ ├── cog.png
│ ├── help.png
│ ├── icon.ico
│ ├── star.png
│ ├── delete.png
│ ├── door_in.png
│ ├── arrow_in.png
│ ├── arrow_out.png
│ ├── bin_closed.png
│ ├── door_out.png
│ ├── lightning.png
│ ├── database_add.png
│ ├── database_save.png
│ ├── application_bars.png
│ ├── application_edit.png
│ ├── control_end_blue.png
│ ├── application_string.png
│ ├── control_start_blue.png
│ ├── application_separator.png
│ ├── arrow_rotate_clockwise.png
│ ├── application_xp_terminal.png
│ └── arrow_rotate_anticlockwise.png
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.resx
│ └── Resources.Designer.cs
├── App.config
├── AboutForm.cs
├── app.manifest
├── Request.cs
├── packages.config
├── SettingsForm.cs
├── AboutForm.Designer.cs
├── Program.cs
├── Utilities.cs
├── MainForm.cs
├── SettingsForm.Designer.cs
├── ioctlpus.csproj
└── MainForm.Designer.cs
├── ioctlpus.sln
├── README.md
├── .gitignore
└── LICENSE
/static/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/static/icon.ico
--------------------------------------------------------------------------------
/static/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/static/icon.png
--------------------------------------------------------------------------------
/static/icon.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/static/icon.xcf
--------------------------------------------------------------------------------
/ioctlpus/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/icon.ico
--------------------------------------------------------------------------------
/static/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/static/assets/logo.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/add.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/cog.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/help.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/icon.ico
--------------------------------------------------------------------------------
/ioctlpus/Resources/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/star.png
--------------------------------------------------------------------------------
/static/ioctlpus_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/static/ioctlpus_example.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/delete.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/door_in.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/door_in.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/arrow_in.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/arrow_in.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/arrow_out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/arrow_out.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/bin_closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/bin_closed.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/door_out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/door_out.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/lightning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/lightning.png
--------------------------------------------------------------------------------
/static/ioctlpus_example_old.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/static/ioctlpus_example_old.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/database_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/database_add.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/database_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/database_save.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/application_bars.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/application_bars.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/application_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/application_edit.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/control_end_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/control_end_blue.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/application_string.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/application_string.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/control_start_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/control_start_blue.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/application_separator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/application_separator.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/arrow_rotate_clockwise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/arrow_rotate_clockwise.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/application_xp_terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/application_xp_terminal.png
--------------------------------------------------------------------------------
/ioctlpus/Resources/arrow_rotate_anticlockwise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoidSec/ioctlpus/HEAD/ioctlpus/Resources/arrow_rotate_anticlockwise.png
--------------------------------------------------------------------------------
/ioctlpus/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ioctlpus/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/static/assets/gear.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ioctlpus/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Il codice è stato generato da uno strumento.
4 | // Versione runtime:4.0.30319.42000
5 | //
6 | // Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
7 | // il codice viene rigenerato.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ioctlpus.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ioctlpus/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("IOCTLpus")]
8 | [assembly: AssemblyDescription("Perform DeviceIoControl requests")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("IOCTLpus")]
12 | [assembly: AssemblyCopyright("")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("d1b74f9a-055f-4d4f-8649-3991c041838b")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("2.4.0.0")]
35 | [assembly: AssemblyFileVersion("2.4.0.0")]
36 |
--------------------------------------------------------------------------------
/ioctlpus.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31205.134
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ioctlpus", "ioctlpus\ioctlpus.csproj", "{D1B74F9A-055F-4D4F-8649-3991C041838B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Debug|x64 = Debug|x64
12 | Release|Any CPU = Release|Any CPU
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {D1B74F9A-055F-4D4F-8649-3991C041838B}.Debug|Any CPU.ActiveCfg = Debug|x86
17 | {D1B74F9A-055F-4D4F-8649-3991C041838B}.Debug|Any CPU.Build.0 = Debug|x86
18 | {D1B74F9A-055F-4D4F-8649-3991C041838B}.Debug|x64.ActiveCfg = Debug|x64
19 | {D1B74F9A-055F-4D4F-8649-3991C041838B}.Debug|x64.Build.0 = Debug|x64
20 | {D1B74F9A-055F-4D4F-8649-3991C041838B}.Release|Any CPU.ActiveCfg = Release|x86
21 | {D1B74F9A-055F-4D4F-8649-3991C041838B}.Release|Any CPU.Build.0 = Release|x86
22 | {D1B74F9A-055F-4D4F-8649-3991C041838B}.Release|x64.ActiveCfg = Release|x64
23 | {D1B74F9A-055F-4D4F-8649-3991C041838B}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {4EF9EC0B-3C3C-48B0-AF8E-20150E76B85F}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # IOCTLpus
2 | 
3 |
4 | IOCTLpus can be used to make `DeviceIoControl` requests with arbitrary inputs (with functionality somewhat similar to Burp Repeater).
5 |
6 | Here is an example of a communication with a driver:
7 |
8 | 
9 |
10 | If no arguments is passed to IOCTLpus, it will run in GUI mode; if the `--cli` argument is passed it will run in CLI mode.
11 |
12 | Example:
13 | `--cli --guid \\.\PhysicalDrive0 --ioctl 70000 -i 32 -o 32 --input 0000000000000000000000000000000000000000000000000000000000000000`
14 |
15 | ## CLI Usage:
16 |
17 | ```
18 | --cli Run IOCTLpus in CLI mode.
19 |
20 | --guid Path/GUID of the driver to interact with.
21 |
22 | --ioctl IOCTL code.
23 |
24 | -i, --input-size (Default: 32) Input Size (decimal).
25 |
26 | -o, --output-size (Default: 32) Output Size (decimal).
27 |
28 | --input Input buffer.
29 |
30 | -r, --repeat (Default: 0) # of times to repeat the IOCTL request.
31 |
32 | --access-mask (Default: 20000000) Access Mask.
33 |
34 | --help Display this help screen.
35 |
36 | --version Display version information.
37 | ```
38 |
39 | ## Tentative Roadmap
40 |
41 | - [x] Create handles using Device Interface GUIDs in addition to symbolic links. [[GIF](https://i.imgur.com/R9WkgHG.gif)]
42 | - [ ] Persist requests to SQLite databases.
43 | - [ ] Apply filters to request history.
44 | - [ ] Integrate Kaitai Struct to define and view buffer structures ([inspired by](https://github.com/kaitai-io/kaitai_struct_webide/wiki/Features)).
45 | - [x] Develop an API to use the tool headlessly (e.g. for fuzzing).
46 | - [x] Design a cool logo.
47 |
48 | ## Similar Tools
49 |
50 | - [jerome-pouiller / ioctl](https://github.com/jerome-pouiller/ioctl)
51 | - [xst3nz / ioctlbf](https://code.google.com/archive/p/ioctlbf/)
52 |
53 | ## Developers
54 |
55 | - Developed in 2017 by Jackson Thuraisamy [@Jackson_T](https://twitter.com/jackson_t)
56 | - Updated in 2021 by Paolo Stagno [@Void_Sec](https://twitter.com/Void_Sec)
57 |
58 | ## Licence
59 |
60 | [GPLv3](https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3))
61 |
--------------------------------------------------------------------------------
/ioctlpus/AboutForm.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Windows.Forms;
3 |
4 | namespace ioctlpus
5 | {
6 | public partial class AboutForm : Form
7 | {
8 | public AboutForm()
9 | {
10 | InitializeComponent();
11 | InitializeOSC();
12 | // load about text and assembly version, instead of having it hardcoded
13 | string version = Application.ProductVersion;
14 | lblAbout.Text = "ioctlpus " + version + "\nCreated in 2017 by Jackson Thuraisamy(@Jackson_T)\nUpdated and mantained by Paolo Stagno(@Void_Sec)\n\nDedicated to my partner and family for putting up with me.";
15 | }
16 |
17 | private void InitializeOSC()
18 | {
19 | // populate list of open source components
20 | List components = new List();
21 |
22 | components.Add(new OpenSourceComponent("HexBox", "Bernhard Elbl", "MIT"));
23 | components.Add(new OpenSourceComponent("HexBox (highlighting)", "Paul Sanford", "MIT"));
24 | components.Add(new OpenSourceComponent("ObjectListView", "Phillip Piper", "GPLv3"));
25 | components.Add(new OpenSourceComponent("famfamfam Silk Icons", "Mark James", "CC BY 3.0"));
26 | components.Add(new OpenSourceComponent("CRC16 Function", "NullFX", "CC BY-NC-SA 3.0"));
27 |
28 | olvComponents.SetObjects(components);
29 | }
30 | }
31 |
32 | public class OpenSourceComponent
33 | {
34 | private string component;
35 | private string author;
36 | private string licence;
37 |
38 | public OpenSourceComponent(string component, string author, string licence)
39 | {
40 | this.Component = component;
41 | this.Author = author;
42 | this.Licence = licence;
43 | }
44 |
45 | public string Component
46 | {
47 | get
48 | {
49 | return component;
50 | }
51 |
52 | set
53 | {
54 | component = value;
55 | }
56 | }
57 |
58 | public string Author
59 | {
60 | get
61 | {
62 | return author;
63 | }
64 |
65 | set
66 | {
67 | author = value;
68 | }
69 | }
70 |
71 | public string Licence
72 | {
73 | get
74 | {
75 | return licence;
76 | }
77 |
78 | set
79 | {
80 | licence = value;
81 | }
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/ioctlpus/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
48 |
55 |
56 |
70 |
--------------------------------------------------------------------------------
/ioctlpus/Request.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 |
5 | namespace ioctlpus
6 | {
7 | public class Request
8 | {
9 | private string requestName;
10 | private string devicePath;
11 | private uint ioctl;
12 | private byte[] preCallInput;
13 | private byte[] postCallOutput;
14 | private int returnValue;
15 | private uint bytesReturned;
16 | private DateTime timestamp;
17 | private bool isFavourite;
18 | private Request parent;
19 | private List children;
20 |
21 | public Request()
22 | {
23 | this.Timestamp = DateTime.Now;
24 | this.Children = new List();
25 | }
26 |
27 | public string RequestName
28 | {
29 | get
30 | {
31 | return requestName;
32 | }
33 |
34 | set
35 | {
36 | requestName = value;
37 | }
38 | }
39 |
40 | public string DevicePath
41 | {
42 | get
43 | {
44 | return devicePath;
45 | }
46 |
47 | set
48 | {
49 | devicePath = value;
50 | }
51 | }
52 |
53 | public uint IOCTL
54 | {
55 | get
56 | {
57 | return ioctl;
58 | }
59 |
60 | set
61 | {
62 | ioctl = value;
63 | }
64 | }
65 |
66 | public byte[] PreCallInput
67 | {
68 | get
69 | {
70 | return preCallInput;
71 | }
72 |
73 | set
74 | {
75 | preCallInput = value;
76 | }
77 | }
78 |
79 | public byte[] PostCallOutput
80 | {
81 | get
82 | {
83 | return postCallOutput;
84 | }
85 |
86 | set
87 | {
88 | postCallOutput = value;
89 | }
90 | }
91 |
92 | public int ReturnValue
93 | {
94 | get
95 | {
96 | return returnValue;
97 | }
98 |
99 | set
100 | {
101 | returnValue = value;
102 | }
103 | }
104 |
105 | public string ReturnValueString()
106 | {
107 | return String.Format("{0} (0x{1:X8}).", new Win32Exception(returnValue).Message, returnValue);
108 | }
109 |
110 | public uint BytesReturned
111 | {
112 | get
113 | {
114 | return bytesReturned;
115 | }
116 |
117 | set
118 | {
119 | bytesReturned = value;
120 | }
121 | }
122 |
123 | public DateTime Timestamp
124 | {
125 | get
126 | {
127 | return timestamp;
128 | }
129 |
130 | set
131 | {
132 | timestamp = value;
133 | }
134 | }
135 |
136 | public List Children
137 | {
138 | get
139 | {
140 | return children;
141 | }
142 |
143 | set
144 | {
145 | children = value;
146 | }
147 | }
148 |
149 | public bool IsFavourite
150 | {
151 | get
152 | {
153 | return isFavourite;
154 | }
155 |
156 | set
157 | {
158 | isFavourite = value;
159 | }
160 | }
161 |
162 | public Request Parent
163 | {
164 | get
165 | {
166 | return parent;
167 | }
168 |
169 | set
170 | {
171 | parent = value;
172 | }
173 | }
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/ioctlpus/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/ioctlpus/SettingsForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace ioctlpus
5 | {
6 | public partial class SettingsForm : Form
7 | {
8 | public MainForm _parent;
9 | public SettingsForm(MainForm parent)
10 | {
11 | InitializeComponent();
12 | this._parent = parent;
13 | // Set values and check buttons based on the status of hbInput/hbOutput
14 | // StringViewVisible
15 | if (this._parent.hbInput.StringViewVisible == true)
16 | {
17 | InPaneStringsView.Checked = true;
18 | }
19 | else
20 | {
21 | InPaneStringsView.Checked = false;
22 | }
23 | if (this._parent.hbOutput.StringViewVisible == true)
24 | {
25 | OutPaneStringsView.Checked = true;
26 | }
27 | else
28 | {
29 | OutPaneStringsView.Checked = false;
30 | }
31 | // GroupSeparatorVisible
32 | if (this._parent.hbInput.GroupSeparatorVisible == true)
33 | {
34 | InPaneSeparatorView.Checked = true;
35 | }
36 | else
37 | {
38 | InPaneSeparatorView.Checked = false;
39 | }
40 | if (this._parent.hbOutput.GroupSeparatorVisible == true)
41 | {
42 | OutPaneSeparatorView.Checked = true;
43 | }
44 | else
45 | {
46 | OutPaneSeparatorView.Checked = false;
47 | }
48 | // ColumnInfoVisible
49 | if (this._parent.hbInput.ColumnInfoVisible == true)
50 | {
51 | InPaneBarView.Checked = true;
52 | }
53 | else
54 | {
55 | InPaneBarView.Checked = false;
56 | }
57 | if (this._parent.hbOutput.ColumnInfoVisible == true)
58 | {
59 | OutPaneBarView.Checked = true;
60 | }
61 | else
62 | {
63 | OutPaneBarView.Checked = false;
64 | }
65 | // # of BytesPerLine
66 | numNumberBytesIn.Value = this._parent.hbInput.BytesPerLine;
67 | numNumberBytesOut.Value = this._parent.hbOutput.BytesPerLine;
68 | }
69 | private void InPaneStringsView_CheckedChanged(object sender, EventArgs e)
70 | {
71 | // Enable/Disable ASCII string view for InPane
72 | if (InPaneStringsView.Checked == true)
73 | {
74 | this._parent.hbInput.StringViewVisible = true;
75 | }
76 | else
77 | {
78 | this._parent.hbInput.StringViewVisible = false;
79 | }
80 | }
81 | private void OutPaneStringsView_CheckedChanged(object sender, EventArgs e)
82 | {
83 | // Enable/Disable ASCII string view for OutPane
84 | if (OutPaneStringsView.Checked == true)
85 | {
86 | this._parent.hbOutput.StringViewVisible = true;
87 | }
88 | else
89 | {
90 | this._parent.hbOutput.StringViewVisible = false;
91 | }
92 | }
93 |
94 | private void InPaneSeparatorView_CheckedChanged(object sender, EventArgs e)
95 | {
96 | // Enable/Disable byte separator for InPane
97 | if (InPaneSeparatorView.Checked == true)
98 | {
99 | this._parent.hbInput.GroupSeparatorVisible = true;
100 | }
101 | else
102 | {
103 | this._parent.hbInput.GroupSeparatorVisible = false;
104 | }
105 | }
106 |
107 | private void OutPaneSeparatorView_CheckedChanged(object sender, EventArgs e)
108 | {
109 | // Enable/Disable byte separator for OutPane
110 | if (OutPaneSeparatorView.Checked == true)
111 | {
112 | this._parent.hbOutput.GroupSeparatorVisible = true;
113 | }
114 | else
115 | {
116 | this._parent.hbOutput.GroupSeparatorVisible = false;
117 | }
118 | }
119 |
120 | private void InPaneBarView_CheckedChanged(object sender, EventArgs e)
121 | {
122 | // Enable/Disable hex count lines/columns for InPane
123 | if (InPaneBarView.Checked == true)
124 | {
125 | this._parent.hbInput.ColumnInfoVisible = true;
126 | this._parent.hbInput.LineInfoVisible = true;
127 | }
128 | else
129 | {
130 | this._parent.hbInput.ColumnInfoVisible = false;
131 | this._parent.hbInput.LineInfoVisible = false;
132 | }
133 | }
134 |
135 | private void OutPaneBarView_CheckedChanged(object sender, EventArgs e)
136 | {
137 | // Enable/Disable hex count lines/columns for OutPane
138 | if (OutPaneBarView.Checked == true)
139 | {
140 | this._parent.hbOutput.ColumnInfoVisible = true;
141 | this._parent.hbOutput.LineInfoVisible = true;
142 | }
143 | else
144 | {
145 | this._parent.hbOutput.ColumnInfoVisible = false;
146 | this._parent.hbOutput.LineInfoVisible = false;
147 | }
148 | }
149 |
150 | private void numNumberBytesIn_ValueChanged(object sender, EventArgs e)
151 | {
152 | // Set how many bytes per line are allowed in InPane
153 | this._parent.hbInput.BytesPerLine = (int)numNumberBytesIn.Value;
154 | }
155 |
156 | private void numNumberBytesOut_ValueChanged(object sender, EventArgs e)
157 | {
158 | // Set how many bytes per line are allowed in OutPane
159 | this._parent.hbOutput.BytesPerLine = (int)numNumberBytesOut.Value;
160 | }
161 | }
162 | }
163 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # MSTest test Results
33 | [Tt]est[Rr]esult*/
34 | [Bb]uild[Ll]og.*
35 |
36 | # NUNIT
37 | *.VisualState.xml
38 | TestResult.xml
39 |
40 | # Build Results of an ATL Project
41 | [Dd]ebugPS/
42 | [Rr]eleasePS/
43 | dlldata.c
44 |
45 | # .NET Core
46 | project.lock.json
47 | project.fragment.lock.json
48 | artifacts/
49 | **/Properties/launchSettings.json
50 |
51 | *_i.c
52 | *_p.c
53 | *_i.h
54 | *.ilk
55 | *.meta
56 | *.obj
57 | *.pch
58 | *.pdb
59 | *.pgc
60 | *.pgd
61 | *.rsp
62 | *.sbr
63 | *.tlb
64 | *.tli
65 | *.tlh
66 | *.tmp
67 | *.tmp_proj
68 | *.log
69 | *.vspscc
70 | *.vssscc
71 | .builds
72 | *.pidb
73 | *.svclog
74 | *.scc
75 |
76 | # Chutzpah Test files
77 | _Chutzpah*
78 |
79 | # Visual C++ cache files
80 | ipch/
81 | *.aps
82 | *.ncb
83 | *.opendb
84 | *.opensdf
85 | *.sdf
86 | *.cachefile
87 | *.VC.db
88 | *.VC.VC.opendb
89 |
90 | # Visual Studio profiler
91 | *.psess
92 | *.vsp
93 | *.vspx
94 | *.sap
95 |
96 | # TFS 2012 Local Workspace
97 | $tf/
98 |
99 | # Guidance Automation Toolkit
100 | *.gpState
101 |
102 | # ReSharper is a .NET coding add-in
103 | _ReSharper*/
104 | *.[Rr]e[Ss]harper
105 | *.DotSettings.user
106 |
107 | # JustCode is a .NET coding add-in
108 | .JustCode
109 |
110 | # TeamCity is a build add-in
111 | _TeamCity*
112 |
113 | # DotCover is a Code Coverage Tool
114 | *.dotCover
115 |
116 | # Visual Studio code coverage results
117 | *.coverage
118 | *.coveragexml
119 |
120 | # NCrunch
121 | _NCrunch_*
122 | .*crunch*.local.xml
123 | nCrunchTemp_*
124 |
125 | # MightyMoose
126 | *.mm.*
127 | AutoTest.Net/
128 |
129 | # Web workbench (sass)
130 | .sass-cache/
131 |
132 | # Installshield output folder
133 | [Ee]xpress/
134 |
135 | # DocProject is a documentation generator add-in
136 | DocProject/buildhelp/
137 | DocProject/Help/*.HxT
138 | DocProject/Help/*.HxC
139 | DocProject/Help/*.hhc
140 | DocProject/Help/*.hhk
141 | DocProject/Help/*.hhp
142 | DocProject/Help/Html2
143 | DocProject/Help/html
144 |
145 | # Click-Once directory
146 | publish/
147 |
148 | # Publish Web Output
149 | *.[Pp]ublish.xml
150 | *.azurePubxml
151 | # TODO: Comment the next line if you want to checkin your web deploy settings
152 | # but database connection strings (with potential passwords) will be unencrypted
153 | *.pubxml
154 | *.publishproj
155 |
156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
157 | # checkin your Azure Web App publish settings, but sensitive information contained
158 | # in these scripts will be unencrypted
159 | PublishScripts/
160 |
161 | # NuGet Packages
162 | *.nupkg
163 | # The packages folder can be ignored because of Package Restore
164 | **/packages/*
165 | # except build/, which is used as an MSBuild target.
166 | !**/packages/build/
167 | # Uncomment if necessary however generally it will be regenerated when needed
168 | #!**/packages/repositories.config
169 | # NuGet v3's project.json files produces more ignorable files
170 | *.nuget.props
171 | *.nuget.targets
172 |
173 | # Microsoft Azure Build Output
174 | csx/
175 | *.build.csdef
176 |
177 | # Microsoft Azure Emulator
178 | ecf/
179 | rcf/
180 |
181 | # Windows Store app package directories and files
182 | AppPackages/
183 | BundleArtifacts/
184 | Package.StoreAssociation.xml
185 | _pkginfo.txt
186 |
187 | # Visual Studio cache files
188 | # files ending in .cache can be ignored
189 | *.[Cc]ache
190 | # but keep track of directories ending in .cache
191 | !*.[Cc]ache/
192 |
193 | # Others
194 | ClientBin/
195 | ~$*
196 | *~
197 | *.dbmdl
198 | *.dbproj.schemaview
199 | *.jfm
200 | *.pfx
201 | *.publishsettings
202 | orleans.codegen.cs
203 |
204 | # Since there are multiple workflows, uncomment next line to ignore bower_components
205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
206 | #bower_components/
207 |
208 | # RIA/Silverlight projects
209 | Generated_Code/
210 |
211 | # Backup & report files from converting an old project file
212 | # to a newer Visual Studio version. Backup files are not needed,
213 | # because we have git ;-)
214 | _UpgradeReport_Files/
215 | Backup*/
216 | UpgradeLog*.XML
217 | UpgradeLog*.htm
218 |
219 | # SQL Server files
220 | *.mdf
221 | *.ldf
222 | *.ndf
223 |
224 | # Business Intelligence projects
225 | *.rdl.data
226 | *.bim.layout
227 | *.bim_*.settings
228 |
229 | # Microsoft Fakes
230 | FakesAssemblies/
231 |
232 | # GhostDoc plugin setting file
233 | *.GhostDoc.xml
234 |
235 | # Node.js Tools for Visual Studio
236 | .ntvs_analysis.dat
237 | node_modules/
238 |
239 | # Typescript v1 declaration files
240 | typings/
241 |
242 | # Visual Studio 6 build log
243 | *.plg
244 |
245 | # Visual Studio 6 workspace options file
246 | *.opt
247 |
248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
249 | *.vbw
250 |
251 | # Visual Studio LightSwitch build output
252 | **/*.HTMLClient/GeneratedArtifacts
253 | **/*.DesktopClient/GeneratedArtifacts
254 | **/*.DesktopClient/ModelManifest.xml
255 | **/*.Server/GeneratedArtifacts
256 | **/*.Server/ModelManifest.xml
257 | _Pvt_Extensions
258 |
259 | # Paket dependency manager
260 | .paket/paket.exe
261 | paket-files/
262 |
263 | # FAKE - F# Make
264 | .fake/
265 |
266 | # JetBrains Rider
267 | .idea/
268 | *.sln.iml
269 |
270 | # CodeRush
271 | .cr/
272 |
273 | # Python Tools for Visual Studio (PTVS)
274 | __pycache__/
275 | *.pyc
276 |
277 | # Cake - Uncomment if you are using it
278 | # tools/**
279 | # !tools/packages.config
280 |
281 | # Telerik's JustMock configuration file
282 | *.jmconfig
283 |
284 | # BizTalk build output
285 | *.btp.cs
286 | *.btm.cs
287 | *.odx.cs
288 | *.xsd.cs
289 |
--------------------------------------------------------------------------------
/ioctlpus/AboutForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ioctlpus
2 | {
3 | partial class AboutForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
32 | this.lblAbout = new System.Windows.Forms.Label();
33 | this.groupBox1 = new System.Windows.Forms.GroupBox();
34 | this.olvComponents = new BrightIdeasSoftware.ObjectListView();
35 | this.colComponent = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
36 | this.colAuthor = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
37 | this.colLicence = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
38 | this.groupBox1.SuspendLayout();
39 | ((System.ComponentModel.ISupportInitialize)(this.olvComponents)).BeginInit();
40 | this.SuspendLayout();
41 | //
42 | // lblAbout
43 | //
44 | this.lblAbout.Anchor = System.Windows.Forms.AnchorStyles.None;
45 | this.lblAbout.Font = new System.Drawing.Font("Segoe UI", 8.25F);
46 | this.lblAbout.Location = new System.Drawing.Point(12, 9);
47 | this.lblAbout.Name = "lblAbout";
48 | this.lblAbout.Size = new System.Drawing.Size(330, 86);
49 | this.lblAbout.TabIndex = 0;
50 | //
51 | // groupBox1
52 | //
53 | this.groupBox1.Controls.Add(this.olvComponents);
54 | this.groupBox1.Location = new System.Drawing.Point(12, 92);
55 | this.groupBox1.Name = "groupBox1";
56 | this.groupBox1.Size = new System.Drawing.Size(330, 144);
57 | this.groupBox1.TabIndex = 2;
58 | this.groupBox1.TabStop = false;
59 | this.groupBox1.Text = "Open Source Components";
60 | //
61 | // olvComponents
62 | //
63 | this.olvComponents.AllColumns.Add(this.colComponent);
64 | this.olvComponents.AllColumns.Add(this.colAuthor);
65 | this.olvComponents.AllColumns.Add(this.colLicence);
66 | this.olvComponents.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
67 | this.colComponent,
68 | this.colAuthor,
69 | this.colLicence});
70 | this.olvComponents.Cursor = System.Windows.Forms.Cursors.Default;
71 | this.olvComponents.HasCollapsibleGroups = false;
72 | this.olvComponents.HideSelection = false;
73 | this.olvComponents.Location = new System.Drawing.Point(6, 19);
74 | this.olvComponents.Name = "olvComponents";
75 | this.olvComponents.ShowGroups = false;
76 | this.olvComponents.Size = new System.Drawing.Size(318, 114);
77 | this.olvComponents.SortGroupItemsByPrimaryColumn = false;
78 | this.olvComponents.TabIndex = 1;
79 | this.olvComponents.UseCompatibleStateImageBehavior = false;
80 | this.olvComponents.View = System.Windows.Forms.View.Details;
81 | //
82 | // colComponent
83 | //
84 | this.colComponent.AspectName = "Component";
85 | this.colComponent.CellPadding = null;
86 | this.colComponent.MinimumWidth = 120;
87 | this.colComponent.Text = "Component";
88 | this.colComponent.Width = 120;
89 | //
90 | // colAuthor
91 | //
92 | this.colAuthor.AspectName = "Author";
93 | this.colAuthor.CellPadding = null;
94 | this.colAuthor.MinimumWidth = 90;
95 | this.colAuthor.Text = "Author";
96 | this.colAuthor.Width = 90;
97 | //
98 | // colLicence
99 | //
100 | this.colLicence.AspectName = "Licence";
101 | this.colLicence.CellPadding = null;
102 | this.colLicence.FillsFreeSpace = true;
103 | this.colLicence.Text = "Licence";
104 | //
105 | // AboutForm
106 | //
107 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
108 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
109 | this.ClientSize = new System.Drawing.Size(354, 241);
110 | this.Controls.Add(this.groupBox1);
111 | this.Controls.Add(this.lblAbout);
112 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
113 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
114 | this.MaximizeBox = false;
115 | this.MinimizeBox = false;
116 | this.MinimumSize = new System.Drawing.Size(370, 280);
117 | this.Name = "AboutForm";
118 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
119 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
120 | this.Text = "About IOCTLpus";
121 | this.groupBox1.ResumeLayout(false);
122 | ((System.ComponentModel.ISupportInitialize)(this.olvComponents)).EndInit();
123 | this.ResumeLayout(false);
124 |
125 | }
126 |
127 | #endregion
128 |
129 | private System.Windows.Forms.Label lblAbout;
130 | private System.Windows.Forms.GroupBox groupBox1;
131 | private BrightIdeasSoftware.ObjectListView olvComponents;
132 | private BrightIdeasSoftware.OLVColumn colComponent;
133 | private BrightIdeasSoftware.OLVColumn colAuthor;
134 | private BrightIdeasSoftware.OLVColumn colLicence;
135 | }
136 | }
--------------------------------------------------------------------------------
/ioctlpus/Program.cs:
--------------------------------------------------------------------------------
1 | using CommandLine;
2 | using Microsoft.Win32.SafeHandles;
3 | using System;
4 | using System.ComponentModel;
5 | using System.Diagnostics;
6 | using System.IO;
7 | using System.Runtime.InteropServices;
8 | using System.Windows.Forms;
9 | using static ioctlpus.Utilities.NativeMethods;
10 |
11 | namespace ioctlpus
12 | {
13 | static class Program
14 | {
15 | public static byte[] StringToByteArray(string hex)
16 | {
17 | // Convert a string to a byte array
18 | if (hex.Length % 2 == 1)
19 | {
20 | throw new Exception("The binary string cannot have an odd number of digits");
21 | }
22 | byte[] bytes = new byte[hex.Length / 2];
23 |
24 | for (int i = 0; i < hex.Length; i += 2)
25 | bytes[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16);
26 | return bytes;
27 | }
28 |
29 | public static string ByteArrayToString(byte[] ba)
30 | {
31 | // Convert a byte array to a string
32 | string hex = "0x" + BitConverter.ToString(ba).Replace("-", " 0x");
33 | return hex;
34 | }
35 |
36 | class Options
37 | {
38 | // args options
39 | [Option("cli", HelpText = "Run IOCTLpus in CLI mode.")]
40 | public bool Cli { get; set; }
41 |
42 | [Option("guid", HelpText = "Path/GUID of the driver to interact with.", Default = null)]
43 | public string Guid { get; set; }
44 |
45 | [Option("ioctl", HelpText = "IOCTL code.", Default = null)]
46 | public string Ioctl { get; set; }
47 |
48 | [Option('i', "input-size", HelpText = "Input Size (decimal).", Default = 32)]
49 | public int Input_size { get; set; }
50 |
51 | [Option('o', "output-size", HelpText = "Output Size (decimal).", Default = 32)]
52 | public int Output_size { get; set; }
53 |
54 | [Option("input", HelpText = "Input buffer.", Default = null)]
55 | public string Input_buffer { get; set; }
56 |
57 | [Option('r', "repeat", HelpText = "# of times to repeat the IOCTL request.", Default = 0)]
58 | public int Repeat { get; set; }
59 |
60 | [Option("access-mask", HelpText = "Access Mask.", Default = "20000000")]
61 | public string Access_mask { get; set; }
62 |
63 | }
64 |
65 | // The main entry point for the application.
66 | [STAThread]
67 | static void Main(string[] args)
68 | {
69 | // handle args parsing
70 | Parser.Default.ParseArguments(args).WithParsed(opts =>
71 | {
72 | // if the cli arg parameter is specified the software will run in CLI mode
73 | if (opts.Cli)
74 | {
75 | Console.WriteLine("IOCTLpus CLI Mode\n--------------------\n");
76 | // hanlde some required arguments
77 | if (opts.Guid == null)
78 | {
79 | Console.WriteLine("Required option 'guid' is missing.");
80 | return;
81 | }
82 | if (opts.Ioctl == null)
83 | {
84 | Console.WriteLine("Required option 'ioctl' is missing.");
85 | return;
86 | }
87 | if (opts.Input_buffer == null)
88 | {
89 | Console.WriteLine("Required option 'input' is missing.");
90 | return;
91 | }
92 | // if we gathered every required arguments we can proceed and perform the IOCTL request printing out the result
93 | uint fa_mask = Convert.ToUInt32(opts.Access_mask, 16);
94 | SafeFileHandle sfh = CreateFile(
95 | opts.Guid.Trim(),
96 | (FileAccess)fa_mask,
97 | FileShare.ReadWrite,
98 | IntPtr.Zero,
99 | FileMode.Open,
100 | FileAttributes.Normal,
101 | IntPtr.Zero);
102 |
103 | int errorCode = 0;
104 |
105 | uint ioctl = Convert.ToUInt32(opts.Ioctl.Trim(), 16);
106 | uint returnedBytes = 0;
107 | uint inputSize = (uint)opts.Input_size;
108 | uint outputSize = (uint)opts.Output_size;
109 | byte[] outputBuffer = new byte[outputSize];
110 | byte[] inputBuffer = new byte[inputSize];
111 |
112 | if (sfh.IsInvalid)
113 | {
114 | // print out last occured error (e.g DeviceName not found)
115 | string errorMessage = new Win32Exception(Marshal.GetLastWin32Error()).Message;
116 | Console.WriteLine(errorMessage);
117 | return;
118 | }
119 | else
120 | {
121 | // grab the opts.Input_buffer and transform it into a byte array
122 | byte[] hbInput = StringToByteArray(opts.Input_buffer);
123 | long hbInputLength = hbInput.Length;
124 | MemSet(Marshal.UnsafeAddrOfPinnedArrayElement(inputBuffer, 0), 0, (int)hbInputLength);
125 |
126 | for (int i = 0; i < inputSize; i++)
127 | {
128 | inputBuffer[i] = hbInput[i];
129 | }
130 | MemSet(Marshal.UnsafeAddrOfPinnedArrayElement(outputBuffer, 0), 0, (int)outputBuffer.Length);
131 | // send DeviceIoControl
132 | DeviceIoControl(sfh, ioctl, inputBuffer, inputSize, outputBuffer, outputSize, ref returnedBytes, IntPtr.Zero);
133 | // gather last occured error (e.g Access Denied)
134 | errorCode = Marshal.GetLastWin32Error();
135 | string errorMessage = new Win32Exception(Marshal.GetLastWin32Error()).Message;
136 | sfh.Close();
137 | // print out DeviceIoControl returning values
138 | Console.WriteLine("GUID:\t\t" + opts.Guid);
139 | Console.WriteLine("IOCTL:\t\t0x{0:X}", ioctl);
140 | Console.WriteLine("Input Buffer:\t" + ByteArrayToString(inputBuffer));
141 | Console.WriteLine("Returned Bytes:\t{0:D}", returnedBytes);
142 | Console.WriteLine("Output Buffer:\t" + ByteArrayToString(outputBuffer));
143 | Console.WriteLine("Error:\t\t0x{0:X} - " + errorMessage, errorCode);
144 | }
145 | }
146 | else
147 | {
148 | // run IOCTLpus in GUI mode
149 | Application.EnableVisualStyles();
150 | Application.SetCompatibleTextRenderingDefault(false);
151 | try
152 | {
153 | Console.WriteLine("[!] IOCTLpus: Do not close this window.");
154 | Application.Run(new MainForm());
155 | }
156 | catch (Exception ex)
157 | {
158 | Debug.WriteLine(ex);
159 | }
160 | }
161 | });
162 | }
163 | }
164 | }
165 |
--------------------------------------------------------------------------------
/ioctlpus/Utilities.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Win32.SafeHandles;
2 | using System;
3 | using System.IO;
4 | using System.Runtime.InteropServices;
5 |
6 | namespace ioctlpus
7 | {
8 | class Utilities
9 | {
10 | /*
11 | * CRC16 code taken from Sanity Free Coding (2006-12-15)
12 | * URL: http://www.sanity-free.com/134/standard_crc_16_in_csharp.html
13 | * License: CC BY-NC-SA 3.0
14 | */
15 | public class CRC16
16 | {
17 | const ushort polynomial = 0xA001;
18 | ushort[] table = new ushort[256];
19 |
20 | public CRC16()
21 | {
22 | ushort value;
23 | ushort temp;
24 | for (ushort i = 0; i < table.Length; ++i)
25 | {
26 | value = 0;
27 | temp = i;
28 | for (byte j = 0; j < 8; ++j)
29 | {
30 | if (((value ^ temp) & 0x0001) != 0)
31 | {
32 | value = (ushort)((value >> 1) ^ polynomial);
33 | }
34 | else
35 | {
36 | value >>= 1;
37 | }
38 | temp >>= 1;
39 | }
40 | table[i] = value;
41 | }
42 | }
43 |
44 | public ushort ComputeChecksum(byte[] bytes)
45 | {
46 | ushort crc = 0;
47 | for (int i = 0; i < bytes.Length; ++i)
48 | {
49 | byte index = (byte)(crc ^ bytes[i]);
50 | crc = (ushort)((crc >> 8) ^ table[index]);
51 | }
52 | return crc;
53 | }
54 |
55 | public byte[] ComputeChecksumBytes(byte[] bytes)
56 | {
57 | ushort crc = ComputeChecksum(bytes);
58 | return BitConverter.GetBytes(crc);
59 | }
60 | }
61 |
62 | public class NativeMethods
63 | {
64 | /*
65 | * Class used to "import" native functionalities
66 | */
67 | public const int EM_SETCUEBANNER = 0x1501;
68 |
69 | [DllImport("user32.dll", CharSet = CharSet.Auto)]
70 | public static extern Int32 SendMessage(IntPtr hWnd, int msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);
71 |
72 | public const Int32 DIGCF_PRESENT = 2;
73 | public const Int32 DIGCF_DEVICEINTERFACE = 0x10;
74 |
75 | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
76 | public static extern IntPtr SetupDiGetClassDevs(
77 | ref Guid ClassGuid,
78 | IntPtr Enumerator,
79 | IntPtr hwndParent,
80 | Int32 Flags);
81 |
82 | public struct SP_DEVICE_INTERFACE_DATA
83 | {
84 | public int cbSize;
85 | public Guid InterfaceClassGuid;
86 | public int Flags;
87 | public IntPtr Reserved;
88 | };
89 |
90 | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
91 | public static extern Boolean SetupDiEnumDeviceInterfaces(
92 | IntPtr DeviceInfoSet,
93 | IntPtr DeviceInfoData,
94 | ref Guid InterfaceClassGuid,
95 | Int32 MemberIndex,
96 | ref SP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
97 |
98 | [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
99 | public static extern Boolean SetupDiGetDeviceInterfaceDetail(
100 | IntPtr DeviceInfoSet,
101 | ref SP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
102 | IntPtr DeviceInterfaceDetailData,
103 | int DeviceInterfaceDetailDataSize,
104 | ref int RequiredSize,
105 | IntPtr DeviceInfoData);
106 |
107 | [DllImport("setupapi.dll", SetLastError = true)]
108 | public static extern int SetupDiDestroyDeviceInfoList(IntPtr DeviceInfoSet);
109 |
110 | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
111 | public static extern SafeFileHandle CreateFile(
112 | string lpFileName,
113 | [MarshalAs(UnmanagedType.U4)] FileAccess dwDesiredAccess,
114 | [MarshalAs(UnmanagedType.U4)] FileShare dwShareMode,
115 | IntPtr lpSecurityAttributes,
116 | [MarshalAs(UnmanagedType.U4)] FileMode dwCreationDisposition,
117 | [MarshalAs(UnmanagedType.U4)] FileAttributes dwFlagsAndAttributes,
118 | IntPtr hTemplateFile);
119 |
120 | [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
121 | public static extern bool DeviceIoControl(
122 | SafeFileHandle hDevice,
123 | uint ioControlCode,
124 | IntPtr inBuffer,
125 | uint nInBufferSize,
126 | byte[] outBuffer,
127 | uint nOutBufferSize,
128 | ref uint pBytesReturned,
129 | IntPtr overlapped);
130 |
131 | [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
132 | public static extern bool DeviceIoControl(
133 | SafeFileHandle hDevice,
134 | uint ioControlCode,
135 | byte[] inBuffer,
136 | uint nInBufferSize,
137 | byte[] outBuffer,
138 | uint nOutBufferSize,
139 | ref uint pBytesReturned,
140 | IntPtr overlapped);
141 |
142 | [DllImport("kernel32.dll")]
143 | public static extern bool CloseHandle(SafeFileHandle hObject);
144 |
145 | [DllImport("msvcrt.dll", EntryPoint = "memset", CallingConvention = CallingConvention.Cdecl, SetLastError = false)]
146 | public static extern IntPtr MemSet(IntPtr dest, int c, int count);
147 | }
148 |
149 | public class IOCTL
150 | {
151 | public static string ResolveDeviceInstanceGUID(Guid guid)
152 | {
153 | IntPtr deviceInfoSet = NativeMethods.SetupDiGetClassDevs(
154 | ref guid,
155 | IntPtr.Zero,
156 | IntPtr.Zero,
157 | NativeMethods.DIGCF_PRESENT | NativeMethods.DIGCF_DEVICEINTERFACE);
158 |
159 | if (deviceInfoSet != IntPtr.Zero)
160 | {
161 | Int32 memberIndex = 0;
162 | NativeMethods.SP_DEVICE_INTERFACE_DATA deviceInterfaceData = new NativeMethods.SP_DEVICE_INTERFACE_DATA();
163 | deviceInterfaceData.cbSize = Marshal.SizeOf(deviceInterfaceData);
164 |
165 | bool isEnumeratedDeviceInterfaces = NativeMethods.SetupDiEnumDeviceInterfaces(
166 | deviceInfoSet,
167 | IntPtr.Zero,
168 | ref guid,
169 | memberIndex,
170 | ref deviceInterfaceData);
171 |
172 | if (isEnumeratedDeviceInterfaces)
173 | {
174 | // Request a structure with the device path name
175 | int bufferSize = 0;
176 | IntPtr detailDataBuffer;
177 |
178 | // Determine the buffer size
179 | bool hasDeviceInterfaceDetail = NativeMethods.SetupDiGetDeviceInterfaceDetail(
180 | deviceInfoSet,
181 | ref deviceInterfaceData,
182 | IntPtr.Zero,
183 | 0,
184 | ref bufferSize,
185 | IntPtr.Zero);
186 |
187 | detailDataBuffer = Marshal.AllocHGlobal(bufferSize);
188 | Marshal.WriteInt32(detailDataBuffer, (IntPtr.Size == 4) ? (4 + Marshal.SystemDefaultCharSize) : 8);
189 |
190 | // Request the structure again now that the buffer size has been determined
191 | hasDeviceInterfaceDetail = NativeMethods.SetupDiGetDeviceInterfaceDetail(
192 | deviceInfoSet,
193 | ref deviceInterfaceData,
194 | detailDataBuffer,
195 | bufferSize,
196 | ref bufferSize,
197 | IntPtr.Zero);
198 |
199 | if (hasDeviceInterfaceDetail)
200 | {
201 | IntPtr ptrDevicePathName = new IntPtr(detailDataBuffer.ToInt32() + 4);
202 | string devicePathName = Marshal.PtrToStringAuto(ptrDevicePathName);
203 | Marshal.FreeHGlobal(detailDataBuffer);
204 | NativeMethods.SetupDiDestroyDeviceInfoList(deviceInfoSet);
205 | return devicePathName;
206 | }
207 | else
208 | {
209 | throw new ArgumentException("Could not resolve symbolic link from GUID.");
210 | }
211 | }
212 | else
213 | {
214 | throw new ArgumentException("Could not resolve symbolic link from GUID.");
215 | }
216 | }
217 | else
218 | {
219 | throw new ArgumentException("Could not resolve symbolic link from GUID.");
220 | }
221 | }
222 |
223 | public static bool IsValidDevicePath(string devicePath)
224 | /*
225 | * Check if the provided DeviceName is found on the system
226 | * Note: if the access is restricred to admin-only user, it will return an "invalid" result
227 | * coloring the `tbDevicePath` in red
228 | */
229 | {
230 | SafeFileHandle handle = NativeMethods.CreateFile(
231 | devicePath,
232 | 0,
233 | FileShare.ReadWrite,
234 | IntPtr.Zero,
235 | FileMode.Open,
236 | FileAttributes.Normal,
237 | IntPtr.Zero);
238 |
239 | bool isValid = !handle.IsInvalid;
240 | handle.Close();
241 | return isValid;
242 | }
243 | }
244 | }
245 | }
246 |
--------------------------------------------------------------------------------
/ioctlpus/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\control_start_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\lightning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\Resources\door_out.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | ..\Resources\door_in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | ..\Resources\arrow_rotate_clockwise.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | ..\Resources\arrow_rotate_anticlockwise.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | ..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
143 | ..\Resources\arrow_out.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | ..\Resources\application_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
147 |
148 |
149 | ..\Resources\arrow_in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
150 |
151 |
152 | ..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
153 |
154 |
155 | ..\Resources\star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
156 |
157 |
158 | ..\Resources\control_end_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
159 |
160 |
161 | ..\Resources\database_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
162 |
163 |
164 | ..\Resources\cog.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
165 |
166 |
167 | ..\Resources\database_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
168 |
169 |
170 | ..\Resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
171 |
172 |
173 | ..\Resources\application_bars.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
174 |
175 |
176 | ..\Resources\application_separator.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
177 |
178 |
179 | ..\Resources\application_string.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
180 |
181 |
182 | ..\Resources\icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
183 |
184 |
--------------------------------------------------------------------------------
/ioctlpus/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ioctlpus.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ioctlpus.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | internal static System.Drawing.Bitmap add {
67 | get {
68 | object obj = ResourceManager.GetObject("add", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap application_bars {
77 | get {
78 | object obj = ResourceManager.GetObject("application_bars", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// Looks up a localized resource of type System.Drawing.Bitmap.
85 | ///
86 | internal static System.Drawing.Bitmap application_edit {
87 | get {
88 | object obj = ResourceManager.GetObject("application_edit", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// Looks up a localized resource of type System.Drawing.Bitmap.
95 | ///
96 | internal static System.Drawing.Bitmap application_separator {
97 | get {
98 | object obj = ResourceManager.GetObject("application_separator", resourceCulture);
99 | return ((System.Drawing.Bitmap)(obj));
100 | }
101 | }
102 |
103 | ///
104 | /// Looks up a localized resource of type System.Drawing.Bitmap.
105 | ///
106 | internal static System.Drawing.Bitmap application_string {
107 | get {
108 | object obj = ResourceManager.GetObject("application_string", resourceCulture);
109 | return ((System.Drawing.Bitmap)(obj));
110 | }
111 | }
112 |
113 | ///
114 | /// Looks up a localized resource of type System.Drawing.Bitmap.
115 | ///
116 | internal static System.Drawing.Bitmap arrow_in {
117 | get {
118 | object obj = ResourceManager.GetObject("arrow_in", resourceCulture);
119 | return ((System.Drawing.Bitmap)(obj));
120 | }
121 | }
122 |
123 | ///
124 | /// Looks up a localized resource of type System.Drawing.Bitmap.
125 | ///
126 | internal static System.Drawing.Bitmap arrow_out {
127 | get {
128 | object obj = ResourceManager.GetObject("arrow_out", resourceCulture);
129 | return ((System.Drawing.Bitmap)(obj));
130 | }
131 | }
132 |
133 | ///
134 | /// Looks up a localized resource of type System.Drawing.Bitmap.
135 | ///
136 | internal static System.Drawing.Bitmap arrow_rotate_anticlockwise {
137 | get {
138 | object obj = ResourceManager.GetObject("arrow_rotate_anticlockwise", resourceCulture);
139 | return ((System.Drawing.Bitmap)(obj));
140 | }
141 | }
142 |
143 | ///
144 | /// Looks up a localized resource of type System.Drawing.Bitmap.
145 | ///
146 | internal static System.Drawing.Bitmap arrow_rotate_clockwise {
147 | get {
148 | object obj = ResourceManager.GetObject("arrow_rotate_clockwise", resourceCulture);
149 | return ((System.Drawing.Bitmap)(obj));
150 | }
151 | }
152 |
153 | ///
154 | /// Looks up a localized resource of type System.Drawing.Bitmap.
155 | ///
156 | internal static System.Drawing.Bitmap cog {
157 | get {
158 | object obj = ResourceManager.GetObject("cog", resourceCulture);
159 | return ((System.Drawing.Bitmap)(obj));
160 | }
161 | }
162 |
163 | ///
164 | /// Looks up a localized resource of type System.Drawing.Bitmap.
165 | ///
166 | internal static System.Drawing.Bitmap control_end_blue {
167 | get {
168 | object obj = ResourceManager.GetObject("control_end_blue", resourceCulture);
169 | return ((System.Drawing.Bitmap)(obj));
170 | }
171 | }
172 |
173 | ///
174 | /// Looks up a localized resource of type System.Drawing.Bitmap.
175 | ///
176 | internal static System.Drawing.Bitmap control_start_blue {
177 | get {
178 | object obj = ResourceManager.GetObject("control_start_blue", resourceCulture);
179 | return ((System.Drawing.Bitmap)(obj));
180 | }
181 | }
182 |
183 | ///
184 | /// Looks up a localized resource of type System.Drawing.Bitmap.
185 | ///
186 | internal static System.Drawing.Bitmap database_add {
187 | get {
188 | object obj = ResourceManager.GetObject("database_add", resourceCulture);
189 | return ((System.Drawing.Bitmap)(obj));
190 | }
191 | }
192 |
193 | ///
194 | /// Looks up a localized resource of type System.Drawing.Bitmap.
195 | ///
196 | internal static System.Drawing.Bitmap database_save {
197 | get {
198 | object obj = ResourceManager.GetObject("database_save", resourceCulture);
199 | return ((System.Drawing.Bitmap)(obj));
200 | }
201 | }
202 |
203 | ///
204 | /// Looks up a localized resource of type System.Drawing.Bitmap.
205 | ///
206 | internal static System.Drawing.Bitmap delete {
207 | get {
208 | object obj = ResourceManager.GetObject("delete", resourceCulture);
209 | return ((System.Drawing.Bitmap)(obj));
210 | }
211 | }
212 |
213 | ///
214 | /// Looks up a localized resource of type System.Drawing.Bitmap.
215 | ///
216 | internal static System.Drawing.Bitmap door_in {
217 | get {
218 | object obj = ResourceManager.GetObject("door_in", resourceCulture);
219 | return ((System.Drawing.Bitmap)(obj));
220 | }
221 | }
222 |
223 | ///
224 | /// Looks up a localized resource of type System.Drawing.Bitmap.
225 | ///
226 | internal static System.Drawing.Bitmap door_out {
227 | get {
228 | object obj = ResourceManager.GetObject("door_out", resourceCulture);
229 | return ((System.Drawing.Bitmap)(obj));
230 | }
231 | }
232 |
233 | ///
234 | /// Looks up a localized resource of type System.Drawing.Bitmap.
235 | ///
236 | internal static System.Drawing.Bitmap help {
237 | get {
238 | object obj = ResourceManager.GetObject("help", resourceCulture);
239 | return ((System.Drawing.Bitmap)(obj));
240 | }
241 | }
242 |
243 | ///
244 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
245 | ///
246 | internal static System.Drawing.Icon icon {
247 | get {
248 | object obj = ResourceManager.GetObject("icon", resourceCulture);
249 | return ((System.Drawing.Icon)(obj));
250 | }
251 | }
252 |
253 | ///
254 | /// Looks up a localized resource of type System.Drawing.Bitmap.
255 | ///
256 | internal static System.Drawing.Bitmap lightning {
257 | get {
258 | object obj = ResourceManager.GetObject("lightning", resourceCulture);
259 | return ((System.Drawing.Bitmap)(obj));
260 | }
261 | }
262 |
263 | ///
264 | /// Looks up a localized resource of type System.Drawing.Bitmap.
265 | ///
266 | internal static System.Drawing.Bitmap star {
267 | get {
268 | object obj = ResourceManager.GetObject("star", resourceCulture);
269 | return ((System.Drawing.Bitmap)(obj));
270 | }
271 | }
272 | }
273 | }
274 |
--------------------------------------------------------------------------------
/ioctlpus/MainForm.cs:
--------------------------------------------------------------------------------
1 | using Be.Windows.Forms;
2 | using BrightIdeasSoftware;
3 | using Microsoft.Win32.SafeHandles;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Diagnostics;
7 | using System.Drawing;
8 | using System.IO;
9 | using System.Runtime.InteropServices;
10 | using System.Windows.Forms;
11 | using static ioctlpus.Utilities.IOCTL;
12 | using static ioctlpus.Utilities.NativeMethods;
13 |
14 | namespace ioctlpus
15 | {
16 | public partial class MainForm : Form
17 | {
18 | private List requests = new List();
19 | private Utilities.CRC16 CRC16 = new Utilities.CRC16();
20 |
21 | public MainForm()
22 | {
23 | InitializeComponent();
24 |
25 | // Add placeholder text to filters textbox
26 | SendMessage(tbFilters.Handle, EM_SETCUEBANNER, 0, "Filters (e.g. 9C412000 br=64 !ec=C000000D)");
27 |
28 | // Setup HexBoxes
29 | InitializeHexBox(hbInput, (int)nudInputSize.Value);
30 | InitializeHexBox(hbOutput, (int)nudOutputSize.Value);
31 |
32 | // Setup TreeListView
33 | InitializeTreeListView();
34 |
35 | // Setup initial parameters
36 | tbDevicePath.Text = @"\\.\PhysicalDrive0";
37 | tbIOCTL.Text = "70000";
38 | tbAccessMask.Text = "20000000";
39 | cmbACL.SelectedItem = "ANY_ACCESS";
40 | }
41 |
42 | // Initialize the given buffer view
43 | private void InitializeHexBox(HexBox hexBox, int size)
44 | {
45 | hexBox.Visible = true;
46 | hexBox.InfoForeColor = System.Drawing.Color.Black;
47 | hexBox.UseFixedBytesPerLine = true;
48 | hexBox.BytesPerLine = 8;
49 | hexBox.ColumnInfoVisible = true;
50 | hexBox.LineInfoVisible = true;
51 | hexBox.StringViewVisible = true;
52 | hexBox.VScrollBarVisible = true;
53 | hexBox.GroupSeparatorVisible = true;
54 | hexBox.GroupSize = 4;
55 | hexBox.ShadowSelectionVisible = true;
56 | hexBox.ByteProvider = new DynamicByteProvider(new byte[size]);
57 | }
58 |
59 | // Initialize the Request History views
60 | private void InitializeTreeListView()
61 | {
62 | // Add colours to request rows
63 | tlvRequestHistory.FormatRow += (sender, eventArgs) =>
64 | {
65 | Request transmission = (Request)eventArgs.Model;
66 | if (transmission.IsFavourite)
67 | eventArgs.Item.BackColor = Color.LightYellow;
68 | else if (transmission.ReturnValue > 0)
69 | eventArgs.Item.BackColor = Color.MistyRose;
70 | };
71 |
72 | // Rename requests when double-clicked or F2 is pressed
73 | tlvRequestHistory.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.DoubleClick;
74 |
75 | // How to identify if a row has children
76 | tlvRequestHistory.CanExpandGetter = delegate (Object tx)
77 | {
78 | return ((Request)tx).Children.Count > 0;
79 | };
80 |
81 | // Where row children are located
82 | tlvRequestHistory.ChildrenGetter = delegate (Object tx)
83 | {
84 | return ((Request)tx).Children;
85 | };
86 |
87 | // Populate HexBoxes when the selection changes
88 | tlvRequestHistory.SelectionChanged += (sender, eventArgs) =>
89 | {
90 | if (tlvRequestHistory.SelectedIndex == -1) return;
91 |
92 | Request tx = (Request)tlvRequestHistory.SelectedObject;
93 |
94 | tbDevicePath.Text = tx.DevicePath;
95 | tbIOCTL.Text = tx.IOCTL.ToString("X");
96 | nudInputSize.Value = tx.PreCallInput.Length;
97 | nudOutputSize.Value = tx.PostCallOutput.Length;
98 |
99 | DynamicByteProvider dbpDataInput = new DynamicByteProvider(tx.PreCallInput);
100 | hbInput.ByteProvider = dbpDataInput;
101 |
102 | DynamicByteProvider dbpDataOutput = new DynamicByteProvider(tx.PostCallOutput);
103 | hbOutput.ByteProvider = dbpDataOutput;
104 | };
105 | }
106 |
107 | // Validate provided DeviceName
108 | private void tbDevicePath_TextChanged(object sender, EventArgs e)
109 | {
110 | Guid guid;
111 | if (Guid.TryParse(tbDevicePath.Text, out guid))
112 | {
113 | Point toolTipCoords = tbDevicePath.Location;
114 | //toolTipCoords.X += 20;
115 | //toolTipCoords.Y -= 4;
116 |
117 | try
118 | {
119 | string devicePath = ResolveDeviceInstanceGUID(guid);
120 | tbDevicePath.Text = devicePath;
121 | toolTip.Show("Resolved device instance GUID to symbolic link.", tbDevicePath, toolTipCoords, 3000);
122 | }
123 | catch (ArgumentException exception)
124 | {
125 | toolTip.Show(exception.Message, tbDevicePath, toolTipCoords, 5000);
126 | }
127 | }
128 |
129 | if (IsValidDevicePath(tbDevicePath.Text))
130 | tbDevicePath.BackColor = Color.Honeydew;
131 | else
132 | tbDevicePath.BackColor = Color.MistyRose;
133 | }
134 |
135 | // Validate that provided IOCTL is legitimate
136 | private void tbIOCTL_TextChanged(object sender, EventArgs e)
137 | {
138 | Point toolTipCoords = tbIOCTL.Location;
139 | toolTipCoords.X -= 400;
140 | toolTipCoords.Y += 5;
141 |
142 | uint ioctl;
143 | if (!UInt32.TryParse(tbIOCTL.Text, System.Globalization.NumberStyles.HexNumber, null, out ioctl))
144 | {
145 | tbIOCTL.BackColor = Color.MistyRose;
146 | btnSend.Enabled = false;
147 | toolTip.Show("IOCTL codes must be in hexadecimal format.", tbIOCTL, toolTipCoords, 3000);
148 | }
149 | else
150 | {
151 | tbIOCTL.BackColor = Color.Honeydew;
152 | btnSend.Enabled = true;
153 | }
154 | }
155 |
156 | private void btnSend_Click(object sender, EventArgs e)
157 | {
158 | uint fa_mask = Convert.ToUInt32("20000000", 16);
159 | // if Access mask is enabled use that value
160 | if (tbAccessMask.Enabled == true)
161 | {
162 | fa_mask = Convert.ToUInt32(tbAccessMask.Text, 16);
163 | }
164 | else
165 | {
166 | // otherwise gather the human readable ACL
167 | switch (cmbACL.SelectedItem)
168 | {
169 | case "ANY_ACCESS":
170 | fa_mask = 0;
171 | break;
172 | case "READ_WRITE_DATA":
173 | fa_mask = Convert.ToUInt32(FileAccess.ReadWrite);
174 | break;
175 | case "READ_DATA":
176 | fa_mask = Convert.ToUInt32(FileAccess.Read);
177 | break;
178 | case "WRITE_DATA":
179 | fa_mask = Convert.ToUInt32(FileAccess.Write);
180 | break;
181 | default:
182 | fa_mask = 0;
183 | break;
184 |
185 | }
186 | }
187 | Debug.WriteLine("\nAccess Mask: " + fa_mask);
188 |
189 | SafeFileHandle sfh = CreateFile(
190 | tbDevicePath.Text.Trim(),
191 | dwDesiredAccess: (FileAccess)fa_mask,
192 | dwShareMode: FileShare.ReadWrite,
193 | lpSecurityAttributes: IntPtr.Zero,
194 | dwCreationDisposition: FileMode.Open,
195 | dwFlagsAndAttributes: FileAttributes.Normal,
196 | hTemplateFile: IntPtr.Zero);
197 |
198 | int errorCode = 0;
199 |
200 | uint ioctl = Convert.ToUInt32(tbIOCTL.Text.Trim(), 16);
201 | uint returnedBytes = 0;
202 | uint inputSize = (uint)nudInputSize.Value;
203 | uint outputSize = (uint)nudOutputSize.Value;
204 | byte[] outputBuffer = new byte[outputSize];
205 | byte[] inputBuffer = new byte[inputSize];
206 |
207 |
208 | if (sfh.IsInvalid)
209 | {
210 | // invalid DeviceName
211 | errorCode = Marshal.GetLastWin32Error();
212 | }
213 | else
214 | {
215 | // create buffer with specified content in memory
216 | long hbInputLength = ((DynamicByteProvider)hbInput.ByteProvider).Length;
217 | MemSet(Marshal.UnsafeAddrOfPinnedArrayElement(inputBuffer, 0), 0, (int)hbInputLength);
218 |
219 | for (int i = 0; i < inputSize; i++)
220 | if (i < hbInputLength)
221 | inputBuffer[i] = ((DynamicByteProvider)hbInput.ByteProvider).ReadByte(i);
222 | else
223 | inputBuffer[i] = 0;
224 |
225 | long hbOutputLength = ((DynamicByteProvider)hbOutput.ByteProvider).Length;
226 | MemSet(Marshal.UnsafeAddrOfPinnedArrayElement(outputBuffer, 0), 0, (int)hbOutputLength);
227 | // execute DeviceIoControl request
228 | DeviceIoControl(sfh, ioctl, inputBuffer, inputSize, outputBuffer, outputSize, ref returnedBytes, IntPtr.Zero);
229 | // gather error code
230 | errorCode = Marshal.GetLastWin32Error();
231 | sfh.Close();
232 | // update Input/Output views
233 | DynamicByteProvider requestData = new DynamicByteProvider(inputBuffer);
234 | hbInput.ByteProvider = requestData;
235 |
236 | DynamicByteProvider responseData = new DynamicByteProvider(outputBuffer);
237 | hbOutput.ByteProvider = responseData;
238 | }
239 | // update request view
240 | Request newTx = new Request();
241 | newTx.RequestName = String.Format(
242 | "0x{0:X} ({1:X4}-{2:D5})",
243 | ioctl,
244 | CRC16.ComputeChecksum(inputBuffer),
245 | (int)(DateTime.Now.Ticks % 1e11 / 1e6));
246 | newTx.DevicePath = tbDevicePath.Text;
247 | newTx.IOCTL = ioctl;
248 | newTx.PreCallInput = inputBuffer;
249 | newTx.PostCallOutput = outputBuffer;
250 | newTx.ReturnValue = errorCode;
251 | newTx.BytesReturned = returnedBytes;
252 |
253 | //if (tlvRequestHistory.SelectedObject == null)
254 | //{
255 | // newTx.Parent = null;
256 | // requests.Add(newTx);
257 | //}
258 | //else
259 | //{
260 | // newTx.Parent = (Request)tlvRequestHistory.SelectedObject;
261 |
262 | // if ((newTx.PreCallInput.SequenceEqual(newTx.Parent.PreCallInput)) && (newTx.Parent.Parent != null))
263 | // newTx.Parent.Children.Add(newTx);
264 | // else
265 | // newTx.Children.Add(newTx);
266 | //}
267 |
268 | // Avoiding tree structure for now.
269 | newTx.Parent = null;
270 | requests.Add(newTx);
271 |
272 | tlvRequestHistory.HideSelection = false;
273 | tlvRequestHistory.SetObjects(requests);
274 | tlvRequestHistory.Expand(newTx.Parent);
275 | tlvRequestHistory.Sort(tlvRequestHistory.GetColumn(3), SortOrder.Descending);
276 | return;
277 | }
278 |
279 | // Mark the selected request as a favourite
280 | private void btnStarRequest_Click(object sender, EventArgs e)
281 | {
282 | if (tlvRequestHistory.SelectedIndex == -1) return;
283 | ((Request)tlvRequestHistory.SelectedObject).IsFavourite ^= true;
284 | tlvRequestHistory.SetObjects(requests);
285 | }
286 |
287 | private void btnOpenDB_Click(object sender, EventArgs e)
288 | {
289 | // ToDo
290 | }
291 |
292 | // Filters results in the Request History view (TODO)
293 | private void tbFilters_TextChanged(object sender, EventArgs e)
294 | {
295 | tlvRequestHistory.ModelFilter = null;
296 | tlvRequestHistory.ModelFilter = new ModelFilter(delegate (Object tx)
297 | {
298 | return ((Request)tx).RequestName.Contains(tbFilters.Text);
299 | });
300 | }
301 |
302 | // Shows the About window
303 | private void btnAbout_Click(object sender, EventArgs e)
304 | {
305 | if (Application.OpenForms["AboutForm"] as AboutForm == null)
306 | {
307 | AboutForm aboutForm = new AboutForm();
308 | aboutForm.Show();
309 | }
310 | else
311 | {
312 | AboutForm aboutForm = Application.OpenForms["AboutForm"] as AboutForm;
313 | aboutForm.Focus();
314 | }
315 | }
316 |
317 | // parse and validate Access Mask
318 | private void tbAccessMask_TextChanged(object sender, EventArgs e)
319 | {
320 | Point toolTipCoords = tbAccessMask.Location;
321 | toolTipCoords.X -= 400;
322 | toolTipCoords.Y -= 20;
323 |
324 | uint fa_mask;
325 | if (!UInt32.TryParse(tbAccessMask.Text, System.Globalization.NumberStyles.HexNumber, null, out fa_mask))
326 | {
327 | tbAccessMask.BackColor = Color.MistyRose;
328 | btnSend.Enabled = false;
329 | toolTip.Show("Access Mask code must be in hexadecimal format.", tbAccessMask, toolTipCoords, 3000);
330 | }
331 | else
332 | {
333 | tbAccessMask.BackColor = Color.Honeydew;
334 | btnSend.Enabled = true;
335 | }
336 |
337 | }
338 |
339 | // update input panel when the InputSize is changed
340 | private void nudInputSize_ValueChanged(object sender, EventArgs e)
341 | {
342 | DynamicByteProvider dbpData = new DynamicByteProvider(new byte[(int)nudInputSize.Value]);
343 | hbInput.ByteProvider = dbpData;
344 | }
345 |
346 | // update output panel when the OutputSize is changed
347 | private void nudOutputSize_ValueChanged(object sender, EventArgs e)
348 | {
349 | DynamicByteProvider dbpData = new DynamicByteProvider(new byte[(int)nudOutputSize.Value]);
350 | hbOutput.ByteProvider = dbpData;
351 | }
352 |
353 | private void hbInput_ByteProviderChanged(object sender, EventArgs e)
354 | {
355 | //DynamicByteProvider dbpData = new DynamicByteProvider(new byte[(int)hbInput.ByteProvider.Length]);
356 | //nudInputSize.Value = (int)dbpData;
357 | }
358 |
359 | // show the settings form
360 | private void btnSettings_Click(object sender, EventArgs e)
361 | {
362 | if (Application.OpenForms["SettingsForm"] as SettingsForm == null)
363 | {
364 | SettingsForm settingsForm = new SettingsForm(this);
365 | settingsForm.Show();
366 | }
367 | else
368 | {
369 | SettingsForm settingsForm = Application.OpenForms["SettingsForm"] as SettingsForm;
370 | settingsForm.Focus();
371 | }
372 | }
373 |
374 | // enable/disable access mask
375 | private void chkEnableAccessMask_CheckedChanged(object sender, EventArgs e)
376 | {
377 | if (chkEnableAccessMask.Checked == true)
378 | {
379 | tbAccessMask.Enabled = true;
380 | cmbACL.Enabled = false;
381 | }
382 | else
383 | {
384 | tbAccessMask.Enabled = false;
385 | cmbACL.Enabled = true;
386 | }
387 |
388 | }
389 | }
390 | }
391 |
--------------------------------------------------------------------------------
/ioctlpus/SettingsForm.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace ioctlpus
3 | {
4 | partial class SettingsForm
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | this.components = new System.ComponentModel.Container();
33 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
34 | this.gbInputOptions = new System.Windows.Forms.GroupBox();
35 | this.numNumberBytesIn = new System.Windows.Forms.NumericUpDown();
36 | this.lblNumberBytesIn = new System.Windows.Forms.Label();
37 | this.InPaneStringsView = new System.Windows.Forms.CheckBox();
38 | this.InPaneBarView = new System.Windows.Forms.CheckBox();
39 | this.InPaneSeparatorView = new System.Windows.Forms.CheckBox();
40 | this.gbOutputOptions = new System.Windows.Forms.GroupBox();
41 | this.numNumberBytesOut = new System.Windows.Forms.NumericUpDown();
42 | this.lblNumberBytesOut = new System.Windows.Forms.Label();
43 | this.OutPaneStringsView = new System.Windows.Forms.CheckBox();
44 | this.OutPaneBarView = new System.Windows.Forms.CheckBox();
45 | this.OutPaneSeparatorView = new System.Windows.Forms.CheckBox();
46 | this.btnImportSettings = new System.Windows.Forms.Button();
47 | this.btnExportSettings = new System.Windows.Forms.Button();
48 | this.toolTip = new System.Windows.Forms.ToolTip(this.components);
49 | this.gbInputOptions.SuspendLayout();
50 | ((System.ComponentModel.ISupportInitialize)(this.numNumberBytesIn)).BeginInit();
51 | this.gbOutputOptions.SuspendLayout();
52 | ((System.ComponentModel.ISupportInitialize)(this.numNumberBytesOut)).BeginInit();
53 | this.SuspendLayout();
54 | //
55 | // gbInputOptions
56 | //
57 | this.gbInputOptions.Controls.Add(this.numNumberBytesIn);
58 | this.gbInputOptions.Controls.Add(this.lblNumberBytesIn);
59 | this.gbInputOptions.Controls.Add(this.InPaneStringsView);
60 | this.gbInputOptions.Controls.Add(this.InPaneBarView);
61 | this.gbInputOptions.Controls.Add(this.InPaneSeparatorView);
62 | this.gbInputOptions.Location = new System.Drawing.Point(12, 12);
63 | this.gbInputOptions.Name = "gbInputOptions";
64 | this.gbInputOptions.Size = new System.Drawing.Size(200, 89);
65 | this.gbInputOptions.TabIndex = 0;
66 | this.gbInputOptions.TabStop = false;
67 | this.gbInputOptions.Text = "Input Panel Options";
68 | //
69 | // numNumberBytesIn
70 | //
71 | this.numNumberBytesIn.Increment = new decimal(new int[] {
72 | 4,
73 | 0,
74 | 0,
75 | 0});
76 | this.numNumberBytesIn.Location = new System.Drawing.Point(85, 56);
77 | this.numNumberBytesIn.Maximum = new decimal(new int[] {
78 | 16,
79 | 0,
80 | 0,
81 | 0});
82 | this.numNumberBytesIn.Minimum = new decimal(new int[] {
83 | 4,
84 | 0,
85 | 0,
86 | 0});
87 | this.numNumberBytesIn.Name = "numNumberBytesIn";
88 | this.numNumberBytesIn.Size = new System.Drawing.Size(40, 20);
89 | this.numNumberBytesIn.TabIndex = 7;
90 | this.numNumberBytesIn.Value = new decimal(new int[] {
91 | 4,
92 | 0,
93 | 0,
94 | 0});
95 | this.numNumberBytesIn.ValueChanged += new System.EventHandler(this.numNumberBytesIn_ValueChanged);
96 | //
97 | // lblNumberBytesIn
98 | //
99 | this.lblNumberBytesIn.AutoSize = true;
100 | this.lblNumberBytesIn.Location = new System.Drawing.Point(6, 58);
101 | this.lblNumberBytesIn.Name = "lblNumberBytesIn";
102 | this.lblNumberBytesIn.Size = new System.Drawing.Size(73, 13);
103 | this.lblNumberBytesIn.TabIndex = 6;
104 | this.lblNumberBytesIn.Text = "Bytes per line:";
105 | //
106 | // InPaneStringsView
107 | //
108 | this.InPaneStringsView.Appearance = System.Windows.Forms.Appearance.Button;
109 | this.InPaneStringsView.Checked = true;
110 | this.InPaneStringsView.CheckState = System.Windows.Forms.CheckState.Checked;
111 | this.InPaneStringsView.Image = global::ioctlpus.Properties.Resources.application_string;
112 | this.InPaneStringsView.ImeMode = System.Windows.Forms.ImeMode.NoControl;
113 | this.InPaneStringsView.Location = new System.Drawing.Point(6, 19);
114 | this.InPaneStringsView.Name = "InPaneStringsView";
115 | this.InPaneStringsView.Size = new System.Drawing.Size(32, 32);
116 | this.InPaneStringsView.TabIndex = 1;
117 | this.toolTip.SetToolTip(this.InPaneStringsView, "Display/hide string");
118 | this.InPaneStringsView.UseVisualStyleBackColor = true;
119 | this.InPaneStringsView.CheckedChanged += new System.EventHandler(this.InPaneStringsView_CheckedChanged);
120 | //
121 | // InPaneBarView
122 | //
123 | this.InPaneBarView.Appearance = System.Windows.Forms.Appearance.Button;
124 | this.InPaneBarView.Checked = true;
125 | this.InPaneBarView.CheckState = System.Windows.Forms.CheckState.Checked;
126 | this.InPaneBarView.Image = global::ioctlpus.Properties.Resources.application_bars;
127 | this.InPaneBarView.ImeMode = System.Windows.Forms.ImeMode.NoControl;
128 | this.InPaneBarView.Location = new System.Drawing.Point(68, 19);
129 | this.InPaneBarView.Name = "InPaneBarView";
130 | this.InPaneBarView.Size = new System.Drawing.Size(32, 32);
131 | this.InPaneBarView.TabIndex = 5;
132 | this.toolTip.SetToolTip(this.InPaneBarView, "Display/hide hex bar");
133 | this.InPaneBarView.UseVisualStyleBackColor = true;
134 | this.InPaneBarView.CheckedChanged += new System.EventHandler(this.InPaneBarView_CheckedChanged);
135 | //
136 | // InPaneSeparatorView
137 | //
138 | this.InPaneSeparatorView.Appearance = System.Windows.Forms.Appearance.Button;
139 | this.InPaneSeparatorView.Checked = true;
140 | this.InPaneSeparatorView.CheckState = System.Windows.Forms.CheckState.Checked;
141 | this.InPaneSeparatorView.Image = global::ioctlpus.Properties.Resources.application_separator;
142 | this.InPaneSeparatorView.ImeMode = System.Windows.Forms.ImeMode.NoControl;
143 | this.InPaneSeparatorView.Location = new System.Drawing.Point(37, 19);
144 | this.InPaneSeparatorView.Name = "InPaneSeparatorView";
145 | this.InPaneSeparatorView.Size = new System.Drawing.Size(32, 32);
146 | this.InPaneSeparatorView.TabIndex = 3;
147 | this.toolTip.SetToolTip(this.InPaneSeparatorView, "Display/hide separator");
148 | this.InPaneSeparatorView.UseVisualStyleBackColor = true;
149 | this.InPaneSeparatorView.CheckedChanged += new System.EventHandler(this.InPaneSeparatorView_CheckedChanged);
150 | //
151 | // gbOutputOptions
152 | //
153 | this.gbOutputOptions.Controls.Add(this.numNumberBytesOut);
154 | this.gbOutputOptions.Controls.Add(this.lblNumberBytesOut);
155 | this.gbOutputOptions.Controls.Add(this.OutPaneStringsView);
156 | this.gbOutputOptions.Controls.Add(this.OutPaneBarView);
157 | this.gbOutputOptions.Controls.Add(this.OutPaneSeparatorView);
158 | this.gbOutputOptions.Location = new System.Drawing.Point(218, 12);
159 | this.gbOutputOptions.Name = "gbOutputOptions";
160 | this.gbOutputOptions.Size = new System.Drawing.Size(200, 89);
161 | this.gbOutputOptions.TabIndex = 0;
162 | this.gbOutputOptions.TabStop = false;
163 | this.gbOutputOptions.Text = "Output Panel Options";
164 | //
165 | // numNumberBytesOut
166 | //
167 | this.numNumberBytesOut.Increment = new decimal(new int[] {
168 | 4,
169 | 0,
170 | 0,
171 | 0});
172 | this.numNumberBytesOut.Location = new System.Drawing.Point(85, 56);
173 | this.numNumberBytesOut.Maximum = new decimal(new int[] {
174 | 16,
175 | 0,
176 | 0,
177 | 0});
178 | this.numNumberBytesOut.Minimum = new decimal(new int[] {
179 | 4,
180 | 0,
181 | 0,
182 | 0});
183 | this.numNumberBytesOut.Name = "numNumberBytesOut";
184 | this.numNumberBytesOut.Size = new System.Drawing.Size(41, 20);
185 | this.numNumberBytesOut.TabIndex = 8;
186 | this.numNumberBytesOut.Value = new decimal(new int[] {
187 | 4,
188 | 0,
189 | 0,
190 | 0});
191 | this.numNumberBytesOut.ValueChanged += new System.EventHandler(this.numNumberBytesOut_ValueChanged);
192 | //
193 | // lblNumberBytesOut
194 | //
195 | this.lblNumberBytesOut.AutoSize = true;
196 | this.lblNumberBytesOut.Location = new System.Drawing.Point(6, 58);
197 | this.lblNumberBytesOut.Name = "lblNumberBytesOut";
198 | this.lblNumberBytesOut.Size = new System.Drawing.Size(73, 13);
199 | this.lblNumberBytesOut.TabIndex = 7;
200 | this.lblNumberBytesOut.Text = "Bytes per line:";
201 | //
202 | // OutPaneStringsView
203 | //
204 | this.OutPaneStringsView.Appearance = System.Windows.Forms.Appearance.Button;
205 | this.OutPaneStringsView.Checked = true;
206 | this.OutPaneStringsView.CheckState = System.Windows.Forms.CheckState.Checked;
207 | this.OutPaneStringsView.Image = global::ioctlpus.Properties.Resources.application_string;
208 | this.OutPaneStringsView.ImeMode = System.Windows.Forms.ImeMode.NoControl;
209 | this.OutPaneStringsView.Location = new System.Drawing.Point(6, 19);
210 | this.OutPaneStringsView.Name = "OutPaneStringsView";
211 | this.OutPaneStringsView.Size = new System.Drawing.Size(32, 32);
212 | this.OutPaneStringsView.TabIndex = 2;
213 | this.toolTip.SetToolTip(this.OutPaneStringsView, "Display/hide string");
214 | this.OutPaneStringsView.UseVisualStyleBackColor = true;
215 | this.OutPaneStringsView.CheckedChanged += new System.EventHandler(this.OutPaneStringsView_CheckedChanged);
216 | //
217 | // OutPaneBarView
218 | //
219 | this.OutPaneBarView.Appearance = System.Windows.Forms.Appearance.Button;
220 | this.OutPaneBarView.Checked = true;
221 | this.OutPaneBarView.CheckState = System.Windows.Forms.CheckState.Checked;
222 | this.OutPaneBarView.Image = global::ioctlpus.Properties.Resources.application_bars;
223 | this.OutPaneBarView.ImeMode = System.Windows.Forms.ImeMode.NoControl;
224 | this.OutPaneBarView.Location = new System.Drawing.Point(68, 19);
225 | this.OutPaneBarView.Name = "OutPaneBarView";
226 | this.OutPaneBarView.Size = new System.Drawing.Size(32, 32);
227 | this.OutPaneBarView.TabIndex = 6;
228 | this.toolTip.SetToolTip(this.OutPaneBarView, "Display/hide hex bar");
229 | this.OutPaneBarView.UseVisualStyleBackColor = true;
230 | this.OutPaneBarView.CheckedChanged += new System.EventHandler(this.OutPaneBarView_CheckedChanged);
231 | //
232 | // OutPaneSeparatorView
233 | //
234 | this.OutPaneSeparatorView.Appearance = System.Windows.Forms.Appearance.Button;
235 | this.OutPaneSeparatorView.Checked = true;
236 | this.OutPaneSeparatorView.CheckState = System.Windows.Forms.CheckState.Checked;
237 | this.OutPaneSeparatorView.Image = global::ioctlpus.Properties.Resources.application_separator;
238 | this.OutPaneSeparatorView.ImeMode = System.Windows.Forms.ImeMode.NoControl;
239 | this.OutPaneSeparatorView.Location = new System.Drawing.Point(37, 19);
240 | this.OutPaneSeparatorView.Name = "OutPaneSeparatorView";
241 | this.OutPaneSeparatorView.Size = new System.Drawing.Size(32, 32);
242 | this.OutPaneSeparatorView.TabIndex = 4;
243 | this.toolTip.SetToolTip(this.OutPaneSeparatorView, "Display/hide separator");
244 | this.OutPaneSeparatorView.UseVisualStyleBackColor = true;
245 | this.OutPaneSeparatorView.CheckedChanged += new System.EventHandler(this.OutPaneSeparatorView_CheckedChanged);
246 | //
247 | // btnImportSettings
248 | //
249 | this.btnImportSettings.Enabled = false;
250 | this.btnImportSettings.Image = global::ioctlpus.Properties.Resources.door_in;
251 | this.btnImportSettings.Location = new System.Drawing.Point(12, 107);
252 | this.btnImportSettings.Name = "btnImportSettings";
253 | this.btnImportSettings.Size = new System.Drawing.Size(32, 32);
254 | this.btnImportSettings.TabIndex = 0;
255 | this.toolTip.SetToolTip(this.btnImportSettings, "Import settings");
256 | this.btnImportSettings.UseVisualStyleBackColor = true;
257 | //
258 | // btnExportSettings
259 | //
260 | this.btnExportSettings.Enabled = false;
261 | this.btnExportSettings.Image = global::ioctlpus.Properties.Resources.door_out;
262 | this.btnExportSettings.Location = new System.Drawing.Point(49, 107);
263 | this.btnExportSettings.Name = "btnExportSettings";
264 | this.btnExportSettings.Size = new System.Drawing.Size(32, 32);
265 | this.btnExportSettings.TabIndex = 0;
266 | this.toolTip.SetToolTip(this.btnExportSettings, "Export settings");
267 | this.btnExportSettings.UseVisualStyleBackColor = true;
268 | //
269 | // SettingsForm
270 | //
271 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
272 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
273 | this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
274 | this.ClientSize = new System.Drawing.Size(430, 147);
275 | this.Controls.Add(this.btnExportSettings);
276 | this.Controls.Add(this.btnImportSettings);
277 | this.Controls.Add(this.gbOutputOptions);
278 | this.Controls.Add(this.gbInputOptions);
279 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
280 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
281 | this.MaximizeBox = false;
282 | this.MinimizeBox = false;
283 | this.MinimumSize = new System.Drawing.Size(446, 186);
284 | this.Name = "SettingsForm";
285 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
286 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
287 | this.Text = "IOCTLpus - Settings";
288 | this.gbInputOptions.ResumeLayout(false);
289 | this.gbInputOptions.PerformLayout();
290 | ((System.ComponentModel.ISupportInitialize)(this.numNumberBytesIn)).EndInit();
291 | this.gbOutputOptions.ResumeLayout(false);
292 | this.gbOutputOptions.PerformLayout();
293 | ((System.ComponentModel.ISupportInitialize)(this.numNumberBytesOut)).EndInit();
294 | this.ResumeLayout(false);
295 |
296 | }
297 |
298 | #endregion
299 | private System.Windows.Forms.GroupBox gbInputOptions;
300 | private System.Windows.Forms.GroupBox gbOutputOptions;
301 | private System.Windows.Forms.CheckBox InPaneBarView;
302 | private System.Windows.Forms.CheckBox InPaneSeparatorView;
303 | private System.Windows.Forms.CheckBox OutPaneStringsView;
304 | private System.Windows.Forms.CheckBox OutPaneBarView;
305 | private System.Windows.Forms.CheckBox OutPaneSeparatorView;
306 | private System.Windows.Forms.Button btnImportSettings;
307 | private System.Windows.Forms.Button btnExportSettings;
308 | private System.Windows.Forms.ToolTip toolTip;
309 | private System.Windows.Forms.Label lblNumberBytesIn;
310 | private System.Windows.Forms.CheckBox InPaneStringsView;
311 | private System.Windows.Forms.Label lblNumberBytesOut;
312 | public System.Windows.Forms.NumericUpDown numNumberBytesIn;
313 | public System.Windows.Forms.NumericUpDown numNumberBytesOut;
314 | }
315 | }
--------------------------------------------------------------------------------
/ioctlpus/ioctlpus.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {D1B74F9A-055F-4D4F-8649-3991C041838B}
8 | Exe
9 | Properties
10 | ioctlpus
11 | IOCTLpus
12 | v4.6.1
13 | 512
14 | true
15 | false
16 |
17 |
18 |
19 | publish\
20 | true
21 | Disk
22 | false
23 | Foreground
24 | 7
25 | Days
26 | false
27 | false
28 | true
29 | 3
30 | 0.1.0.%2a
31 | false
32 | true
33 | true
34 |
35 |
36 | icon.ico
37 |
38 |
39 | ioctlpus.Program
40 |
41 |
42 | app.manifest
43 |
44 |
45 | D4BA4E86A0CC3ADE70C071563C099F0180995524
46 |
47 |
48 | ioctlpus_TemporaryKey.pfx
49 |
50 |
51 | false
52 |
53 |
54 | LocalIntranet
55 |
56 |
57 | false
58 |
59 |
60 | true
61 | bin\x86\Debug\
62 | DEBUG;TRACE
63 | full
64 | x86
65 | 7.3
66 | prompt
67 | true
68 | MinimumRecommendedRules.ruleset
69 | false
70 |
71 |
72 | bin\x86\Release\
73 | TRACE
74 | true
75 | pdbonly
76 | x86
77 | 7.3
78 | prompt
79 | true
80 |
81 |
82 | x64
83 | bin\x64\Debug\
84 |
85 |
86 | x64
87 | bin\x64\Release\
88 |
89 |
90 |
91 | ..\packages\Be.Windows.Forms.HexBox.1.6.1\lib\net40\Be.Windows.Forms.HexBox.dll
92 |
93 |
94 | ..\packages\CommandLineParser.2.8.0\lib\net45\CommandLine.dll
95 |
96 |
97 | ..\packages\ObjectListView.2.7.1.5\lib\ListViewPrinter.dll
98 |
99 |
100 | ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll
101 |
102 |
103 | ..\packages\ObjectListView.2.7.1.5\lib\ObjectListView.dll
104 |
105 |
106 | ..\packages\ObjectListView.2.7.1.5\lib\SparkleLibrary.dll
107 |
108 |
109 |
110 | ..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll
111 |
112 |
113 | ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
114 |
115 |
116 |
117 | ..\packages\System.Console.4.3.1\lib\net46\System.Console.dll
118 |
119 |
120 |
121 | ..\packages\System.Diagnostics.DiagnosticSource.5.0.1\lib\net46\System.Diagnostics.DiagnosticSource.dll
122 |
123 |
124 | ..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll
125 |
126 |
127 | ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll
128 |
129 |
130 |
131 | ..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll
132 |
133 |
134 | ..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll
135 |
136 |
137 | ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll
138 |
139 |
140 | ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll
141 |
142 |
143 | ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll
144 |
145 |
146 | ..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll
147 |
148 |
149 |
150 | ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
151 |
152 |
153 | ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll
154 |
155 |
156 | ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
157 |
158 |
159 | ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll
160 |
161 |
162 | ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
163 |
164 |
165 | ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
166 |
167 |
168 | ..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 | ..\packages\System.Xml.ReaderWriter.4.3.1\lib\net46\System.Xml.ReaderWriter.dll
180 |
181 |
182 |
183 |
184 | Form
185 |
186 |
187 | AboutForm.cs
188 |
189 |
190 | True
191 | True
192 | Resources.resx
193 |
194 |
195 | Form
196 |
197 |
198 | SettingsForm.cs
199 |
200 |
201 | Form
202 |
203 |
204 | MainForm.cs
205 |
206 |
207 |
208 |
209 |
210 |
211 | AboutForm.cs
212 |
213 |
214 | MainForm.cs
215 |
216 |
217 | ResXFileCodeGenerator
218 | Designer
219 | Resources.Designer.cs
220 |
221 |
222 | SettingsForm.cs
223 |
224 |
225 |
226 |
227 | SettingsSingleFileGenerator
228 | Settings.Designer.cs
229 |
230 |
231 | True
232 | Settings.settings
233 | True
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 | False
299 | Microsoft .NET Framework 4.5.2 %28x86 and x64%29
300 | true
301 |
302 |
303 | False
304 | .NET Framework 3.5 SP1
305 | false
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 | Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.
319 |
320 |
321 |
322 |
323 |
330 |
331 |
332 |
333 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | {one line to give the program's name and a brief idea of what it does.}
635 | Copyright (C) {year} {name of author}
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | {project} Copyright (C) {year} {fullname}
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/ioctlpus/MainForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ioctlpus
2 | {
3 | partial class MainForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
33 | this.toolTip = new System.Windows.Forms.ToolTip(this.components);
34 | this.btnSaveDB = new System.Windows.Forms.Button();
35 | this.btnStarRequest = new System.Windows.Forms.Button();
36 | this.btnSettings = new System.Windows.Forms.Button();
37 | this.btnDeleteRequest = new System.Windows.Forms.Button();
38 | this.btnAbout = new System.Windows.Forms.Button();
39 | this.btnOpenDB = new System.Windows.Forms.Button();
40 | this.tbFilters = new System.Windows.Forms.TextBox();
41 | this.tlpPanes = new System.Windows.Forms.TableLayoutPanel();
42 | this.gbRightPane = new System.Windows.Forms.GroupBox();
43 | this.hbOutput = new Be.Windows.Forms.HexBox();
44 | this.gbLeftPane = new System.Windows.Forms.GroupBox();
45 | this.hbInput = new Be.Windows.Forms.HexBox();
46 | this.tlpTop = new System.Windows.Forms.TableLayoutPanel();
47 | this.pnlReqParams = new System.Windows.Forms.Panel();
48 | this.cmbACL = new System.Windows.Forms.ComboBox();
49 | this.chkEnableAccessMask = new System.Windows.Forms.CheckBox();
50 | this.lblHumanACL = new System.Windows.Forms.Label();
51 | this.btnSend = new System.Windows.Forms.Button();
52 | this.tbAccessMask = new System.Windows.Forms.TextBox();
53 | this.lblOutputSize = new System.Windows.Forms.Label();
54 | this.nudOutputSize = new System.Windows.Forms.NumericUpDown();
55 | this.lblRepeat = new System.Windows.Forms.Label();
56 | this.nudRepeat = new System.Windows.Forms.NumericUpDown();
57 | this.lblInputSize = new System.Windows.Forms.Label();
58 | this.lblIOCTLCode = new System.Windows.Forms.Label();
59 | this.tbIOCTL = new System.Windows.Forms.TextBox();
60 | this.tbDevicePath = new System.Windows.Forms.TextBox();
61 | this.lblDevPath = new System.Windows.Forms.Label();
62 | this.nudInputSize = new System.Windows.Forms.NumericUpDown();
63 | this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
64 | this.gbRequestHistory = new System.Windows.Forms.GroupBox();
65 | this.tlvRequestHistory = new BrightIdeasSoftware.TreeListView();
66 | this.olvColumnRequest = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
67 | this.olvColumnRetVal = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
68 | this.olvColumnBytesReturned = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
69 | this.olvColumnTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
70 | this.tlpPanes.SuspendLayout();
71 | this.gbRightPane.SuspendLayout();
72 | this.gbLeftPane.SuspendLayout();
73 | this.tlpTop.SuspendLayout();
74 | this.pnlReqParams.SuspendLayout();
75 | ((System.ComponentModel.ISupportInitialize)(this.nudOutputSize)).BeginInit();
76 | ((System.ComponentModel.ISupportInitialize)(this.nudRepeat)).BeginInit();
77 | ((System.ComponentModel.ISupportInitialize)(this.nudInputSize)).BeginInit();
78 | this.tlpMain.SuspendLayout();
79 | this.gbRequestHistory.SuspendLayout();
80 | ((System.ComponentModel.ISupportInitialize)(this.tlvRequestHistory)).BeginInit();
81 | this.SuspendLayout();
82 | //
83 | // toolTip
84 | //
85 | this.toolTip.AutomaticDelay = 250;
86 | //
87 | // btnSaveDB
88 | //
89 | this.btnSaveDB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
90 | this.btnSaveDB.Enabled = false;
91 | this.btnSaveDB.Image = global::ioctlpus.Properties.Resources.database_save;
92 | this.btnSaveDB.ImeMode = System.Windows.Forms.ImeMode.NoControl;
93 | this.btnSaveDB.Location = new System.Drawing.Point(1091, 95);
94 | this.btnSaveDB.Name = "btnSaveDB";
95 | this.btnSaveDB.Size = new System.Drawing.Size(32, 32);
96 | this.btnSaveDB.TabIndex = 14;
97 | this.toolTip.SetToolTip(this.btnSaveDB, "Save database");
98 | this.btnSaveDB.UseVisualStyleBackColor = true;
99 | //
100 | // btnStarRequest
101 | //
102 | this.btnStarRequest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
103 | this.btnStarRequest.Image = global::ioctlpus.Properties.Resources.star;
104 | this.btnStarRequest.ImeMode = System.Windows.Forms.ImeMode.NoControl;
105 | this.btnStarRequest.Location = new System.Drawing.Point(1091, 133);
106 | this.btnStarRequest.Name = "btnStarRequest";
107 | this.btnStarRequest.Size = new System.Drawing.Size(32, 32);
108 | this.btnStarRequest.TabIndex = 15;
109 | this.toolTip.SetToolTip(this.btnStarRequest, "Mark selected request as favourite");
110 | this.btnStarRequest.UseVisualStyleBackColor = true;
111 | this.btnStarRequest.Click += new System.EventHandler(this.btnStarRequest_Click);
112 | //
113 | // btnSettings
114 | //
115 | this.btnSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
116 | this.btnSettings.Image = global::ioctlpus.Properties.Resources.cog;
117 | this.btnSettings.ImeMode = System.Windows.Forms.ImeMode.NoControl;
118 | this.btnSettings.Location = new System.Drawing.Point(1091, 19);
119 | this.btnSettings.Name = "btnSettings";
120 | this.btnSettings.Size = new System.Drawing.Size(32, 32);
121 | this.btnSettings.TabIndex = 12;
122 | this.toolTip.SetToolTip(this.btnSettings, "Settings");
123 | this.btnSettings.UseVisualStyleBackColor = true;
124 | this.btnSettings.Click += new System.EventHandler(this.btnSettings_Click);
125 | //
126 | // btnDeleteRequest
127 | //
128 | this.btnDeleteRequest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
129 | this.btnDeleteRequest.Enabled = false;
130 | this.btnDeleteRequest.Image = global::ioctlpus.Properties.Resources.delete;
131 | this.btnDeleteRequest.ImeMode = System.Windows.Forms.ImeMode.NoControl;
132 | this.btnDeleteRequest.Location = new System.Drawing.Point(1091, 171);
133 | this.btnDeleteRequest.Name = "btnDeleteRequest";
134 | this.btnDeleteRequest.Size = new System.Drawing.Size(32, 32);
135 | this.btnDeleteRequest.TabIndex = 16;
136 | this.toolTip.SetToolTip(this.btnDeleteRequest, "Delete request");
137 | this.btnDeleteRequest.UseVisualStyleBackColor = true;
138 | //
139 | // btnAbout
140 | //
141 | this.btnAbout.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
142 | this.btnAbout.Image = global::ioctlpus.Properties.Resources.help;
143 | this.btnAbout.ImeMode = System.Windows.Forms.ImeMode.NoControl;
144 | this.btnAbout.Location = new System.Drawing.Point(1091, 234);
145 | this.btnAbout.Name = "btnAbout";
146 | this.btnAbout.Size = new System.Drawing.Size(32, 32);
147 | this.btnAbout.TabIndex = 17;
148 | this.toolTip.SetToolTip(this.btnAbout, "About");
149 | this.btnAbout.UseVisualStyleBackColor = true;
150 | this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click);
151 | //
152 | // btnOpenDB
153 | //
154 | this.btnOpenDB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
155 | this.btnOpenDB.Enabled = false;
156 | this.btnOpenDB.Image = global::ioctlpus.Properties.Resources.database_add;
157 | this.btnOpenDB.ImeMode = System.Windows.Forms.ImeMode.NoControl;
158 | this.btnOpenDB.Location = new System.Drawing.Point(1091, 57);
159 | this.btnOpenDB.Name = "btnOpenDB";
160 | this.btnOpenDB.Size = new System.Drawing.Size(32, 32);
161 | this.btnOpenDB.TabIndex = 13;
162 | this.toolTip.SetToolTip(this.btnOpenDB, "Load database");
163 | this.btnOpenDB.UseVisualStyleBackColor = true;
164 | this.btnOpenDB.Click += new System.EventHandler(this.btnOpenDB_Click);
165 | //
166 | // tbFilters
167 | //
168 | this.tbFilters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
169 | | System.Windows.Forms.AnchorStyles.Right)));
170 | this.tbFilters.Enabled = false;
171 | this.tbFilters.Font = new System.Drawing.Font("Consolas", 8.25F);
172 | this.tbFilters.Location = new System.Drawing.Point(6, 244);
173 | this.tbFilters.Name = "tbFilters";
174 | this.tbFilters.Size = new System.Drawing.Size(1079, 20);
175 | this.tbFilters.TabIndex = 11;
176 | this.toolTip.SetToolTip(this.tbFilters, "Filter request view");
177 | this.tbFilters.TextChanged += new System.EventHandler(this.tbFilters_TextChanged);
178 | //
179 | // tlpPanes
180 | //
181 | this.tlpPanes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
182 | | System.Windows.Forms.AnchorStyles.Left)
183 | | System.Windows.Forms.AnchorStyles.Right)));
184 | this.tlpPanes.ColumnCount = 2;
185 | this.tlpPanes.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
186 | this.tlpPanes.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
187 | this.tlpPanes.Controls.Add(this.gbRightPane, 1, 0);
188 | this.tlpPanes.Controls.Add(this.gbLeftPane, 0, 0);
189 | this.tlpPanes.Location = new System.Drawing.Point(3, 118);
190 | this.tlpPanes.Name = "tlpPanes";
191 | this.tlpPanes.RowCount = 1;
192 | this.tlpPanes.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
193 | this.tlpPanes.Size = new System.Drawing.Size(1129, 204);
194 | this.tlpPanes.TabIndex = 0;
195 | //
196 | // gbRightPane
197 | //
198 | this.gbRightPane.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
199 | | System.Windows.Forms.AnchorStyles.Left)
200 | | System.Windows.Forms.AnchorStyles.Right)));
201 | this.gbRightPane.Controls.Add(this.hbOutput);
202 | this.gbRightPane.Location = new System.Drawing.Point(567, 3);
203 | this.gbRightPane.Name = "gbRightPane";
204 | this.gbRightPane.Size = new System.Drawing.Size(559, 198);
205 | this.gbRightPane.TabIndex = 1;
206 | this.gbRightPane.TabStop = false;
207 | this.gbRightPane.Text = "Output Buffer";
208 | //
209 | // hbOutput
210 | //
211 | this.hbOutput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
212 | | System.Windows.Forms.AnchorStyles.Left)
213 | | System.Windows.Forms.AnchorStyles.Right)));
214 | this.hbOutput.BytesPerLine = 8;
215 | this.hbOutput.ColumnInfoVisible = true;
216 | this.hbOutput.Font = new System.Drawing.Font("Consolas", 9F);
217 | this.hbOutput.GroupSeparatorVisible = true;
218 | this.hbOutput.InfoForeColor = System.Drawing.Color.Empty;
219 | this.hbOutput.LineInfoVisible = true;
220 | this.hbOutput.Location = new System.Drawing.Point(6, 19);
221 | this.hbOutput.Name = "hbOutput";
222 | this.hbOutput.ShadowSelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(60)))), ((int)(((byte)(188)))), ((int)(((byte)(255)))));
223 | this.hbOutput.Size = new System.Drawing.Size(547, 173);
224 | this.hbOutput.StringViewVisible = true;
225 | this.hbOutput.TabIndex = 9;
226 | this.hbOutput.UseFixedBytesPerLine = true;
227 | this.hbOutput.VScrollBarVisible = true;
228 | //
229 | // gbLeftPane
230 | //
231 | this.gbLeftPane.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
232 | | System.Windows.Forms.AnchorStyles.Left)
233 | | System.Windows.Forms.AnchorStyles.Right)));
234 | this.gbLeftPane.Controls.Add(this.hbInput);
235 | this.gbLeftPane.Location = new System.Drawing.Point(3, 3);
236 | this.gbLeftPane.Name = "gbLeftPane";
237 | this.gbLeftPane.Size = new System.Drawing.Size(558, 198);
238 | this.gbLeftPane.TabIndex = 0;
239 | this.gbLeftPane.TabStop = false;
240 | this.gbLeftPane.Text = "Input Buffer";
241 | //
242 | // hbInput
243 | //
244 | this.hbInput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
245 | | System.Windows.Forms.AnchorStyles.Left)
246 | | System.Windows.Forms.AnchorStyles.Right)));
247 | this.hbInput.BytesPerLine = 8;
248 | this.hbInput.ColumnInfoVisible = true;
249 | this.hbInput.Font = new System.Drawing.Font("Consolas", 9F);
250 | this.hbInput.GroupSeparatorVisible = true;
251 | this.hbInput.InfoForeColor = System.Drawing.Color.Empty;
252 | this.hbInput.LineInfoVisible = true;
253 | this.hbInput.Location = new System.Drawing.Point(6, 19);
254 | this.hbInput.Name = "hbInput";
255 | this.hbInput.ShadowSelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(60)))), ((int)(((byte)(188)))), ((int)(((byte)(255)))));
256 | this.hbInput.Size = new System.Drawing.Size(546, 173);
257 | this.hbInput.StringViewVisible = true;
258 | this.hbInput.TabIndex = 6;
259 | this.hbInput.UseFixedBytesPerLine = true;
260 | this.hbInput.VScrollBarVisible = true;
261 | this.hbInput.ByteProviderChanged += new System.EventHandler(this.hbInput_ByteProviderChanged);
262 | //
263 | // tlpTop
264 | //
265 | this.tlpTop.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
266 | | System.Windows.Forms.AnchorStyles.Left)
267 | | System.Windows.Forms.AnchorStyles.Right)));
268 | this.tlpTop.ColumnCount = 1;
269 | this.tlpTop.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
270 | this.tlpTop.Controls.Add(this.pnlReqParams, 0, 0);
271 | this.tlpTop.Location = new System.Drawing.Point(3, 3);
272 | this.tlpTop.Name = "tlpTop";
273 | this.tlpTop.RowCount = 1;
274 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
275 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
276 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
277 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
278 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
279 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
280 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
281 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
282 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
283 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
284 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
285 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
286 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
287 | this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
288 | this.tlpTop.Size = new System.Drawing.Size(1129, 109);
289 | this.tlpTop.TabIndex = 2;
290 | //
291 | // pnlReqParams
292 | //
293 | this.pnlReqParams.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
294 | | System.Windows.Forms.AnchorStyles.Left)
295 | | System.Windows.Forms.AnchorStyles.Right)));
296 | this.pnlReqParams.Controls.Add(this.cmbACL);
297 | this.pnlReqParams.Controls.Add(this.chkEnableAccessMask);
298 | this.pnlReqParams.Controls.Add(this.lblHumanACL);
299 | this.pnlReqParams.Controls.Add(this.btnSend);
300 | this.pnlReqParams.Controls.Add(this.tbAccessMask);
301 | this.pnlReqParams.Controls.Add(this.lblOutputSize);
302 | this.pnlReqParams.Controls.Add(this.nudOutputSize);
303 | this.pnlReqParams.Controls.Add(this.lblRepeat);
304 | this.pnlReqParams.Controls.Add(this.nudRepeat);
305 | this.pnlReqParams.Controls.Add(this.lblInputSize);
306 | this.pnlReqParams.Controls.Add(this.lblIOCTLCode);
307 | this.pnlReqParams.Controls.Add(this.tbIOCTL);
308 | this.pnlReqParams.Controls.Add(this.tbDevicePath);
309 | this.pnlReqParams.Controls.Add(this.lblDevPath);
310 | this.pnlReqParams.Controls.Add(this.nudInputSize);
311 | this.pnlReqParams.Location = new System.Drawing.Point(3, 3);
312 | this.pnlReqParams.MinimumSize = new System.Drawing.Size(1123, 103);
313 | this.pnlReqParams.Name = "pnlReqParams";
314 | this.pnlReqParams.Size = new System.Drawing.Size(1123, 103);
315 | this.pnlReqParams.TabIndex = 0;
316 | //
317 | // cmbACL
318 | //
319 | this.cmbACL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
320 | this.cmbACL.FormattingEnabled = true;
321 | this.cmbACL.Items.AddRange(new object[] {
322 | "ANY_ACCESS",
323 | "READ_WRITE_DATA",
324 | "READ_DATA",
325 | "WRITE_DATA"});
326 | this.cmbACL.Location = new System.Drawing.Point(87, 36);
327 | this.cmbACL.MaxDropDownItems = 4;
328 | this.cmbACL.Name = "cmbACL";
329 | this.cmbACL.Size = new System.Drawing.Size(131, 21);
330 | this.cmbACL.TabIndex = 17;
331 | //
332 | // chkEnableAccessMask
333 | //
334 | this.chkEnableAccessMask.AutoSize = true;
335 | this.chkEnableAccessMask.Location = new System.Drawing.Point(240, 37);
336 | this.chkEnableAccessMask.Name = "chkEnableAccessMask";
337 | this.chkEnableAccessMask.Size = new System.Drawing.Size(93, 17);
338 | this.chkEnableAccessMask.TabIndex = 16;
339 | this.chkEnableAccessMask.Text = "Access Mask:";
340 | this.chkEnableAccessMask.UseVisualStyleBackColor = true;
341 | this.chkEnableAccessMask.CheckedChanged += new System.EventHandler(this.chkEnableAccessMask_CheckedChanged);
342 | //
343 | // lblHumanACL
344 | //
345 | this.lblHumanACL.AutoSize = true;
346 | this.lblHumanACL.ImeMode = System.Windows.Forms.ImeMode.NoControl;
347 | this.lblHumanACL.Location = new System.Drawing.Point(14, 39);
348 | this.lblHumanACL.Name = "lblHumanACL";
349 | this.lblHumanACL.Size = new System.Drawing.Size(67, 13);
350 | this.lblHumanACL.TabIndex = 15;
351 | this.lblHumanACL.Text = "Human ACL:";
352 | //
353 | // btnSend
354 | //
355 | this.btnSend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
356 | this.btnSend.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold);
357 | this.btnSend.Image = global::ioctlpus.Properties.Resources.lightning;
358 | this.btnSend.ImeMode = System.Windows.Forms.ImeMode.NoControl;
359 | this.btnSend.Location = new System.Drawing.Point(1026, 8);
360 | this.btnSend.Name = "btnSend";
361 | this.btnSend.Size = new System.Drawing.Size(91, 78);
362 | this.btnSend.TabIndex = 8;
363 | this.btnSend.Text = "&Send";
364 | this.btnSend.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
365 | this.btnSend.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
366 | this.btnSend.UseVisualStyleBackColor = true;
367 | this.btnSend.Click += new System.EventHandler(this.btnSend_Click);
368 | //
369 | // tbAccessMask
370 | //
371 | this.tbAccessMask.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
372 | this.tbAccessMask.Enabled = false;
373 | this.tbAccessMask.Font = new System.Drawing.Font("Consolas", 8.25F);
374 | this.tbAccessMask.Location = new System.Drawing.Point(339, 37);
375 | this.tbAccessMask.MaxLength = 8;
376 | this.tbAccessMask.Name = "tbAccessMask";
377 | this.tbAccessMask.Size = new System.Drawing.Size(61, 20);
378 | this.tbAccessMask.TabIndex = 3;
379 | this.tbAccessMask.TextChanged += new System.EventHandler(this.tbAccessMask_TextChanged);
380 | //
381 | // lblOutputSize
382 | //
383 | this.lblOutputSize.AutoSize = true;
384 | this.lblOutputSize.ImeMode = System.Windows.Forms.ImeMode.NoControl;
385 | this.lblOutputSize.Location = new System.Drawing.Point(567, 81);
386 | this.lblOutputSize.Name = "lblOutputSize";
387 | this.lblOutputSize.Size = new System.Drawing.Size(91, 13);
388 | this.lblOutputSize.TabIndex = 10;
389 | this.lblOutputSize.Text = "Output Size (hex):";
390 | //
391 | // nudOutputSize
392 | //
393 | this.nudOutputSize.Font = new System.Drawing.Font("Consolas", 8.25F);
394 | this.nudOutputSize.Hexadecimal = true;
395 | this.nudOutputSize.Location = new System.Drawing.Point(664, 80);
396 | this.nudOutputSize.Maximum = new decimal(new int[] {
397 | 1048576,
398 | 0,
399 | 0,
400 | 0});
401 | this.nudOutputSize.Name = "nudOutputSize";
402 | this.nudOutputSize.Size = new System.Drawing.Size(65, 20);
403 | this.nudOutputSize.TabIndex = 5;
404 | this.nudOutputSize.Value = new decimal(new int[] {
405 | 32,
406 | 0,
407 | 0,
408 | 0});
409 | this.nudOutputSize.ValueChanged += new System.EventHandler(this.nudOutputSize_ValueChanged);
410 | //
411 | // lblRepeat
412 | //
413 | this.lblRepeat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
414 | this.lblRepeat.AutoSize = true;
415 | this.lblRepeat.ImeMode = System.Windows.Forms.ImeMode.NoControl;
416 | this.lblRepeat.Location = new System.Drawing.Point(904, 38);
417 | this.lblRepeat.Name = "lblRepeat";
418 | this.lblRepeat.Size = new System.Drawing.Size(45, 13);
419 | this.lblRepeat.TabIndex = 8;
420 | this.lblRepeat.Text = "Repeat:";
421 | //
422 | // nudRepeat
423 | //
424 | this.nudRepeat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
425 | this.nudRepeat.Enabled = false;
426 | this.nudRepeat.Font = new System.Drawing.Font("Consolas", 8.25F);
427 | this.nudRepeat.Location = new System.Drawing.Point(955, 36);
428 | this.nudRepeat.Name = "nudRepeat";
429 | this.nudRepeat.Size = new System.Drawing.Size(65, 20);
430 | this.nudRepeat.TabIndex = 7;
431 | this.nudRepeat.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
432 | //
433 | // lblInputSize
434 | //
435 | this.lblInputSize.AutoSize = true;
436 | this.lblInputSize.ImeMode = System.Windows.Forms.ImeMode.NoControl;
437 | this.lblInputSize.Location = new System.Drawing.Point(3, 81);
438 | this.lblInputSize.Name = "lblInputSize";
439 | this.lblInputSize.Size = new System.Drawing.Size(83, 13);
440 | this.lblInputSize.TabIndex = 6;
441 | this.lblInputSize.Text = "Input Size (hex):";
442 | //
443 | // lblIOCTLCode
444 | //
445 | this.lblIOCTLCode.AutoSize = true;
446 | this.lblIOCTLCode.ImeMode = System.Windows.Forms.ImeMode.NoControl;
447 | this.lblIOCTLCode.Location = new System.Drawing.Point(238, 13);
448 | this.lblIOCTLCode.Name = "lblIOCTLCode";
449 | this.lblIOCTLCode.Size = new System.Drawing.Size(69, 13);
450 | this.lblIOCTLCode.TabIndex = 5;
451 | this.lblIOCTLCode.Text = "IOCTL Code:";
452 | //
453 | // tbIOCTL
454 | //
455 | this.tbIOCTL.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
456 | this.tbIOCTL.Font = new System.Drawing.Font("Consolas", 8.25F);
457 | this.tbIOCTL.Location = new System.Drawing.Point(313, 12);
458 | this.tbIOCTL.MaxLength = 8;
459 | this.tbIOCTL.Name = "tbIOCTL";
460 | this.tbIOCTL.Size = new System.Drawing.Size(87, 20);
461 | this.tbIOCTL.TabIndex = 2;
462 | this.tbIOCTL.TextChanged += new System.EventHandler(this.tbIOCTL_TextChanged);
463 | //
464 | // tbDevicePath
465 | //
466 | this.tbDevicePath.Font = new System.Drawing.Font("Consolas", 8.25F);
467 | this.tbDevicePath.Location = new System.Drawing.Point(87, 12);
468 | this.tbDevicePath.Name = "tbDevicePath";
469 | this.tbDevicePath.Size = new System.Drawing.Size(131, 20);
470 | this.tbDevicePath.TabIndex = 1;
471 | this.tbDevicePath.TextChanged += new System.EventHandler(this.tbDevicePath_TextChanged);
472 | //
473 | // lblDevPath
474 | //
475 | this.lblDevPath.AutoSize = true;
476 | this.lblDevPath.ImeMode = System.Windows.Forms.ImeMode.NoControl;
477 | this.lblDevPath.Location = new System.Drawing.Point(11, 14);
478 | this.lblDevPath.Name = "lblDevPath";
479 | this.lblDevPath.Size = new System.Drawing.Size(70, 13);
480 | this.lblDevPath.TabIndex = 2;
481 | this.lblDevPath.Text = "Path / GUID:";
482 | //
483 | // nudInputSize
484 | //
485 | this.nudInputSize.Font = new System.Drawing.Font("Consolas", 8.25F);
486 | this.nudInputSize.Hexadecimal = true;
487 | this.nudInputSize.Location = new System.Drawing.Point(88, 80);
488 | this.nudInputSize.Maximum = new decimal(new int[] {
489 | 1048576,
490 | 0,
491 | 0,
492 | 0});
493 | this.nudInputSize.Name = "nudInputSize";
494 | this.nudInputSize.Size = new System.Drawing.Size(57, 20);
495 | this.nudInputSize.TabIndex = 4;
496 | this.nudInputSize.Value = new decimal(new int[] {
497 | 32,
498 | 0,
499 | 0,
500 | 0});
501 | this.nudInputSize.ValueChanged += new System.EventHandler(this.nudInputSize_ValueChanged);
502 | //
503 | // tlpMain
504 | //
505 | this.tlpMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
506 | | System.Windows.Forms.AnchorStyles.Left)
507 | | System.Windows.Forms.AnchorStyles.Right)));
508 | this.tlpMain.ColumnCount = 1;
509 | this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
510 | this.tlpMain.Controls.Add(this.tlpTop, 0, 0);
511 | this.tlpMain.Controls.Add(this.gbRequestHistory, 0, 2);
512 | this.tlpMain.Controls.Add(this.tlpPanes, 0, 1);
513 | this.tlpMain.Location = new System.Drawing.Point(12, 12);
514 | this.tlpMain.Name = "tlpMain";
515 | this.tlpMain.RowCount = 3;
516 | this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
517 | this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
518 | this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
519 | this.tlpMain.Size = new System.Drawing.Size(1135, 614);
520 | this.tlpMain.TabIndex = 0;
521 | //
522 | // gbRequestHistory
523 | //
524 | this.gbRequestHistory.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
525 | | System.Windows.Forms.AnchorStyles.Left)
526 | | System.Windows.Forms.AnchorStyles.Right)));
527 | this.gbRequestHistory.Controls.Add(this.btnSaveDB);
528 | this.gbRequestHistory.Controls.Add(this.tbFilters);
529 | this.gbRequestHistory.Controls.Add(this.btnStarRequest);
530 | this.gbRequestHistory.Controls.Add(this.btnSettings);
531 | this.gbRequestHistory.Controls.Add(this.btnDeleteRequest);
532 | this.gbRequestHistory.Controls.Add(this.btnAbout);
533 | this.gbRequestHistory.Controls.Add(this.btnOpenDB);
534 | this.gbRequestHistory.Controls.Add(this.tlvRequestHistory);
535 | this.gbRequestHistory.Location = new System.Drawing.Point(3, 328);
536 | this.gbRequestHistory.Name = "gbRequestHistory";
537 | this.gbRequestHistory.Size = new System.Drawing.Size(1129, 283);
538 | this.gbRequestHistory.TabIndex = 3;
539 | this.gbRequestHistory.TabStop = false;
540 | this.gbRequestHistory.Text = "Request History";
541 | //
542 | // tlvRequestHistory
543 | //
544 | this.tlvRequestHistory.AllColumns.Add(this.olvColumnRequest);
545 | this.tlvRequestHistory.AllColumns.Add(this.olvColumnRetVal);
546 | this.tlvRequestHistory.AllColumns.Add(this.olvColumnBytesReturned);
547 | this.tlvRequestHistory.AllColumns.Add(this.olvColumnTime);
548 | this.tlvRequestHistory.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
549 | | System.Windows.Forms.AnchorStyles.Left)
550 | | System.Windows.Forms.AnchorStyles.Right)));
551 | this.tlvRequestHistory.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
552 | this.olvColumnRequest,
553 | this.olvColumnRetVal,
554 | this.olvColumnBytesReturned,
555 | this.olvColumnTime});
556 | this.tlvRequestHistory.Cursor = System.Windows.Forms.Cursors.Default;
557 | this.tlvRequestHistory.HideSelection = false;
558 | this.tlvRequestHistory.Location = new System.Drawing.Point(6, 19);
559 | this.tlvRequestHistory.Name = "tlvRequestHistory";
560 | this.tlvRequestHistory.OwnerDraw = true;
561 | this.tlvRequestHistory.ShowGroups = false;
562 | this.tlvRequestHistory.Size = new System.Drawing.Size(1079, 219);
563 | this.tlvRequestHistory.TabIndex = 10;
564 | this.tlvRequestHistory.UseCompatibleStateImageBehavior = false;
565 | this.tlvRequestHistory.View = System.Windows.Forms.View.Details;
566 | this.tlvRequestHistory.VirtualMode = true;
567 | //
568 | // olvColumnRequest
569 | //
570 | this.olvColumnRequest.AspectName = "RequestName";
571 | this.olvColumnRequest.CellPadding = null;
572 | this.olvColumnRequest.MinimumWidth = 230;
573 | this.olvColumnRequest.Text = "Request";
574 | this.olvColumnRequest.Width = 315;
575 | //
576 | // olvColumnRetVal
577 | //
578 | this.olvColumnRetVal.AspectName = "ReturnValueString";
579 | this.olvColumnRetVal.CellPadding = null;
580 | this.olvColumnRetVal.IsEditable = false;
581 | this.olvColumnRetVal.MinimumWidth = 260;
582 | this.olvColumnRetVal.Text = "Return Value";
583 | this.olvColumnRetVal.Width = 388;
584 | //
585 | // olvColumnBytesReturned
586 | //
587 | this.olvColumnBytesReturned.AspectName = "BytesReturned";
588 | this.olvColumnBytesReturned.CellPadding = null;
589 | this.olvColumnBytesReturned.IsEditable = false;
590 | this.olvColumnBytesReturned.MinimumWidth = 90;
591 | this.olvColumnBytesReturned.Text = "Bytes Returned";
592 | this.olvColumnBytesReturned.Width = 103;
593 | //
594 | // olvColumnTime
595 | //
596 | this.olvColumnTime.AspectName = "Timestamp";
597 | this.olvColumnTime.CellPadding = null;
598 | this.olvColumnTime.FillsFreeSpace = true;
599 | this.olvColumnTime.IsEditable = false;
600 | this.olvColumnTime.Text = "Time";
601 | this.olvColumnTime.Width = 80;
602 | //
603 | // MainForm
604 | //
605 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
606 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
607 | this.BackColor = System.Drawing.SystemColors.Control;
608 | this.ClientSize = new System.Drawing.Size(1159, 638);
609 | this.Controls.Add(this.tlpMain);
610 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
611 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
612 | this.MinimumSize = new System.Drawing.Size(820, 677);
613 | this.Name = "MainForm";
614 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
615 | this.Text = "IOCTLpus";
616 | this.tlpPanes.ResumeLayout(false);
617 | this.gbRightPane.ResumeLayout(false);
618 | this.gbLeftPane.ResumeLayout(false);
619 | this.tlpTop.ResumeLayout(false);
620 | this.pnlReqParams.ResumeLayout(false);
621 | this.pnlReqParams.PerformLayout();
622 | ((System.ComponentModel.ISupportInitialize)(this.nudOutputSize)).EndInit();
623 | ((System.ComponentModel.ISupportInitialize)(this.nudRepeat)).EndInit();
624 | ((System.ComponentModel.ISupportInitialize)(this.nudInputSize)).EndInit();
625 | this.tlpMain.ResumeLayout(false);
626 | this.gbRequestHistory.ResumeLayout(false);
627 | this.gbRequestHistory.PerformLayout();
628 | ((System.ComponentModel.ISupportInitialize)(this.tlvRequestHistory)).EndInit();
629 | this.ResumeLayout(false);
630 |
631 | }
632 |
633 | #endregion
634 | private System.Windows.Forms.ToolTip toolTip;
635 | private System.Windows.Forms.TableLayoutPanel tlpPanes;
636 | private System.Windows.Forms.GroupBox gbRightPane;
637 | private System.Windows.Forms.GroupBox gbLeftPane;
638 | private System.Windows.Forms.TableLayoutPanel tlpTop;
639 | private System.Windows.Forms.Panel pnlReqParams;
640 | private System.Windows.Forms.Button btnSend;
641 | private System.Windows.Forms.TextBox tbAccessMask;
642 | private System.Windows.Forms.Label lblOutputSize;
643 | private System.Windows.Forms.NumericUpDown nudOutputSize;
644 | private System.Windows.Forms.Label lblRepeat;
645 | private System.Windows.Forms.NumericUpDown nudRepeat;
646 | private System.Windows.Forms.Label lblInputSize;
647 | private System.Windows.Forms.Label lblIOCTLCode;
648 | private System.Windows.Forms.TextBox tbIOCTL;
649 | private System.Windows.Forms.TextBox tbDevicePath;
650 | private System.Windows.Forms.Label lblDevPath;
651 | private System.Windows.Forms.NumericUpDown nudInputSize;
652 | private System.Windows.Forms.TableLayoutPanel tlpMain;
653 | private System.Windows.Forms.GroupBox gbRequestHistory;
654 | private System.Windows.Forms.Button btnSaveDB;
655 | private System.Windows.Forms.TextBox tbFilters;
656 | private System.Windows.Forms.Button btnStarRequest;
657 | private System.Windows.Forms.Button btnSettings;
658 | private System.Windows.Forms.Button btnDeleteRequest;
659 | private System.Windows.Forms.Button btnAbout;
660 | private System.Windows.Forms.Button btnOpenDB;
661 | private BrightIdeasSoftware.TreeListView tlvRequestHistory;
662 | private BrightIdeasSoftware.OLVColumn olvColumnRequest;
663 | private BrightIdeasSoftware.OLVColumn olvColumnRetVal;
664 | private BrightIdeasSoftware.OLVColumn olvColumnBytesReturned;
665 | private BrightIdeasSoftware.OLVColumn olvColumnTime;
666 | public Be.Windows.Forms.HexBox hbOutput;
667 | public Be.Windows.Forms.HexBox hbInput;
668 | private System.Windows.Forms.Label lblHumanACL;
669 | private System.Windows.Forms.CheckBox chkEnableAccessMask;
670 | private System.Windows.Forms.ComboBox cmbACL;
671 | }
672 | }
673 |
674 |
--------------------------------------------------------------------------------