Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/lib/rex/post/meterpreter/extensions/stdapi/constants.rb
Views: 11791
# -*- coding: binary -*-1#23###4#5# Windows Specific Constants6# --------------------------7#8# These are put into the global namespace for now9# so that they can be referenced globally.10#11###1213##14#15# Net16#17##18AF_INET = 219AF_INET6 = 232021##22#23# Permissions24#25##26DELETE = 0x0001000027READ_CONTROL = 0x0002000028WRITE_DAC = 0x0004000029WRITE_OWNER = 0x0008000030SYNCHRONIZE = 0x0010000031STANDARD_RIGHTS_REQUIRED = 0x000f000032STANDARD_RIGHTS_READ = READ_CONTROL33STANDARD_RIGHTS_WRITE = READ_CONTROL34STANDARD_RIGHTS_EXECUTE = READ_CONTROL35STANDARD_RIGHTS_ALL = 0x001f000036SPECIFIC_RIGHTS_ALL = 0x0000ffff37MAXIMUM_ALLOWED = 0x0200000038GENERIC_READ = 0x8000000039GENERIC_WRITE = 0x4000000040GENERIC_EXECUTE = 0x2000000041GENERIC_ALL = 0x100000004243##44#45# Page Protections46#47##48PAGE_NOACCESS = 0x0000000149PAGE_READONLY = 0x0000000250PAGE_READWRITE = 0x0000000451PAGE_WRITECOPY = 0x0000000852PAGE_EXECUTE = 0x0000001053PAGE_EXECUTE_READ = 0x0000002054PAGE_EXECUTE_READWRITE = 0x0000004055PAGE_EXECUTE_WRITECOPY = 0x0000008056PAGE_GUARD = 0x0000010057PAGE_NOCACHE = 0x0000020058PAGE_WRITECOMBINE = 0x0000040059MEM_COMMIT = 0x0000100060MEM_RESERVE = 0x0000200061MEM_DECOMMIT = 0x0000400062MEM_RELEASE = 0x0000800063MEM_FREE = 0x0001000064MEM_PRIVATE = 0x0002000065MEM_MAPPED = 0x0004000066MEM_RESET = 0x0008000067MEM_TOP_DOWN = 0x0010000068MEM_WRITE_WATCH = 0x0020000069MEM_PHYSICAL = 0x0040000070MEM_LARGE_PAGES = 0x2000000071MEM_4MB_PAGES = 0x8000000072SEC_FILE = 0x0080000073SEC_IMAGE = 0x0100000074SEC_RESERVE = 0x0400000075SEC_COMMIT = 0x0800000076SEC_NOCACHE = 0x1000000077MEM_IMAGE = SEC_IMAGE7879##80#81# Registry Permissions82#83##84KEY_QUERY_VALUE = 0x0000000185KEY_SET_VALUE = 0x0000000286KEY_CREATE_SUB_KEY = 0x0000000487KEY_ENUMERATE_SUB_KEYS = 0x0000000888KEY_NOTIFY = 0x0000001089KEY_CREATE_LINK = 0x0000002090KEY_WOW64_64KEY = 0x0000010091KEY_WOW64_32KEY = 0x0000020092KEY_READ = (STANDARD_RIGHTS_READ | KEY_QUERY_VALUE |93KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & ~SYNCHRONIZE94KEY_WRITE = (STANDARD_RIGHTS_WRITE | KEY_SET_VALUE |95KEY_CREATE_SUB_KEY) & ~SYNCHRONIZE96KEY_EXECUTE = KEY_READ97KEY_ALL_ACCESS = (STANDARD_RIGHTS_ALL | KEY_QUERY_VALUE |98KEY_SET_VALUE | KEY_CREATE_SUB_KEY |99KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY |100KEY_CREATE_LINK) & ~SYNCHRONIZE101102##103#104# Registry105#106##107HKEY_CLASSES_ROOT = 0x80000000108HKEY_CURRENT_USER = 0x80000001109HKEY_LOCAL_MACHINE = 0x80000002110HKEY_USERS = 0x80000003111HKEY_PERFORMANCE_DATA = 0x80000004112HKEY_CURRENT_CONFIG = 0x80000005113HKEY_DYN_DATA = 0x80000006114115REG_NONE = 0116REG_SZ = 1117REG_EXPAND_SZ = 2118REG_BINARY = 3119REG_DWORD = 4120REG_DWORD_LITTLE_ENDIAN = 4121REG_DWORD_BIG_ENDIAN = 5122REG_LINK = 6123REG_MULTI_SZ = 7124REG_QWORD = 11125126##127#128# Process Permissions129#130##131PROCESS_TERMINATE = 0x00000001132PROCESS_CREATE_THREAD = 0x00000002133PROCESS_SET_SESSIONID = 0x00000004134PROCESS_VM_OPERATION = 0x00000008135PROCESS_VM_READ = 0x00000010136PROCESS_VM_WRITE = 0x00000020137PROCESS_DUP_HANDLE = 0x00000040138PROCESS_CREATE_PROCESS = 0x00000080139PROCESS_SET_QUOTA = 0x00000100140PROCESS_SET_INFORMATION = 0x00000200141PROCESS_QUERY_INFORMATION= 0x00000400142PROCESS_SUSPEND_RESUME = 0x00000800143PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF144145##146#147# Thread Permissions148#149##150THREAD_TERMINATE = 0x00000001151THREAD_SUSPEND_RESUME = 0x00000002152THREAD_GET_CONTEXT = 0x00000008153THREAD_SET_CONTEXT = 0x00000010154THREAD_SET_INFORMATION = 0x00000020155THREAD_QUERY_INFORMATION = 0x00000040156THREAD_SET_THREAD_TOKEN = 0x00000080157THREAD_IMPERSONATE = 0x00000100158THREAD_DIRECT_IMPERSONATION = 0x00000200159THREAD_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3FF160161##162#163# Creation flags164#165##166167CREATE_SUSPENDED = 0x00000004168169##170#171# Event Log172#173##174EVENTLOG_SEQUENTIAL_READ = 0x00000001175EVENTLOG_SEEK_READ = 0x00000002176EVENTLOG_FORWARDS_READ = 0x00000004177EVENTLOG_BACKWARDS_READ = 0x00000008178179##180#181# Event Log182#183##184EWX_LOGOFF = 0185EWX_SHUTDOWN = 0x00000001186EWX_REBOOT = 0x00000002187EWX_FORCE = 0x00000004188EWX_POWEROFF = 0x00000008189EWX_FORCEIFHUNG = 0x00000010190191##192#193# Shutdown Reason Codes194#195##196SHTDN_REASON_MINOR_DC_PROMOTION = 0x00000021197SHTDN_REASON_MAJOR_APPLICATION = 0x00040000198SHTDN_REASON_MAJOR_HARDWARE = 0x00010000199SHTDN_REASON_FLAG_COMMENT_REQUIRED = 0x01000000200SHTDN_REASON_FLAG_DIRTY_UI = 0x08000000201SHTDN_REASON_MINOR_UNSTABLE = 0x00000006202SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = 0x00000018203SHTDN_REASON_MINOR_ENVIRONMENT = 0x00000000204SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000205SHTDN_REASON_MINOR_DC_DEMOTION = 0x00000022206SHTDN_REASON_MINOR_SECURITYFIX = 0x00000012207SHTDN_REASON_FLAG_CLEAN_UI = 0x04000000208SHTDN_REASON_MINOR_HOTFIX = 0x00000011209SHTDN_REASON_MINOR_CORDUNPLUGGED = 0x00000000210SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = 0x00000017211SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000212SHTDN_REASON_MINOR_SYSTEMRESTORE = 0x00000001213SHTDN_REASON_MINOR_OTHERDRIVER = 0x00000000214SHTDN_REASON_MINOR_WMI = 0x00000015215SHTDN_REASON_MINOR_INSTALLATION = 0x00000002216SHTDN_REASON_MINOR_BLUESCREEN = 0x0000000F217SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000218SHTDN_REASON_MINOR_NETWORKCARD = 0x00000009219SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = 0x00000016220SHTDN_REASON_MINOR_SERVICEPACK = 0x00000010221SHTDN_REASON_MINOR_UPGRADE = 0x00000003222SHTDN_REASON_FLAG_PLANNED = 0x80000000223SHTDN_REASON_MINOR_MMC = 0x00000019224SHTDN_REASON_MINOR_POWER_SUPPLY = 0x00000000225SHTDN_REASON_MINOR_MAINTENANCE = 0x00000001226SHTDN_REASON_VALID_BIT_MASK = 0x00000000227SHTDN_REASON_MAJOR_NONE = 0x00000000228SHTDN_REASON_MAJOR_POWER = 0x00060000229SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = 0x02000000230SHTDN_REASON_MINOR_OTHER = 0x00000000231SHTDN_REASON_MINOR_PROCESSOR = 0x00000008232SHTDN_REASON_MAJOR_OTHER = 0x00000000233SHTDN_REASON_MINOR_DISK = 0x00000007234SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014235SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000236SHTDN_REASON_MINOR_HUNG = 0x00000005237SHTDN_REASON_MINOR_TERMSRV = 0x00000020238SHTDN_REASON_MINOR_NONE = 0x00000000239SHTDN_REASON_MINOR_RECONFIG = 0x00000004240SHTDN_REASON_MAJOR_SYSTEM = 0x00050000241SHTDN_REASON_MINOR_HARDWARE_DRIVER = 0x00000000242SHTDN_REASON_MINOR_SECURITY = 0x00000013243SHTDN_REASON_DEFAULT = SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER244245##246#247# Keyboard Mappings248#249##250251VirtualKeyCodes = {2521 => %W{ LClick },2532 => %W{ RClick },2543 => %W{ Cancel },2554 => %W{ MClick },2568 => %W{ Back },2579 => %W{ Tab },25810 => %W{ Newline },25912 => %W{ Clear },26013 => %W{ Return },26126216 => %W{ Shift },26317 => %W{ Ctrl },26418 => %W{ Alt },26519 => %W{ Pause },26620 => %W{ CapsLock },26726827 => %W{ Esc },26927032 => %W{ Space },27133 => %W{ Prior },27234 => %W{ Next },27335 => %W{ End },27436 => %W{ Home },27537 => %W{ Left },27638 => %W{ Up },27739 => %W{ Right },27840 => %W{ Down },27941 => %W{ Select },28042 => %W{ Print },28143 => %W{ Execute },28244 => %W{ Snapshot },28345 => %W{ Insert },28446 => %W{ Delete },28547 => %W{ Help },28648 => %W{ 0 )},28749 => %W{ 1 !},28850 => %W{ 2 @},28951 => %W{ 3 #},29052 => %W{ 4 $},29153 => %W{ 5 %},29254 => %W{ 6 ^},29355 => %W{ 7 &},29456 => %W{ 8 *},29557 => %W{ 9 (},29665 => %W{ a A},29766 => %W{ b B},29867 => %W{ c C},29968 => %W{ d D},30069 => %W{ e E},30170 => %W{ f F},30271 => %W{ g G},30372 => %W{ h H},30473 => %W{ i I},30574 => %W{ j J},30675 => %W{ k K},30776 => %W{ l L},30877 => %W{ m M},30978 => %W{ n N},31079 => %W{ o O},31180 => %W{ p P},31281 => %W{ q Q},31382 => %W{ r R},31483 => %W{ s S},31584 => %W{ t T},31685 => %W{ u U},31786 => %W{ v V},31887 => %W{ w W},31988 => %W{ x X},32089 => %W{ y Y},32190 => %W{ z Z},32291 => %W{ LWin },32392 => %W{ RWin },32493 => %W{ Apps },32532695 => %W{ Sleep },32796 => %W{ N0 },32897 => %W{ N1 },32998 => %W{ N2 },33099 => %W{ N3 },331100 => %W{ N4 },332101 => %W{ N5 },333102 => %W{ N6 },334103 => %W{ N7 },335104 => %W{ N8 },336105 => %W{ N9 },337106 => %W{ Multiply },338107 => %W{ Add },339108 => %W{ Separator },340109 => %W{ Subtract },341110 => %W{ Decimal },342111 => %W{ Divide },343112 => %W{ F1 },344113 => %W{ F2 },345114 => %W{ F3 },346115 => %W{ F4 },347116 => %W{ F5 },348117 => %W{ F6 },349118 => %W{ F7 },350119 => %W{ F8 },351120 => %W{ F9 },352121 => %W{ F10 },353122 => %W{ F11 },354123 => %W{ F12 },355124 => %W{ F13 },356125 => %W{ F14 },357126 => %W{ F15 },358127 => %W{ F16 },359128 => %W{ F17 },360129 => %W{ F18 },361130 => %W{ F19 },362131 => %W{ F20 },363132 => %W{ F21 },364133 => %W{ F22 },365134 => %W{ F23 },366135 => %W{ F24 },367144 => %W{ NumLock },368145 => %W{ Scroll },369160 => %W{ LShift },370161 => %W{ RShift },371162 => %W{ LCtrl },372163 => %W{ RCtrl },373164 => %W{ LMenu },374165 => %W{ RMenu },375166 => %W{ Back },376167 => %W{ Forward },377168 => %W{ Refresh },378169 => %W{ Stop },379170 => %W{ Search },380171 => %W{ Favorites },381172 => %W{ Home },382176 => %W{ Forward },383177 => %W{ Reverse },384178 => %W{ Stop },385179 => %W{ Play },386186 => %W{ ; :},387187 => %W{ = +},388188 => %W{ , <},389189 => %W{ - _},390190 => %W{ . >},391191 => %W{ / ?},392192 => %W{ ' ~},393219 => %W| [ {|,394220 => %W{ \ |},395221 => %W| ] }|,396222 => %W{ ' Quotes},397}398399400