Xeno-rat
|
Classes | |
struct | POINT |
struct | RECT |
struct | WINDOWPLACEMENT |
Public Member Functions | |
static IntPtr | WindowFromPoint (POINT point) |
Retrieves a handle to the window that contains the specified point. | |
static IntPtr | SendMessage (IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam) |
Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message. | |
static IntPtr | PostMessage (IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam) |
Sends the specified message to a window or windows. The function calls the window procedure for the specified window and does not return until the window procedure has processed the message. | |
static bool | GetWindowRect (IntPtr hWnd, out RECT lpRect) |
Retrieves the dimensions of the bounding rectangle of the specified window. | |
static bool | ScreenToClient (IntPtr hWnd, ref POINT lpPoint) |
Transforms screen coordinates into client-area coordinates. | |
static IntPtr | ChildWindowFromPoint (IntPtr hWnd, POINT point) |
Retrieves a handle to the child window at the specified point. | |
static int | GetWindowText (IntPtr hWnd, StringBuilder lpString, int nMaxCount) |
Retrieves the text of the specified window's title bar, if it has one. | |
static bool | PtInRect (ref RECT lprc, POINT pt) |
Determines whether the specified point is within the specified rectangle. | |
static bool | SetWindowLong (IntPtr hWnd, int nIndex, int dwNewLong) |
Changes an attribute of the specified window. The function also sets a new value for the attribute, if needed. | |
static int | GetWindowLong (IntPtr hWnd, int nIndex) |
Retrieves information about the specified window. The function also retrieves the value at a specified offset into the extra window memory. | |
static bool | GetWindowPlacement (IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl) |
Retrieves the show state and the restored, minimized, and maximized positions of the specified window. | |
static IntPtr | FindWindow (string lpClassName, string lpWindowName) |
Finds a window with the specified class name and window name. | |
static int | MenuItemFromPoint (IntPtr hWnd, IntPtr hMenu, POINT pt) |
Retrieves the menu item that is at the specified location. | |
static int | GetMenuItemID (IntPtr hMenu, int nPos) |
Retrieves the menu item identifier of a menu item located at the specified position in a menu. | |
static IntPtr | GetSubMenu (IntPtr hMenu, int nPos) |
Retrieves a handle to the drop-down menu activated by the specified menu item. | |
static bool | MoveWindow (IntPtr hWnd, int x, int y, int width, int height, bool repaint) |
Moves and resizes the specified window. | |
static int | RealGetWindowClass (IntPtr hwnd, [Out] StringBuilder pszType, int cchType) |
Retrieves the name of the window class to which the specified window belongs. | |
input_handler (string DesktopName) | |
void | Dispose () |
Disposes the resources associated with the current object. | |
void | Input (uint msg, IntPtr wParam, IntPtr lParam) |
Handles input messages and performs corresponding actions based on the message type. | |
Static Public Member Functions | |
static int | GET_X_LPARAM (IntPtr lParam) |
Extracts the x-coordinate from the specified lParam . | |
static int | GET_Y_LPARAM (IntPtr lParam) |
Extracts the Y coordinate from the given Windows message lParam . | |
static IntPtr | MAKELPARAM (int lowWord, int highWord) |
Combines the specified low and high words into a single IntPtr value. | |
Public Attributes | |
IntPtr | Desktop = IntPtr.Zero |
Private Types | |
enum | DESKTOP_ACCESS : uint { DESKTOP_NONE = 0 , DESKTOP_READOBJECTS = 0x0001 , DESKTOP_CREATEWINDOW = 0x0002 , DESKTOP_CREATEMENU = 0x0004 , DESKTOP_HOOKCONTROL = 0x0008 , DESKTOP_JOURNALRECORD = 0x0010 , DESKTOP_JOURNALPLAYBACK = 0x0020 , DESKTOP_ENUMERATE = 0x0040 , DESKTOP_WRITEOBJECTS = 0x0080 , DESKTOP_SWITCHDESKTOP = 0x0100 , GENERIC_ALL } |
Private Member Functions | |
static IntPtr | OpenDesktop (string lpszDesktop, int dwFlags, bool fInherit, uint dwDesiredAccess) |
Opens the specified desktop object. | |
static IntPtr | CreateDesktop (string lpszDesktop, IntPtr lpszDevice, IntPtr pDevmode, int dwFlags, uint dwDesiredAccess, IntPtr lpsa) |
Creates a new desktop with the specified name and settings. | |
static bool | CloseDesktop (IntPtr hDesktop) |
Closes the specified desktop. | |
static bool | SetThreadDesktop (IntPtr hDesktop) |
Sets the desktop for the current thread to the specified desktop. | |
Private Attributes | |
POINT | lastPoint = new POINT() {x=0,y=0} |
IntPtr | hResMoveWindow = IntPtr.Zero |
IntPtr | resMoveType = IntPtr.Zero |
bool | lmouseDown = false |
string | DesktopName = null |
Static Private Attributes | |
const int | GWL_STYLE = -16 |
const int | WS_DISABLED = 0x8000000 |
const int | WM_CHAR = 0x0102 |
const int | WM_KEYDOWN = 0x0100 |
const int | WM_KEYUP = 0x0101 |
const int | WM_LBUTTONUP = 0x0202 |
const int | WM_LBUTTONDOWN = 0x0201 |
const int | WM_MOUSEMOVE = 0x0200 |
const int | WM_CLOSE = 0x0010 |
const int | WM_SYSCOMMAND = 0x0112 |
const int | SC_MINIMIZE = 0xF020 |
const int | SC_RESTORE = 0xF120 |
const int | SC_MAXIMIZE = 0xF030 |
const int | HTCAPTION = 2 |
const int | HTTOP = 12 |
const int | HTBOTTOM = 15 |
const int | HTLEFT = 10 |
const int | HTRIGHT = 11 |
const int | HTTOPLEFT = 13 |
const int | HTTOPRIGHT = 14 |
const int | HTBOTTOMLEFT = 16 |
const int | HTBOTTOMRIGHT = 17 |
const int | HTCLOSE = 20 |
const int | HTMINBUTTON = 8 |
const int | HTMAXBUTTON = 9 |
const int | HTTRANSPARENT = -1 |
const int | VK_RETURN = 0x0D |
const int | MN_GETHMENU = 0x01E1 |
const int | BM_CLICK = 0x00F5 |
const int | MAX_PATH = 260 |
const int | WM_NCHITTEST = 0x0084 |
const int | SW_SHOWMAXIMIZED = 3 |
static object | lockObject = new object() |
|
private |
|
inline |
static IntPtr Hidden_handler.input_handler.ChildWindowFromPoint | ( | IntPtr | hWnd, |
POINT | point ) |
Retrieves a handle to the child window at the specified point.
hWnd | A handle to the parent window. |
point | The client coordinates of the point to be checked. |
|
private |
Closes the specified desktop.
hDesktop | A handle to the desktop to be closed. |
This method closes the desktop identified by the handle hDesktop . If the function succeeds, the return value is true. If the function fails, the return value is false. To get extended error information, call GetLastError.
|
private |
Creates a new desktop with the specified name and settings.
lpszDesktop | The name of the new desktop. |
lpszDevice | A handle to the device to use when creating the desktop. |
pDevmode | A pointer to a DEVMODE structure that specifies the mode to use for the new desktop. |
dwFlags | The desktop creation flags. For a list of possible values, see https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createdesktopw. |
dwDesiredAccess | The access rights for the desktop. For a list of possible values, see https://docs.microsoft.com/en-us/windows/win32/secauthz/desktop-security-and-access-rights. |
lpsa | A pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by child processes. If lpsa is NULL, the handle cannot be inherited. |
System.ComponentModel.Win32Exception | Thrown when an error occurs during the creation of the desktop. The exception contains the error code. |
|
inline |
Disposes the resources associated with the current object.
This method closes the desktop associated with the current object and performs garbage collection to release any remaining resources.
static IntPtr Hidden_handler.input_handler.FindWindow | ( | string | lpClassName, |
string | lpWindowName ) |
Finds a window with the specified class name and window name.
lpClassName | The class name of the window to find. |
lpWindowName | The window name (title) of the window to find. |
|
inlinestatic |
Extracts the x-coordinate from the specified lParam .
lParam | The pointer to the message's lParam parameter. |
|
inlinestatic |
Extracts the Y coordinate from the given Windows message lParam .
lParam | The Windows message parameter containing the coordinates. |
static int Hidden_handler.input_handler.GetMenuItemID | ( | IntPtr | hMenu, |
int | nPos ) |
Retrieves the menu item identifier of a menu item located at the specified position in a menu.
hMenu | A handle to the menu that contains the item. |
nPos | The zero-based relative position of the menu item. |
static IntPtr Hidden_handler.input_handler.GetSubMenu | ( | IntPtr | hMenu, |
int | nPos ) |
Retrieves a handle to the drop-down menu activated by the specified menu item.
hMenu | A handle to the menu that contains the item for which the drop-down menu handle is to be retrieved. |
nPos | The zero-based relative position of the menu item. This parameter can be either a menu handle or a menu-item identifier. |
static int Hidden_handler.input_handler.GetWindowLong | ( | IntPtr | hWnd, |
int | nIndex ) |
Retrieves information about the specified window. The function also retrieves the value at a specified offset into the extra window memory.
hWnd | A handle to the window and, indirectly, the class to which the window belongs. |
nIndex | The zero-based offset to the value to be retrieved. |
static bool Hidden_handler.input_handler.GetWindowPlacement | ( | IntPtr | hWnd, |
ref WINDOWPLACEMENT | lpwndpl ) |
Retrieves the show state and the restored, minimized, and maximized positions of the specified window.
hWnd | A handle to the window. |
lpwndpl | A reference to a WINDOWPLACEMENT structure that receives the show state and position information. |
static bool Hidden_handler.input_handler.GetWindowRect | ( | IntPtr | hWnd, |
out RECT | lpRect ) |
Retrieves the dimensions of the bounding rectangle of the specified window.
hWnd | A handle to the window. |
lpRect | A pointer to a RECT structure that receives the screen coordinates of the upper-left and lower-right corners of the window. |
static int Hidden_handler.input_handler.GetWindowText | ( | IntPtr | hWnd, |
StringBuilder | lpString, | ||
int | nMaxCount ) |
Retrieves the text of the specified window's title bar, if it has one.
hWnd | A handle to the window or control containing the text. |
lpString | The buffer that will receive the text. |
nMaxCount | The maximum number of characters to copy to the buffer, including the null-terminating character. |
|
inline |
Handles input messages and performs corresponding actions based on the message type.
msg | The input message to be handled. |
wParam | Additional message information. |
lParam | Additional message information. |
This method handles input messages and performs corresponding actions based on the message type. It locks the lockObject to ensure thread safety. It sets the thread desktop to the specified Desktop. It then processes the input message by identifying its type and performing the appropriate actions. If the message is a keyboard-related message (e.g., WM_CHAR, WM_KEYDOWN, WM_KEYUP), it retrieves the window handle based on the last known point and performs the necessary actions. If the message is a mouse-related message, it processes the mouse coordinates and performs actions such as clicking buttons, handling menu items, or moving windows based on the message type. The method also ensures that the original array is modified in place.
|
inlinestatic |
Combines the specified low and high words into a single IntPtr value.
lowWord | The low-order word. |
highWord | The high-order word. |
static int Hidden_handler.input_handler.MenuItemFromPoint | ( | IntPtr | hWnd, |
IntPtr | hMenu, | ||
POINT | pt ) |
Retrieves the menu item that is at the specified location.
hWnd | A handle to the window that contains the menu. |
hMenu | A handle to the menu. |
pt | A POINT structure that defines the location of the mouse cursor, in screen coordinates. |
static bool Hidden_handler.input_handler.MoveWindow | ( | IntPtr | hWnd, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
bool | repaint ) |
Moves and resizes the specified window.
hWnd | A handle to the window to be moved and resized. |
x | The new position of the left side of the window. |
y | The new position of the top of the window. |
width | The new width of the window. |
height | The new height of the window. |
repaint | true to repaint the window after it is moved and sized; otherwise, false. |
|
private |
Opens the specified desktop object.
lpszDesktop | The name of the desktop to be opened. |
dwFlags | Reserved; set to 0. |
fInherit | If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle. |
dwDesiredAccess | The access to the desktop. For a list of access rights, see Desktop Security and Access Rights. |
System.ComponentModel.Win32Exception | Thrown when the function fails. Use the Marshal.GetLastWin32Error method to get the error code. |
static IntPtr Hidden_handler.input_handler.PostMessage | ( | IntPtr | hWnd, |
uint | msg, | ||
IntPtr | wParam, | ||
IntPtr | lParam ) |
Sends the specified message to a window or windows. The function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
hWnd | A handle to the window whose window procedure will receive the message. |
msg | The message to be posted. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Determines whether the specified point is within the specified rectangle.
lprc | A reference to a RECT structure that contains the coordinates of the rectangle. |
pt | A POINT structure that contains the coordinates of the point to be tested. |
static int Hidden_handler.input_handler.RealGetWindowClass | ( | IntPtr | hwnd, |
[Out] StringBuilder | pszType, | ||
int | cchType ) |
Retrieves the name of the window class to which the specified window belongs.
hwnd | A handle to the window and, indirectly, the class to which the window belongs. |
pszType | A pointer to the buffer that will receive the class name string. |
cchType | The length of the buffer pointed to by the pszType parameter. |
static bool Hidden_handler.input_handler.ScreenToClient | ( | IntPtr | hWnd, |
ref POINT | lpPoint ) |
Transforms screen coordinates into client-area coordinates.
hWnd | A handle to the window whose client area will be used for the transformation. |
lpPoint | A reference to a POINT structure that contains the screen coordinates to be transformed. Upon successful completion, this structure contains the client-area coordinates. |
static IntPtr Hidden_handler.input_handler.SendMessage | ( | IntPtr | hWnd, |
uint | msg, | ||
IntPtr | wParam, | ||
IntPtr | lParam ) |
Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
hWnd | A handle to the window whose window procedure will receive the message. |
msg | The message to be sent. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
|
private |
Sets the desktop for the current thread to the specified desktop.
hDesktop | A handle to the desktop. This parameter can be NULL, to indicate the default desktop for the window station specified by the lpDesktop parameter of the OpenWindowStation function used to open the window station. |
System.ComponentModel.Win32Exception | Thrown when the function fails. Use GetLastError to obtain the error code. |
static bool Hidden_handler.input_handler.SetWindowLong | ( | IntPtr | hWnd, |
int | nIndex, | ||
int | dwNewLong ) |
Changes an attribute of the specified window. The function also sets a new value for the attribute, if needed.
hWnd | A handle to the window and, indirectly, the class to which the window belongs. |
nIndex | The zero-based offset to the value to be set. |
dwNewLong | The replacement value. |
static IntPtr Hidden_handler.input_handler.WindowFromPoint | ( | POINT | point | ) |
Retrieves a handle to the window that contains the specified point.
point | A POINT structure that defines the point to be checked. |
|
staticprivate |
IntPtr Hidden_handler.input_handler.Desktop = IntPtr.Zero |
|
private |
|
staticprivate |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |