Xeno-rat
Loading...
Searching...
No Matches
xeno_rat_server.Forms.Hvnc Class Reference
Inheritance diagram for xeno_rat_server.Forms.Hvnc:
Collaboration diagram for xeno_rat_server.Forms.Hvnc:

Public Member Functions

 Hvnc (Node _client)
 
async Task start ()
 Asynchronously sends a byte array to the client.
 
async Task stop ()
 Stops the asynchronous operation and sends a byte with value 1 using the client.
 
async Task SetQuality (int quality)
 Sets the quality of the client's socket and sends the updated quality value.
 
void TempOnDisconnect (Node node)
 Handles the disconnection of a node by disconnecting the client and image node if the specified node is the client or the image node.
 
async Task RecvThread ()
 Asynchronously receives image data and updates the custom picture box with the received image.
 

Protected Member Functions

override bool ProcessCmdKey (ref Message msg, Keys keyData)
 Processes a command key and triggers the WndProc method for a custom picture box control.
 
override void Dispose (bool disposing)
 Releases the unmanaged resources used by the component and optionally releases the managed resources.
 

Private Member Functions

async Task InitializeAsync ()
 Initializes the asynchronous task by creating an image node, adding temporary on disconnect actions, sending data to the client, and setting up a custom picture box.
 
async Task StartProc (string path)
 Starts a process by sending the specified path to the client.
 
async Task EnableBrowserClone ()
 Enables browser cloning if not already enabled and the application is in playing state.
 
async Task DisableBrowserClone ()
 Disables the cloning of the browser if currently active.
 
async Task StartChrome ()
 Starts the Chrome process if not already started and sends a byte array to the client.
 
async Task StartFirefox ()
 Starts the Firefox application asynchronously.
 
async Task StartEdge ()
 Starts the edge and sends a byte array to the client asynchronously.
 
async Task StartOpera ()
 Starts the opera if not already playing.
 
async Task StartOperaGX ()
 Starts the OperaGX application asynchronously.
 
async Task StartBrave ()
 Starts the Brave action asynchronously.
 
async Task< NodeCreateImageNode ()
 Creates an image node and returns it. If the image node already exists, returns the existing node.
 
void Hvnc_Load (object sender, EventArgs e)
 Event handler for the load event of the Hvnc form.
 
async void button1_Click (object sender, EventArgs e)
 Enables the checkbox, starts the asynchronous operation, disables the button, and sets the playing flag to true.
 
async void button2_Click (object sender, EventArgs e)
 Disables the checkbox, stops the asynchronous operation, enables button1, and disposes the image in customPictureBox1 if it is not null.
 
async void comboBox1_SelectedIndexChanged (object sender, EventArgs e)
 Handles the SelectedIndexChanged event of comboBox1. Sets the quality based on the selected index.
 
async void button3_Click (object sender, EventArgs e)
 Sends a signal to the client if the application is currently in a playing state.
 
async void button4_Click (object sender, EventArgs e)
 Starts a process using the specified file path.
 
async void button5_Click (object sender, EventArgs e)
 Handles the click event of button5, starts the Edge browser, and displays a message if the browser cloning is in progress.
 
async void button6_Click (object sender, EventArgs e)
 Starts a new instance of Chrome browser and displays a message if the browser profile data is being cloned.
 
async void button7_Click (object sender, EventArgs e)
 Starts a new instance of Firefox browser and displays a message if the browser profile data is being cloned.
 
async void button8_Click (object sender, EventArgs e)
 Initiates a new process for the command prompt.
 
async void button9_Click (object sender, EventArgs e)
 Initiates a PowerShell process asynchronously.
 
void pictureBox1_Click (object sender, EventArgs e)
 Event handler for the click event of pictureBox1.
 
async void checkBox1_CheckedChanged (object sender, EventArgs e)
 Handles the event when the state of the checkbox changes during playback.
 
async void button12_Click (object sender, EventArgs e)
 Initiates the process to start the Opera browser asynchronously and displays a message if the browser cloning is in progress.
 
async void button11_Click (object sender, EventArgs e)
 Initiates the process to start the OperaGX browser asynchronously.
 
async void button10_Click (object sender, EventArgs e)
 Handles the click event for button10, starts the Brave browser and displays a message if the browser profile data is being cloned.
 
void InitializeComponent ()
 Initializes the components of the form.
 

Private Attributes

Node client
 
Node ImageNode
 
string DesktopName = "hidden_desktop"
 
bool playing = false
 
bool is_cloning_browser = false
 
string[] qualitys = new string[] { "100%", "90%", "80%", "70%", "60%", "50%", "40%", "30%", "20%", "10%" }
 
CustomPictureBox customPictureBox1
 
System.ComponentModel.IContainer components = null
 Required designer variable.
 
System.Windows.Forms.PictureBox pictureBox1
 
System.Windows.Forms.Button button1
 
System.Windows.Forms.Button button2
 
System.Windows.Forms.ComboBox comboBox1
 
System.Windows.Forms.Button button3
 
System.Windows.Forms.Button button4
 
System.Windows.Forms.Button button5
 
System.Windows.Forms.Button button6
 
System.Windows.Forms.Button button7
 
System.Windows.Forms.Button button8
 
System.Windows.Forms.Button button9
 
System.Windows.Forms.CheckBox checkBox1
 
System.Windows.Forms.Button button10
 
System.Windows.Forms.Button button11
 
System.Windows.Forms.Button button12
 

Constructor & Destructor Documentation

◆ Hvnc()

xeno_rat_server.Forms.Hvnc.Hvnc ( Node _client)
inline
Here is the call graph for this function:

Member Function Documentation

◆ button10_Click()

async void xeno_rat_server.Forms.Hvnc.button10_Click ( object sender,
EventArgs e )
inlineprivate

Handles the click event for button10, starts the Brave browser and displays a message if the browser profile data is being cloned.

Parameters
senderThe object that raised the event.
eThe event data.

This method asynchronously starts the Brave browser and displays a message if the browser profile data is being cloned. If the browser profile data is being cloned, a message box is displayed to inform the user that it may take a while for the process to complete.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button11_Click()

async void xeno_rat_server.Forms.Hvnc.button11_Click ( object sender,
EventArgs e )
inlineprivate

Initiates the process to start the OperaGX browser asynchronously.

Parameters
senderThe object that raised the event.
eThe event data.

This method asynchronously starts the OperaGX browser and displays a message if the browser profile data is being cloned.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button12_Click()

async void xeno_rat_server.Forms.Hvnc.button12_Click ( object sender,
EventArgs e )
inlineprivate

Initiates the process to start the Opera browser asynchronously and displays a message if the browser cloning is in progress.

Parameters
senderThe object that raised the event.
eThe event data.

This method initiates the process to start the Opera browser asynchronously using the StartOpera method. If the browser cloning is in progress, it displays a message indicating that it may take a while to clone the profile data and advises to wait if the browser doesn't launch.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button1_Click()

async void xeno_rat_server.Forms.Hvnc.button1_Click ( object sender,
EventArgs e )
inlineprivate

Enables the checkbox, starts the asynchronous operation, disables the button, and sets the playing flag to true.

Parameters
senderThe object that raised the event.
eThe event data.

This method enables the checkbox, starts an asynchronous operation using the start method, disables the button, and sets the playing flag to true.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button2_Click()

async void xeno_rat_server.Forms.Hvnc.button2_Click ( object sender,
EventArgs e )
inlineprivate

Disables the checkbox, stops the asynchronous operation, enables button1, and disposes the image in customPictureBox1 if it is not null.

Parameters
senderThe object that raised the event.
eThe event data.

This method disables the checkbox, stops the asynchronous operation using the stop method, enables button1, and disposes the image in customPictureBox1 if it is not null. If an exception occurs during disposing the image, it is caught and ignored.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button3_Click()

async void xeno_rat_server.Forms.Hvnc.button3_Click ( object sender,
EventArgs e )
inlineprivate

Sends a signal to the client if the application is currently in a playing state.

Parameters
senderThe object that raised the event.
eThe event data.

This method sends a signal to the client if the application is currently in a playing state. If the application is not in a playing state, no action is taken.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button4_Click()

async void xeno_rat_server.Forms.Hvnc.button4_Click ( object sender,
EventArgs e )
inlineprivate

Starts a process using the specified file path.

Parameters
filePathThe file path of the process to be started.

This method asynchronously starts a process using the specified file path.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button5_Click()

async void xeno_rat_server.Forms.Hvnc.button5_Click ( object sender,
EventArgs e )
inlineprivate

Handles the click event of button5, starts the Edge browser, and displays a message if the browser cloning is in progress.

Parameters
senderThe object that raised the event.
eThe event data.

This method asynchronously starts the Edge browser and displays a message if the browser cloning is in progress.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button6_Click()

async void xeno_rat_server.Forms.Hvnc.button6_Click ( object sender,
EventArgs e )
inlineprivate

Starts a new instance of Chrome browser and displays a message if the browser profile data is being cloned.

Parameters
senderThe object that raised the event.
eThe event data.

This method asynchronously starts a new instance of the Chrome browser. If the browser profile data is being cloned, it displays a message indicating that it may take some time and advises the user to wait for the browser to launch.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button7_Click()

async void xeno_rat_server.Forms.Hvnc.button7_Click ( object sender,
EventArgs e )
inlineprivate

Starts a new instance of Firefox browser and displays a message if the browser profile data is being cloned.

Parameters
senderThe object that raised the event.
eThe event data.

This method asynchronously starts a new instance of the Firefox browser. If the browser profile data is being cloned, it displays a message indicating that it may take some time.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button8_Click()

async void xeno_rat_server.Forms.Hvnc.button8_Click ( object sender,
EventArgs e )
inlineprivate

Initiates a new process for the command prompt.

Parameters
senderThe object that raised the event.
eThe event data.

This method asynchronously starts a new process for the command prompt using the "cmd" command.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button9_Click()

async void xeno_rat_server.Forms.Hvnc.button9_Click ( object sender,
EventArgs e )
inlineprivate

Initiates a PowerShell process asynchronously.

Parameters
senderThe object that raised the event.
eThe event data.

This method initiates a PowerShell process asynchronously using the StartProc method.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkBox1_CheckedChanged()

async void xeno_rat_server.Forms.Hvnc.checkBox1_CheckedChanged ( object sender,
EventArgs e )
inlineprivate

Handles the event when the state of the checkbox changes during playback.

Parameters
senderThe object that raised the event.
eThe event data.

This method checks if the application is currently in a playing state. If not, it returns without performing any action. If the checkbox is checked, it asynchronously enables the browser cloning feature by calling the EnableBrowserClone method. If the checkbox is unchecked, it asynchronously disables the browser cloning feature by calling the DisableBrowserClone method.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comboBox1_SelectedIndexChanged()

async void xeno_rat_server.Forms.Hvnc.comboBox1_SelectedIndexChanged ( object sender,
EventArgs e )
inlineprivate

Handles the SelectedIndexChanged event of comboBox1. Sets the quality based on the selected index.

Parameters
senderThe source of the event.
eAn EventArgs that contains the event data.
Returns
An asynchronous task representing the operation.

This method retrieves the selected index from comboBox1 and sets the quality based on the selected index. If the selected index is not -1, it calls the SetQuality method with the quality value parsed from the qualitys array at the selected index.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateImageNode()

async Task< Node > xeno_rat_server.Forms.Hvnc.CreateImageNode ( )
inlineprivate

Creates an image node and returns it. If the image node already exists, returns the existing node.

Returns
The created or existing image node.

This method first checks if the ImageNode already exists, and if so, returns it. If the ImageNode does not exist, it creates a new SubSubNode using the client's Parent and awaits the result. It then sets the type and ID for the SubSubNode using Utils.SetType2setIdAsync method and awaits the result. If the ID is valid (not -1), it sets the type and returns the SubSubNode using Utils.Type2returnAsync method and awaits the result. It then sends the ID to the client using client.SendAsync method and awaits the result. It receives a response from the client using client.ReceiveAsync method and awaits the result. If the response is null or the first byte is 0, it disconnects the SubSubNode and returns null. If the ID is invalid (-1), it disconnects the SubSubNode and returns null. If all steps are successful, it returns the SubSubNode as the created or existing image node.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DisableBrowserClone()

async Task xeno_rat_server.Forms.Hvnc.DisableBrowserClone ( )
inlineprivate

Disables the cloning of the browser if currently active.

This method checks if the application is in a playing state and if the browser is currently being cloned. If both conditions are met, it sends a byte array with the value 7 to the client to disable the cloning of the browser. Once the operation is completed, the method sets the flag for browser cloning to false.

Exceptions
InvalidOperationExceptionThrown when the method is called while not in a playing state or when the browser is not being cloned.
Returns
An asynchronous task representing the operation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dispose()

