|
| OfflineKeylogger (Node _client) |
|
string | Normalize (string input) |
| Replaces the placeholders [enter] and [space] in the input string with the corresponding newline and space characters, respectively, and returns the modified string.
|
|
|
override void | Dispose (bool disposing) |
| Releases the unmanaged resources used by the Component and optionally releases the managed resources.
|
|
|
void | OnTempDisconnect (Node node) |
| Handles the event of temporary disconnection of a node.
|
|
async Task< bool > | IsStarted () |
| Checks if the client is started and returns a boolean value indicating the status.
|
|
async Task | InitializeAsync () |
| Asynchronously initializes the object by receiving data from the client and updating the status.
|
|
async Task | StartKeylogger () |
| Starts the keylogger by sending a byte array with value 1 to the client asynchronously.
|
|
async Task | StopKeylogger () |
| Stops the keylogger by sending a byte array with value 2 to the client asynchronously.
|
|
async Task< Dictionary< string, string > > | GetKeylogs () |
| Asynchronously retrieves keylogs from the client and returns them as a dictionary.
|
|
async Task | UpdateStatus () |
| Updates the status and displays it on the label.
|
|
void | OfflineKeylogger_Load (object sender, EventArgs e) |
| Event handler for the form load event.
|
|
void | listView1_ItemActivate (object sender, EventArgs e) |
| Handles the event when an item in the list view is activated.
|
|
async void | button1_Click (object sender, EventArgs e) |
| Starts the keylogger and updates the status.
|
|
async void | button2_Click (object sender, EventArgs e) |
| Stops the keylogger and updates the status asynchronously.
|
|
async void | button3_Click (object sender, EventArgs e) |
| Updates the status and retrieves keylogs, then populates the UI with the retrieved data.
|
|
void | InitializeComponent () |
| Initializes the components of the form including labels, text boxes, list view, and buttons.
|
|
|
static Dictionary< string, string > | ConvertBytesToDictionary (byte[] data, int offset) |
| Converts a byte array to a dictionary of strings using null-terminated strings as keys and values.
|
|
◆ OfflineKeylogger()
xeno_rat_server.Forms.OfflineKeylogger.OfflineKeylogger |
( |
Node | _client | ) |
|
|
inline |
◆ button1_Click()
async void xeno_rat_server.Forms.OfflineKeylogger.button1_Click |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Starts the keylogger and updates the status.
This method asynchronously starts the keylogger and updates the status.
◆ button2_Click()
async void xeno_rat_server.Forms.OfflineKeylogger.button2_Click |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Stops the keylogger and updates the status asynchronously.
This method asynchronously stops the keylogger and updates the status.
◆ button3_Click()
async void xeno_rat_server.Forms.OfflineKeylogger.button3_Click |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Updates the status and retrieves keylogs, then populates the UI with the retrieved data.
This method asynchronously updates the status and retrieves keylogs. If no keylogs are retrieved, the method returns without populating the UI. If keylogs are retrieved, the method populates the UI with the retrieved data.
- Exceptions
-
Exception | Thrown when an error occurs while updating the status or retrieving keylogs. |
- Returns
- No explicit return value.
◆ ConvertBytesToDictionary()
static Dictionary< string, string > xeno_rat_server.Forms.OfflineKeylogger.ConvertBytesToDictionary |
( |
byte[] | data, |
|
|
int | offset ) |
|
inlinestaticprivate |
Converts a byte array to a dictionary of strings using null-terminated strings as keys and values.
- Parameters
-
data | The byte array to be converted. |
offset | The offset in the byte array from which to start the conversion. |
- Returns
- A dictionary containing the key-value pairs extracted from the byte array.
This method iterates through the byte array starting from the specified offset, extracting null-terminated strings as keys and values for the dictionary. It uses a StringBuilder to accumulate the characters until a null terminator is encountered, indicating the end of a key or a value. The extracted key-value pairs are then added to the dictionary, and the method returns the resulting dictionary.
◆ Dispose()
override void xeno_rat_server.Forms.OfflineKeylogger.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 releases all resources held by any managed objects that this Component references. This method is called by the public Dispose() method and the Finalize method.
◆ GetKeylogs()
async Task< Dictionary< string, string > > xeno_rat_server.Forms.OfflineKeylogger.GetKeylogs |
( |
| ) |
|
|
inlineprivate |
Asynchronously retrieves keylogs from the client and returns them as a dictionary.
- Returns
- A dictionary containing the keylogs received from the client.
This method sends a byte array with the value 3 to the client using the SendAsync method of the client object. It then receives a byte array from the client using the ReceiveAsync method of the client object. If the received data is null, the method disconnects from the client and returns an empty dictionary. If an exception occurs during the conversion of the received byte array to a dictionary using the ConvertBytesToDictionary method, the method catches the exception and returns an empty dictionary.
◆ InitializeAsync()
async Task xeno_rat_server.Forms.OfflineKeylogger.InitializeAsync |
( |
| ) |
|
|
inlineprivate |
Asynchronously initializes the object by receiving data from the client and updating the status.
This method asynchronously receives data from the client using the client and updates the status. If the received data is null, has a length not equal to 1, or the first element is not equal to 1, an error message is displayed. If the object is disposed, the method returns without further processing. If an error occurs during the process of displaying the error message and closing the object, it is caught and ignored.
- Exceptions
-
System.ObjectDisposedException | Thrown when the object is disposed. |
- Returns
- A task representing the asynchronous operation.
◆ InitializeComponent()
void xeno_rat_server.Forms.OfflineKeylogger.InitializeComponent |
( |
| ) |
|
|
inlineprivate |
Initializes the components of the form including labels, text boxes, list view, and buttons.
◆ IsStarted()
async Task< bool > xeno_rat_server.Forms.OfflineKeylogger.IsStarted |
( |
| ) |
|
|
inlineprivate |
Checks if the client is started and returns a boolean value indicating the status.
- Returns
- True if the client is started; otherwise, false.
This method sends a byte array with a single element of value 0 to the client using the SendAsync method. It then receives a byte array from the client using the ReceiveAsync method and checks if the received data is null or has a length different from 1. If the data does not meet the expected criteria, the method disconnects the client and returns false. Otherwise, it returns true if the first element of the received data is equal to 1.
- Exceptions
-
System.InvalidOperationException | Thrown when an asynchronous operation is not valid for the current state of the object. |
◆ listView1_ItemActivate()
void xeno_rat_server.Forms.OfflineKeylogger.listView1_ItemActivate |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Handles the event when an item in the list view is activated.
- Parameters
-
sender | The source of the event. |
e | An EventArgs that contains the event data. |
This method checks if any item is selected in the list view. If an item is selected, it retrieves the text from the first column of the selected item in the list view and sets the text of textBox1 to the normalized value of the corresponding application from the 'applications' dictionary.
◆ Normalize()
string xeno_rat_server.Forms.OfflineKeylogger.Normalize |
( |
string | input | ) |
|
|
inline |
Replaces the placeholders [enter] and [space] in the input string with the corresponding newline and space characters, respectively, and returns the modified string.
- Parameters
-
input | The input string containing placeholders to be replaced. |
- Returns
- The modified string with placeholders replaced.
◆ OfflineKeylogger_Load()
void xeno_rat_server.Forms.OfflineKeylogger.OfflineKeylogger_Load |
( |
object | sender, |
|
|
EventArgs | e ) |
|
inlineprivate |
Event handler for the form load event.
- Parameters
-
sender | The source of the event. |
e | An EventArgs that contains the event data. |
◆ OnTempDisconnect()
void xeno_rat_server.Forms.OfflineKeylogger.OnTempDisconnect |
( |
Node | node | ) |
|
|
inlineprivate |
Handles the event of temporary disconnection of a node.
- Parameters
-
node | The node that has been temporarily disconnected. |
If the current object is disposed, the method returns without performing any action. Displays a message box with the text "Socket closed!". Invokes the Close method on the current object using Control.BeginInvoke(Delegate). Any exceptions that occur during the invocation are caught and ignored.
◆ StartKeylogger()
async Task xeno_rat_server.Forms.OfflineKeylogger.StartKeylogger |
( |
| ) |
|
|
inlineprivate |
Starts the keylogger by sending a byte array with value 1 to the client asynchronously.
- Returns
- A task representing the asynchronous operation.
- Exceptions
-
Exception | Thrown when an error occurs while sending the byte array to the client. |
◆ StopKeylogger()
async Task xeno_rat_server.Forms.OfflineKeylogger.StopKeylogger |
( |
| ) |
|
|
inlineprivate |
Stops the keylogger by sending a byte array with value 2 to the client asynchronously.
This method sends a byte array with value 2 to the client using an asynchronous operation to stop the keylogger.
◆ UpdateStatus()
async Task xeno_rat_server.Forms.OfflineKeylogger.UpdateStatus |
( |
| ) |
|
|
inlineprivate |
Updates the status and displays it on the label.
This method asynchronously updates the status by calling the IsStarted method and then updates the label to display the current status.
◆ applications
Dictionary<string, string> xeno_rat_server.Forms.OfflineKeylogger.applications = new Dictionary<string, string>() |
|
private |
◆ button1
System.Windows.Forms.Button xeno_rat_server.Forms.OfflineKeylogger.button1 |
|
private |
◆ button2
System.Windows.Forms.Button xeno_rat_server.Forms.OfflineKeylogger.button2 |
|
private |
◆ button3
System.Windows.Forms.Button xeno_rat_server.Forms.OfflineKeylogger.button3 |
|
private |
◆ client
Node xeno_rat_server.Forms.OfflineKeylogger.client |
|
private |
◆ columnHeader1
System.Windows.Forms.ColumnHeader xeno_rat_server.Forms.OfflineKeylogger.columnHeader1 |
|
private |
◆ components
System.ComponentModel.IContainer xeno_rat_server.Forms.OfflineKeylogger.components = null |
|
private |
Required designer variable.
◆ label1
System.Windows.Forms.Label xeno_rat_server.Forms.OfflineKeylogger.label1 |
|
private |
◆ label2
System.Windows.Forms.Label xeno_rat_server.Forms.OfflineKeylogger.label2 |
|
private |
◆ label3
System.Windows.Forms.Label xeno_rat_server.Forms.OfflineKeylogger.label3 |
|
private |
◆ listView1
System.Windows.Forms.ListView xeno_rat_server.Forms.OfflineKeylogger.listView1 |
|
private |
◆ started
bool xeno_rat_server.Forms.OfflineKeylogger.started = false |
|
private |
◆ textBox1
System.Windows.Forms.TextBox xeno_rat_server.Forms.OfflineKeylogger.textBox1 |
|
private |
The documentation for this class was generated from the following files: