|
| CustomPictureBox (Node _client) |
|
static short | GetKeyState (int nVirtKey) |
| Retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled on or off.
|
|
static bool | IsClipboardFormatAvailable (uint format) |
| Determines whether the specified clipboard format is available.
|
|
static bool | OpenClipboard (IntPtr hWndNewOwner) |
| Opens the clipboard for examination and prevents other applications from modifying the clipboard content.
|
|
static IntPtr | GetClipboardData (uint uFormat) |
| Retrieves data from the clipboard in a specified format.
|
|
static bool | CloseClipboard () |
| Closes the clipboard.
|
|
static int | ToAscii (uint uVirtKey, uint uScanCode, byte[] lpKeyState, out uint lpChar, uint uFlags) |
| Translates the specified virtual-key code and keyboard state to the corresponding character or characters.
|
|
Point | TranslateCoordinates (Point originalCoords, Size originalScreenSize, PictureBox targetControl) |
| Translates the coordinates from the original screen size to the target control's image size and returns the translated coordinates.
|
|
void | TriggerWndProc (ref Message m) |
| Triggers the window procedure for processing Windows messages.
|
|
|
static void | GetClipboardFormat () |
| Retrieves the data format currently on the clipboard and performs corresponding actions based on the format.
|
|
static char | GetModifiedKey (char c) |
| Gets the modified key corresponding to the input character.
|
|
static bool | IsAlphaNumeric (char c) |
| Checks if the input character is alphanumeric.
|
|
|
override void | WndProc (ref Message m) |
| Overrides the WndProc method to handle window messages and sends corresponding data to the client.
|
|
◆ CustomPictureBox()
xeno_rat_server.Forms.CustomPictureBox.CustomPictureBox |
( |
Node | _client | ) |
|
|
inline |
◆ CloseClipboard()
static bool xeno_rat_server.Forms.CustomPictureBox.CloseClipboard |
( |
| ) |
|
Closes the clipboard.
- Returns
- True if the clipboard is closed successfully; otherwise, false.
◆ GetClipboardData()
static IntPtr xeno_rat_server.Forms.CustomPictureBox.GetClipboardData |
( |
uint | uFormat | ) |
|
Retrieves data from the clipboard in a specified format.
- Parameters
-
uFormat | The format of the data to be retrieved from the clipboard. |
- Returns
- The handle to the data in the specified format, or IntPtr.Zero if the clipboard is empty or does not contain data in the specified format.
◆ GetClipboardFormat()
static void xeno_rat_server.Forms.CustomPictureBox.GetClipboardFormat |
( |
| ) |
|
|
inlinestatic |
Retrieves the data format currently on the clipboard and performs corresponding actions based on the format.
This method checks the available clipboard formats and retrieves the data accordingly. If the clipboard contains text data, it retrieves and processes the text. If the clipboard contains bitmap data, it retrieves and processes the bitmap. If the clipboard contains Unicode text data, it retrieves and processes the Unicode text.
- Exceptions
-
System.Runtime.InteropServices.ExternalException | Thrown when an error occurs while accessing the clipboard. |
◆ GetImageDisplayRectangle()
Rectangle xeno_rat_server.Forms.CustomPictureBox.GetImageDisplayRectangle |
( |
PictureBox | pictureBox | ) |
|
|
inlineprivate |
Gets the display rectangle for the image in the specified PictureBox.
- Parameters
-
pictureBox | The PictureBox control containing the image. |
- Returns
- A Rectangle representing the display area for the image.
This method calculates and returns the display rectangle for the image based on the PictureBox's SizeMode property. If the SizeMode is Normal, the display rectangle is set to the full size of the image. If the SizeMode is StretchImage, the display rectangle is set to the client area of the PictureBox. If the SizeMode is anything else, the display rectangle is calculated based on the zoom factor and centering within the client area.
◆ GetKeyState()
static short xeno_rat_server.Forms.CustomPictureBox.GetKeyState |
( |
int | nVirtKey | ) |
|
Retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled on or off.
- Parameters
-
nVirtKey | The virtual-key code. |
- Returns
- The return value specifies the status of the specified virtual key, as follows: If the high-order bit is 1, the key is down; otherwise, it is up. If the low-order bit is 1, the key is toggled. A key, such as the CAPS LOCK key, is toggled if it is turned on. The key is off and untoggled if the low-order bit is 0.
◆ GetModifiedKey()
static char xeno_rat_server.Forms.CustomPictureBox.GetModifiedKey |
( |
char | c | ) |
|
|
inlinestatic |
Gets the modified key corresponding to the input character.
- Parameters
-
c | The input character for which the modified key is to be retrieved. |
- Returns
- The modified key corresponding to the input character, taking into account any shift key pressed.
This method retrieves the modified key corresponding to the input character by considering any shift key pressed. If no key translates to the input character, the method returns the input character itself.
◆ IsAlphaNumeric()
static bool xeno_rat_server.Forms.CustomPictureBox.IsAlphaNumeric |
( |
char | c | ) |
|
|
inlinestatic |
Checks if the input character is alphanumeric.
- Parameters
-
c | The character to be checked. |
- Returns
- True if the input character is alphanumeric, otherwise false.
◆ IsClipboardFormatAvailable()
static bool xeno_rat_server.Forms.CustomPictureBox.IsClipboardFormatAvailable |
( |
uint | format | ) |
|
Determines whether the specified clipboard format is available.
- Parameters
-
format | The format to check for availability. |
- Returns
- True if the specified clipboard format is available; otherwise, false.
◆ OpenClipboard()
static bool xeno_rat_server.Forms.CustomPictureBox.OpenClipboard |
( |
IntPtr | hWndNewOwner | ) |
|
Opens the clipboard for examination and prevents other applications from modifying the clipboard content.
- Parameters
-
hWndNewOwner | A handle to the window that will own the clipboard. |
- Returns
- True if the function succeeds; otherwise, false.
◆ ToAscii()
static int xeno_rat_server.Forms.CustomPictureBox.ToAscii |
( |
uint | uVirtKey, |
|
|
uint | uScanCode, |
|
|
byte[] | lpKeyState, |
|
|
out uint | lpChar, |
|
|
uint | uFlags ) |
Translates the specified virtual-key code and keyboard state to the corresponding character or characters.
- Parameters
-
uVirtKey | The virtual-key code to be translated. |
uScanCode | The hardware scan code of the key to be translated. |
lpKeyState | An array of 256 bytes containing the current keyboard state. |
lpChar | When the function returns, contains the character corresponding to the specified key code. |
uFlags | The behavior of the function. This parameter can be 0 or 1. |
- Returns
- Returns 1 if the specified key is a dead-key character; otherwise, it returns 0.
This method translates the specified virtual-key code and keyboard state to the corresponding character or characters. It is used to translate a virtual-key code into the corresponding character value for the current keyboard layout. If the specified key is a dead-key character, the return value is 1; otherwise, it is 0.
◆ TranslateCoordinates()
Point xeno_rat_server.Forms.CustomPictureBox.TranslateCoordinates |
( |
Point | originalCoords, |
|
|
Size | originalScreenSize, |
|
|
PictureBox | targetControl ) |
|
inline |
Translates the coordinates from the original screen size to the target control's image size and returns the translated coordinates.
- Parameters
-
originalCoords | The original coordinates to be translated. |
originalScreenSize | The original screen size. |
targetControl | The target control to which the coordinates are being translated. |
- Returns
- The translated coordinates on the target control's image.
◆ TriggerWndProc()
void xeno_rat_server.Forms.CustomPictureBox.TriggerWndProc |
( |
ref Message | m | ) |
|
|
inline |
Triggers the window procedure for processing Windows messages.
- Parameters
-
m | A reference to the message to be processed. |
This method triggers the window procedure for processing Windows messages by calling the WndProc method and passing a reference to the message to be processed.
◆ UnzoomedAndAdjusted()
Point xeno_rat_server.Forms.CustomPictureBox.UnzoomedAndAdjusted |
( |
PictureBox | pictureBox, |
|
|
Point | scaledPoint ) |
|
inlineprivate |
Translates and unzooms the given point based on the zoom factor and displayed image rectangle of the PictureBox.
- Parameters
-
pictureBox | The PictureBox control used for displaying the image. |
scaledPoint | The point with scaled coordinates. |
- Returns
- The translated and unzoomed Point based on the zoom factor and displayed image rectangle of the PictureBox.
This method calculates the zoom factor based on the client size of the PictureBox and the dimensions of the displayed image. It then translates and unzooms the coordinates of the given point to match the original image size.
◆ VkKeyScan()
static short xeno_rat_server.Forms.CustomPictureBox.VkKeyScan |
( |
char | c | ) |
|
|
private |
Translates a Unicode character to the corresponding virtual-key code and shift state for the current keyboard.
- Parameters
-
c | The Unicode character to be translated. |
- Returns
- The low-order byte specifies the virtual-key code, and the high-order byte specifies the shift state, which can be a combination of the following flag bits: 1 for SHIFT, 2 for CTRL, and 4 for ALT. If the function returns -1, the character is a dead key or is not translatable.
◆ WndProc()
override void xeno_rat_server.Forms.CustomPictureBox.WndProc |
( |
ref Message | m | ) |
|
|
inlineprotected |
Overrides the WndProc method to handle window messages and sends corresponding data to the client.
- Parameters
-
m | A reference to the Message structure that contains the window message to process. |
This method intercepts window messages and processes them based on the message type. If the Image property is not null, it processes mouse and keyboard events and sends the corresponding data to the client. For mouse events (e.g., left button down, right button up), it translates the coordinates, constructs a payload, and sends it asynchronously to the client. For keyboard events (e.g., key down, key up), it checks if the Shift or Caps Lock key is pressed, modifies the wParam accordingly, and sends the payload to the client.
◆ CF_BITMAP
const uint xeno_rat_server.Forms.CustomPictureBox.CF_BITMAP = 2 |
|
static |
◆ CF_HDROP
const uint xeno_rat_server.Forms.CustomPictureBox.CF_HDROP = 15 |
|
static |
◆ CF_TEXT
const uint xeno_rat_server.Forms.CustomPictureBox.CF_TEXT = 1 |
|
static |
◆ CF_UNICODETEXT
const uint xeno_rat_server.Forms.CustomPictureBox.CF_UNICODETEXT = 13 |
|
static |
◆ client
Node xeno_rat_server.Forms.CustomPictureBox.client |
|
private |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/xeno rat server/Forms/Hvnc.cs