override void xeno_rat_server.Forms.Hvnc.Dispose ( bool disposing)
inlineprotected

Releases the unmanaged resources used by the component and optionally releases the managed resources.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

This method releases the unmanaged resources used by the component and optionally releases the managed resources. If disposing is true, this method releases all resources held by any managed objects that this Component references. This method is called by the public Dispose method and the Component destructor.

◆ EnableBrowserClone()

async Task xeno_rat_server.Forms.Hvnc.EnableBrowserClone ( )
inlineprivate

Enables browser cloning if not already enabled and the application is in playing state.

This method sends a byte array with value 6 to the client to enable browser cloning. It sets the is_cloning_browser flag to true to indicate that browser cloning is enabled.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Hvnc_Load()

void xeno_rat_server.Forms.Hvnc.Hvnc_Load ( object sender,
EventArgs e )
inlineprivate

Event handler for the load event of the Hvnc form.

Parameters
senderThe source of the event.
eAn EventArgs that contains the event data.
Here is the caller graph for this function:

◆ InitializeAsync()

async Task xeno_rat_server.Forms.Hvnc.InitializeAsync ( )
inlineprivate

Initializes the asynchronous task by creating an image node, adding temporary on disconnect actions, sending data to the client, and setting up a custom picture box.

Returns
An asynchronous task representing the initialization process.

This method initializes the ImageNode by awaiting the creation of an image node using the CreateImageNode method. It then adds temporary on disconnect actions to the ImageNode and the client using the AddTempOnDisconnect method. After that, it sends data to the client using the SendAsync method with the UTF8-encoded DesktopName. Next, it sets up a custom picture box by creating a new CustomPictureBox with the client, setting its properties, removing the original picture box from the controls, and adding the custom picture box to the controls. Finally, it adds items from the qualitys array to comboBox1 and awaits the RecvThread method.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeComponent()

void xeno_rat_server.Forms.Hvnc.InitializeComponent ( )
inlineprivate

Initializes the components of the form.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pictureBox1_Click()

void xeno_rat_server.Forms.Hvnc.pictureBox1_Click ( object sender,
EventArgs e )
inlineprivate

Event handler for the click event of pictureBox1.

Parameters
senderThe object that raised the event.
eThe event arguments.

This method is called when the pictureBox1 is clicked.

Here is the caller graph for this function:

◆ ProcessCmdKey()

override bool xeno_rat_server.Forms.Hvnc.ProcessCmdKey ( ref Message msg,
Keys keyData )
inlineprotected

Processes a command key and triggers the WndProc method for a custom picture box control.

Parameters
msgA Message that represents the window message to process.
keyDataA Keys that represents the key data for the keyboard input.
Returns
Always returns true after triggering the WndProc method for the custom picture box control.

This method overrides the base class's ProcessCmdKey method to handle keyboard input and trigger the WndProc method for a custom picture box control. The custom picture box control's WndProc method is triggered to process the specified window message.

Here is the call graph for this function:

◆ RecvThread()

async Task xeno_rat_server.Forms.Hvnc.RecvThread ( )
inline

Asynchronously receives image data and updates the custom picture box with the received image.

This method continuously receives image data while the ImageNode is connected. Upon receiving the data, it creates an Image object from the received byte array and updates the custom picture box with the new image. If the custom picture box already contains an image, it disposes of the existing image before updating it with the new one.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetQuality()

async Task xeno_rat_server.Forms.Hvnc.SetQuality ( int quality)
inline

Sets the quality of the client's socket and sends the updated quality value.

Parameters
qualityThe quality value to be set for the client's socket.

This method sets the quality of the client's socket to the specified quality value and sends the updated quality value using the SendAsync method of the client.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

async Task xeno_rat_server.Forms.Hvnc.start ( )
inline

Asynchronously sends a byte array to the client.

Returns
A task representing the asynchronous operation.

This method initiates the sending of a byte array to the client using an asynchronous operation.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartBrave()

async Task xeno_rat_server.Forms.Hvnc.StartBrave ( )
inlineprivate

Starts the Brave action asynchronously.

This method sends a byte array with the value 13 to the client to initiate the Brave action. The method is asynchronous and will return a Task object. If the playing flag is not set, the method will return without performing any action.

