|
override void | Dispose (bool disposing) |
| Releases the unmanaged resources used by the component and optionally releases the managed resources.
|
|
|
void | PopulateTreeView (ProcessNode node, TreeNode parentNode) |
| Populates the tree view with the process node and its children.
|
|
void | DisplayProcessTree (List< ProcessNode > processList) |
| Displays the process tree in a tree view control.
|
|
async void | killPid (int pid) |
| Sends a kill command to the specified process ID.
|
|
void | treeView1_NodeMouseClick (object sender, TreeNodeMouseClickEventArgs e) |
| Handles the mouse click event on a tree node, and displays a context menu to kill the associated process if the right mouse button is clicked.
|
|
void | ProcessManager_Load (object sender, EventArgs e) |
| Event handler for the load event of the ProcessManager form.
|
|
void | ProcessManager_Load_1 (object sender, EventArgs e) |
| Event handler for the Load event of the ProcessManager form.
|
|
void | ProcessManager_Load_2 (object sender, EventArgs e) |
| Event handler for the Load event of the ProcessManager form.
|
|
void | ProcessManager_Load_3 (object sender, EventArgs e) |
| Event handler for the Load event of the ProcessManager form.
|
|
void | treeView1_AfterSelect (object sender, TreeViewEventArgs e) |
| Event handler for the AfterSelect event of the treeView1 control.
|
|
async void | button1_Click (object sender, EventArgs e) |
| Toggles the pause state and sends a corresponding signal to the client.
|
|
void | InitializeComponent () |
| Initializes the components of the form including a tree view and a button.
|
|
◆ ProcessManager()
xeno_rat_server.Forms.ProcessManager.ProcessManager |
( |
Node | _client | ) |
|
|
inline |
◆ button1_Click()
async void xeno_rat_server.Forms.ProcessManager.button1_Click |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Toggles the pause state and sends a corresponding signal to the client.
- Parameters
-
sender | The object that raised the event. |
e | The event data. |
This method toggles the pause state of the application. If the application is currently not paused, it sends a signal to the client to pause, and vice versa. The method uses the client to send a corresponding byte signal to the client.
◆ DeserializeProcessList()
static List< ProcessNode > xeno_rat_server.Forms.ProcessManager.DeserializeProcessList |
( |
byte[] | serializedData | ) |
|
|
inlinestaticprivate |
Deserializes the byte array into a list of ProcessNode objects.
- Parameters
-
serializedData | The byte array containing the serialized process data. |
- Returns
- A list of ProcessNode objects deserialized from the serializedData .
◆ DeserializeProcessNode()
static ProcessNode xeno_rat_server.Forms.ProcessManager.DeserializeProcessNode |
( |
BinaryReader | reader | ) |
|
|
inlinestaticprivate |
Deserializes a ProcessNode from the provided BinaryReader and returns the deserialized ProcessNode.
- Parameters
-
reader | The BinaryReader used for deserialization. |
- Returns
- The deserialized ProcessNode.
This method deserializes a ProcessNode from the provided BinaryReader. It reads the process ID, child count, file path, file description, and name from the reader, and then recursively deserializes child nodes if present. The deserialized ProcessNode is returned with its properties set based on the data read from the BinaryReader.
◆ DisplayProcessTree()
void xeno_rat_server.Forms.ProcessManager.DisplayProcessTree |
( |
List< ProcessNode > | processList | ) |
|
|
inlineprivate |
Displays the process tree in a tree view control.
- Parameters
-
processList | The list of process nodes to be displayed. |
This method updates the tree view control by clearing its nodes, then populating it with the process tree represented by the input list of process nodes. The process tree is represented as a hierarchical structure, where each node may have child nodes. The method uses the BeginUpdate and EndUpdate methods to optimize the performance of the tree view control when updating its nodes.
◆ Dispose()
override void xeno_rat_server.Forms.ProcessManager.Dispose |
( |
bool | disposing | ) |
|
|
inlineprotected |
Releases the unmanaged resources used by the component and optionally releases the managed resources.
- Parameters
-
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 disposes of all managed resources. If disposing is false, this method releases only the unmanaged resources.
◆ InitializeComponent()
void xeno_rat_server.Forms.ProcessManager.InitializeComponent |
( |
| ) |
|
|
inlineprivate |
Initializes the components of the form including a tree view and a button.
This method initializes the components of the form, including a tree view and a button. It sets various properties such as location, size, text, and event handlers for the tree view and button controls. The method also sets the size, font, and event handlers for the form itself.
◆ killPid()
async void xeno_rat_server.Forms.ProcessManager.killPid |
( |
int | pid | ) |
|
|
inlineprivate |
Sends a kill command to the specified process ID.
- Parameters
-
pid | The process ID to be killed. |
- Exceptions
-
Exception | Thrown when an error occurs while sending the kill command. |
◆ PopulateTreeView()
void xeno_rat_server.Forms.ProcessManager.PopulateTreeView |
( |
ProcessNode | node, |
|
|
TreeNode | parentNode ) |
|
inlineprivate |
Populates the tree view with the process node and its children.
- Parameters
-
node | The process node to be added to the tree view. |
parentNode | The parent node under which the process node should be added. |
This method populates the tree view with the given process node and its children. It creates a tree node for the process node, including its name, PID, file path, and file description. If a parent node is provided, the tree node for the process node is added as a child to the parent node. If no parent node is provided, the tree node for the process node is added to the root of the tree view. The method then recursively populates the tree view with the children of the process node. Finally, if no parent node is provided, the tree view is updated to reflect the changes.
◆ ProcessManager_Load()
void xeno_rat_server.Forms.ProcessManager.ProcessManager_Load |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Event handler for the load event of the ProcessManager form.
- Parameters
-
sender | The source of the event. |
e | An EventArgs that contains the event data. |
This method is called when the ProcessManager form is loaded. It can be used to perform any initialization or setup tasks for the form.
◆ ProcessManager_Load_1()
void xeno_rat_server.Forms.ProcessManager.ProcessManager_Load_1 |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Event handler for the Load event of the ProcessManager form.
- Parameters
-
sender | The source of the event. |
e | An EventArgs that contains the event data. |
◆ ProcessManager_Load_2()
void xeno_rat_server.Forms.ProcessManager.ProcessManager_Load_2 |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Event handler for the Load event of the ProcessManager form.
- Parameters
-
sender | The source of the event. |
e | An EventArgs that contains the event data. |
This method is called when the ProcessManager form is loaded. It can be used to perform any necessary initialization or setup for the form.
◆ ProcessManager_Load_3()
void xeno_rat_server.Forms.ProcessManager.ProcessManager_Load_3 |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Event handler for the Load event of the ProcessManager form.
- Parameters
-
sender | The source of the event. |
e | An EventArgs that contains the event data. |
This method is triggered when the ProcessManager form is loaded. It does not perform any specific actions at this time.
◆ RecvThread()
async Task xeno_rat_server.Forms.ProcessManager.RecvThread |
( |
| ) |
|
|
inline |
Asynchronously receives data from the client and processes it.
This method continuously receives data from the connected client using asynchronous operations. If the received data is null and the object is not disposed, it closes the connection and returns. If the method is paused, it continues to the next iteration without processing the received data. The received data is deserialized into a list of ProcessNode objects and then displayed as a process tree.
◆ treeView1_AfterSelect()
void xeno_rat_server.Forms.ProcessManager.treeView1_AfterSelect |
( |
object | sender, |
|
|
TreeViewEventArgs | e ) |
|
inlineprivate |
Event handler for the AfterSelect event of the treeView1 control.
- Parameters
-
sender | The source of the event. |
e | A TreeViewEventArgs that contains the event data. |
This event is raised when a tree node is selected. It occurs after the selected node has changed and the treeView1 control has been updated.
◆ treeView1_NodeMouseClick()
void xeno_rat_server.Forms.ProcessManager.treeView1_NodeMouseClick |
( |
object | sender, |
|
|
TreeNodeMouseClickEventArgs | e ) |
|
inlineprivate |
Handles the mouse click event on a tree node, and displays a context menu to kill the associated process if the right mouse button is clicked.
- Parameters
-
sender | The source of the event. |
e | A TreeNodeMouseClickEventArgs that contains the event data. |
This method checks if the right mouse button is clicked, and if so, it creates a context menu with an option to kill the process associated with the clicked tree node. If the process node is successfully retrieved from the clicked tree node, a context menu is displayed with an option to kill the associated process. When the context menu item is clicked, it triggers the killPid method with the process ID as a parameter to terminate the process. If an exception occurs during the process node retrieval or context menu creation, a message box displaying "something went wrong..." is shown.
- Exceptions
-
Exception | Thrown when an error occurs during the retrieval of the process node or context menu creation. |
◆ button1
System.Windows.Forms.Button xeno_rat_server.Forms.ProcessManager.button1 |
|
private |
◆ client
Node xeno_rat_server.Forms.ProcessManager.client |
|
private |
◆ components
System.ComponentModel.IContainer xeno_rat_server.Forms.ProcessManager.components = null |
|
private |
Required designer variable.
◆ paused
bool xeno_rat_server.Forms.ProcessManager.paused = false |
|
private |
◆ treeView1
System.Windows.Forms.TreeView xeno_rat_server.Forms.ProcessManager.treeView1 |
|
private |
The documentation for this class was generated from the following files: