VenomRat
This commit is contained in:
57
Helper/NativeMethods.cs
Normal file
57
Helper/NativeMethods.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Server.Helper;
|
||||
|
||||
public static class NativeMethods
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
internal struct LVITEM
|
||||
{
|
||||
public uint mask;
|
||||
|
||||
public int iItem;
|
||||
|
||||
public int iSubItem;
|
||||
|
||||
public int state;
|
||||
|
||||
public int stateMask;
|
||||
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pszText;
|
||||
|
||||
public int cchTextMax;
|
||||
|
||||
public int iImage;
|
||||
|
||||
public IntPtr lParam;
|
||||
|
||||
public int iIndent;
|
||||
|
||||
public int iGroupId;
|
||||
|
||||
public uint cColumns;
|
||||
|
||||
public IntPtr puColumns;
|
||||
|
||||
public IntPtr piColFmt;
|
||||
|
||||
public int iGroup;
|
||||
}
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||
internal static extern IntPtr SendMessage(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, EntryPoint = "SendMessage")]
|
||||
internal static extern IntPtr SendMessageListViewItem(IntPtr hWnd, uint msg, IntPtr wParam, ref LVITEM lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
internal static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, int vk);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
internal static extern bool UnregisterHotKey(IntPtr hWnd, int id);
|
||||
|
||||
[DllImport("uxtheme.dll", CharSet = CharSet.Unicode)]
|
||||
internal static extern int SetWindowTheme(IntPtr hWnd, string pszSubAppName, string pszSubIdList);
|
||||
}
|
||||
Reference in New Issue
Block a user