Exceptions
InvalidOperationExceptionThrown if the playing flag is not set.
Returns
A task representing the asynchronous operation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartChrome()

async Task xeno_rat_server.Forms.Hvnc.StartChrome ( )
inlineprivate

Starts the Chrome process if not already started and sends a byte array to the client.

This method checks if the application is in a playing state, and if not, it returns without starting the Chrome process. If the application is in a playing state, it sends a byte array to the client using an asynchronous operation.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartEdge()

async Task xeno_rat_server.Forms.Hvnc.StartEdge ( )
inlineprivate

Starts the edge and sends a byte array to the client asynchronously.

This method checks if the edge is currently playing, and if not, it returns without performing any action. If the edge is playing, it sends a byte array with a single element (10) to the client asynchronously using the client .

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartFirefox()

async Task xeno_rat_server.Forms.Hvnc.StartFirefox ( )
inlineprivate

Starts the Firefox application asynchronously.

This method sends a signal to start the Firefox application if the playing flag is set to true.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartOpera()

async Task xeno_rat_server.Forms.Hvnc.StartOpera ( )
inlineprivate

Starts the opera if not already playing.

This method sends a signal to start the opera if the playing flag is set to true. If the playing flag is false, the method returns without performing any action.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartOperaGX()

async Task xeno_rat_server.Forms.Hvnc.StartOperaGX ( )
inlineprivate

Starts the OperaGX application asynchronously.

This method sends a byte array with a value of 12 to the client to start the OperaGX application. If the playing flag is not set, the method returns without performing any action.

Returns
An asynchronous task representing the operation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartProc()

async Task xeno_rat_server.Forms.Hvnc.StartProc ( string path)
inlineprivate

Starts a process by sending the specified path to the client.

Parameters
pathThe path of the process to be started.

This method sends the specified path to the client to start a process. If the playing flag is false, the method returns without starting the process.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

async Task xeno_rat_server.Forms.Hvnc.stop ( )
inline

Stops the asynchronous operation and sends a byte with value 1 using the client.

This method stops the asynchronous operation and sends a byte with value 1 using the client.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TempOnDisconnect()

void xeno_rat_server.Forms.Hvnc.TempOnDisconnect ( Node node)
inline

Handles the disconnection of a node by disconnecting the client and image node if the specified node is the client or the image node.

Parameters
nodeThe node to be disconnected.

If the specified node is the client or the image node, this method disconnects the client and image node if it is not null. Additionally, if the current object is not disposed, it closes the form using the System.Windows.Forms.Control.Invoke method.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ button1

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button1
private

◆ button10

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button10
private

◆ button11

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button11
private

◆ button12

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button12
private

◆ button2

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button2
private

◆ button3

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button3
private

◆ button4

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button4
private

◆ button5

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button5
private

◆ button6

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button6
private

◆ button7

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button7
private

◆ button8

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button8
private

◆ button9

System.Windows.Forms.Button xeno_rat_server.Forms.Hvnc.button9
private

◆ checkBox1

System.Windows.Forms.CheckBox xeno_rat_server.Forms.Hvnc.checkBox1
private

◆ client

Node xeno_rat_server.Forms.Hvnc.client
private

◆ comboBox1

System.Windows.Forms.ComboBox xeno_rat_server.Forms.Hvnc.comboBox1
private

◆ components

System.ComponentModel.IContainer xeno_rat_server.Forms.Hvnc.components = null
private

Required designer variable.

◆ customPictureBox1

CustomPictureBox xeno_rat_server.Forms.Hvnc.customPictureBox1
private

◆ DesktopName

string xeno_rat_server.Forms.Hvnc.DesktopName = "hidden_desktop"
private

◆ ImageNode

Node xeno_rat_server.Forms.Hvnc.ImageNode
private

◆ is_cloning_browser

bool xeno_rat_server.Forms.Hvnc.is_cloning_browser = false
private

◆ pictureBox1

System.Windows.Forms.PictureBox xeno_rat_server.Forms.Hvnc.pictureBox1
private

◆ playing

bool xeno_rat_server.Forms.Hvnc.playing = false
private

◆ qualitys

string [] xeno_rat_server.Forms.Hvnc.qualitys = new string[] { "100%", "90%", "80%", "70%", "60%", "50%", "40%", "30%", "20%", "10%" }
private

The documentation for this class was generated from the following files: