Xeno-rat
|
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< Node > | CreateImageNode () |
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 |
|
inline |
|
inlineprivate |
Handles the click event for button10, starts the Brave browser and displays a message if the browser profile data is being cloned.
sender | The object that raised the event. |
e | The 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.
|
inlineprivate |
Initiates the process to start the OperaGX browser asynchronously.
sender | The object that raised the event. |
e | The event data. |
This method asynchronously starts the OperaGX browser and displays a message if the browser profile data is being cloned.
|
inlineprivate |
Initiates the process to start the Opera browser asynchronously and displays a message if the browser cloning is in progress.
sender | The object that raised the event. |
e | The 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.
|
inlineprivate |
Enables the checkbox, starts the asynchronous operation, disables the button, and sets the playing flag to true.
sender | The object that raised the event. |
e | The 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.
|
inlineprivate |
Disables the checkbox, stops the asynchronous operation, enables button1, and disposes the image in customPictureBox1 if it is not null.
sender | The object that raised the event. |
e | The 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.
|
inlineprivate |
Sends a signal to the client if the application is currently in a playing state.
sender | The object that raised the event. |
e | The 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.
|
inlineprivate |
Starts a process using the specified file path.
filePath | The file path of the process to be started. |
This method asynchronously starts a process using the specified file path.
|
inlineprivate |
Handles the click event of button5, starts the Edge browser, and displays a message if the browser cloning is in progress.
sender | The object that raised the event. |
e | The event data. |
This method asynchronously starts the Edge browser and displays a message if the browser cloning is in progress.
|
inlineprivate |
Starts a new instance of Chrome browser and displays a message if the browser profile data is being cloned.
sender | The object that raised the event. |
e | The 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.
|
inlineprivate |
Starts a new instance of Firefox browser and displays a message if the browser profile data is being cloned.
sender | The object that raised the event. |
e | The 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.
|
inlineprivate |
Initiates a new process for the command prompt.
sender | The object that raised the event. |
e | The event data. |
This method asynchronously starts a new process for the command prompt using the "cmd" command.
|
inlineprivate |
Initiates a PowerShell process asynchronously.
sender | The object that raised the event. |
e | The event data. |
This method initiates a PowerShell process asynchronously using the StartProc method.
|
inlineprivate |
Handles the event when the state of the checkbox changes during playback.
sender | The object that raised the event. |
e | The 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.
|
inlineprivate |
Handles the SelectedIndexChanged event of comboBox1. Sets the quality based on the selected index.
sender | The source of the event. |
e | An EventArgs that contains the event data. |
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.
|
inlineprivate |
Creates an image node and returns it. If the image node already exists, returns the existing 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.
|
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.
InvalidOperationException | Thrown when the method is called while not in a playing state or when the browser is not being cloned. |
|
inlineprotected |
Releases the unmanaged resources used by the component and optionally releases the managed resources.
disposing | true 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.
|
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.
|
inlineprivate |
Event handler for the load event of the Hvnc form.
sender | The source of the event. |
e | An EventArgs that contains the event data. |
|
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.
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.
|
inlineprivate |
Initializes the components of the form.
|
inlineprivate |
Event handler for the click event of pictureBox1.
sender | The object that raised the event. |
e | The event arguments. |
This method is called when the pictureBox1 is clicked.
|
inlineprotected |
Processes a command key and triggers the WndProc method for a custom picture box control.
msg | A Message that represents the window message to process. |
keyData | A Keys that represents the key data for the keyboard input. |
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.
|
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.
|
inline |
Sets the quality of the client's socket and sends the updated quality value.
quality | The 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.
|
inline |
Asynchronously sends a byte array to the client.
This method initiates the sending of a byte array to the client using an asynchronous operation.
|
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.
InvalidOperationException | Thrown if the playing flag is not set. |
|
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.
|
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 .
|
inlineprivate |
Starts the Firefox application asynchronously.
This method sends a signal to start the Firefox application if the playing flag is set to true.
|
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.
|
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.
|
inlineprivate |
Starts a process by sending the specified path to the client.
path | The 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.
|
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.
|
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.
node | The 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.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Required designer variable.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |