📄 const.cs
字号:
string [] DaLocality = new string[4];
DaAccess[0] = "Open for reading"; DaAccess[1] = "Open for writing"; DaAccess[2] = "Open for reading and writing"; DaAccess[3] = "Open for execute";
DaSharing[0] = "Compatibility mode"; DaSharing[1] = "Deny read/write/execute (exclusive)"; DaSharing[2] = "Deny write"; DaSharing[3] = "Deny read/execute"; DaSharing[4] = "Deny none";
DaLocality[0] = "Locality of reference unknown"; DaLocality[1] = "Mainly sequential access"; DaLocality[2] = "Mainly random access"; DaLocality[3] = "Random access with some locality";
if( b > 3 ) return "Unknown";
return DaAccess[ b ];
}
public static string GetSmbDaSharingString( byte b )
{
string [] DaSharing = new string[5];
DaSharing[0] = "Compatibility mode"; DaSharing[1] = "Deny read/write/execute (exclusive)"; DaSharing[2] = "Deny write"; DaSharing[3] = "Deny read/execute"; DaSharing[4] = "Deny none";
if( b > 4 ) return "Unknown";
return DaSharing[ b ];
}
public static string GetSmbDaLocalityString( byte b )
{
string [] DaLocality = new string[4];
DaLocality[0] = "Locality of reference unknown"; DaLocality[1] = "Mainly sequential access"; DaLocality[2] = "Mainly random access"; DaLocality[3] = "Random access with some locality";
if( b > 3 ) return "Unknown";
return DaLocality[ b ];
}
public const byte NT_TRANS_CREATE = 1; public const byte NT_TRANS_IOCTL = 2; public const byte NT_TRANS_SSD = 3; public const byte NT_TRANS_NOTIFY = 4; public const byte NT_TRANS_RENAME = 5; public const byte NT_TRANS_QSD = 6; public const byte NT_TRANS_GET_USER_QUOTA = 7; public const byte NT_TRANS_SET_USER_QUOTA = 8; public static string GetSmbNtCommandString( byte b ) { string [] NtCmd = new string[9]; NtCmd[NT_TRANS_CREATE] = "NT CREATE"; NtCmd[NT_TRANS_IOCTL] = "NT IOCTL"; NtCmd[NT_TRANS_SSD] = "NT SET SECURITY DESC"; NtCmd[NT_TRANS_NOTIFY] = "NT NOTIFY"; NtCmd[NT_TRANS_RENAME] = "NT RENAME"; NtCmd[NT_TRANS_QSD] = "NT QUERY SECURITY DESC"; NtCmd[NT_TRANS_GET_USER_QUOTA] = "NT GET USER QUOTA"; NtCmd[NT_TRANS_SET_USER_QUOTA] = "NT SET USER QUOTA"; if( b > 8 ) return "Unknown"; return NtCmd[ b ]; }
public static string GetSmbNtIoctlString( byte b ) { string [] NtIoctl = new string[2]; NtIoctl[0] = "Device IOCTL"; NtIoctl[1] = "FS control : FSCTL"; if( b > 1 ) return "Unknown"; return NtIoctl[ b ]; } public const byte NT_IOCTL_FLAGS_ROOT_HANDLE = 0x01;
public static string GetSmbNtNotifyActionString( byte b )
{
string [] NotifyAction = new string[9];
NotifyAction[1] = "ADDED (object was added"; NotifyAction[2] = "REMOVED (object was removed)"; NotifyAction[3] = "MODIFIED (object was modified)"; NotifyAction[4] = "RENAMED_OLD_NAME (this is the old name of object)"; NotifyAction[5] = "RENAMED_NEW_NAME (this is the new name of object)"; NotifyAction[6] = "ADDED_STREAM (a stream was added)"; NotifyAction[7] = "REMOVED_STREAM (a stream was removed)"; NotifyAction[8] = "MODIFIED_STREAM (a stream was modified)";
if( ( b == 0 ) || ( b > 9 ) ) return "Unknown";
return NotifyAction[ b ];
}
public static string GetSmbWatchTreeString( byte b )
{
string [] WatchTree = new string[3];
WatchTree[1] = "Current directory only"; WatchTree[2] = "Subdirectories also";
if( ( b == 0 ) || ( b > 2 ) ) return "Unknown";
return WatchTree[ b ];
}
public const uint NT_NOTIFY_STREAM_WRITE = 0x00000800; public const uint NT_NOTIFY_STREAM_SIZE = 0x00000400; public const uint NT_NOTIFY_STREAM_NAME = 0x00000200; public const uint NT_NOTIFY_SECURITY = 0x00000100; public const uint NT_NOTIFY_EA = 0x00000080; public const uint NT_NOTIFY_CREATION = 0x00000040; public const uint NT_NOTIFY_LAST_ACCESS = 0x00000020; public const uint NT_NOTIFY_LAST_WRITE = 0x00000010; public const uint NT_NOTIFY_SIZE = 0x00000008; public const uint NT_NOTIFY_ATTRIBUTES = 0x00000004; public const uint NT_NOTIFY_DIR_NAME = 0x00000002; public const uint NT_NOTIFY_FILE_NAME = 0x00000001;
public static string GetSmbCreateDispositionString( byte b )
{
string [] CreateDisposition = new string[6];
CreateDisposition[0] = "Supersede (supersede existing file (if it exists))"; CreateDisposition[1] = "Open (if file exists open it, else fail)"; CreateDisposition[2] = "Create (if file exists fail, else create it)"; CreateDisposition[3] = "Open If (if file exists open it, else create it)"; CreateDisposition[4] = "Overwrite (if file exists overwrite, else fail)"; CreateDisposition[5] = "Overwrite If (if file exists overwrite, else create it)";
if( b > 5 ) return "Unknown";
return CreateDisposition[ b ];
}
public static string GetSmbImpersonationLevelString( byte b )
{
string [] ImpersonationLevel = new string[4];
ImpersonationLevel[0] = "Anonymous"; ImpersonationLevel[1] = "Identification"; ImpersonationLevel[2] = "Impersonation"; ImpersonationLevel[3] = "Delegation";
if( b > 3 ) return "Unknown";
return ImpersonationLevel[ b ];
}
public static string GetSmbOplockLevelString( byte b )
{
string [] OplockLevel = new string[4];
OplockLevel[0] = "No oplock granted"; OplockLevel[1] = "Exclusive oplock granted"; OplockLevel[2] = "Batch oplock granted"; OplockLevel[3] = "Level II oplock granted";
if( b > 3 ) return "Unknown";
return OplockLevel[ b ];
}
public static string GetSmbDeviceTypeString( uint b )
{
string [] DeviceType = new string[0x2d];
DeviceType[0x00000001] = "Beep"; DeviceType[0x00000002] = "CDROM"; DeviceType[0x00000003] = "CDROM Filesystem"; DeviceType[0x00000004] = "Controller"; DeviceType[0x00000005] = "Datalink"; DeviceType[0x00000006] = "Dfs"; DeviceType[0x00000007] = "Disk"; DeviceType[0x00000008] = "Disk Filesystem"; DeviceType[0x00000009] = "Filesystem"; DeviceType[0x0000000a] = "Inport Port"; DeviceType[0x0000000b] = "Keyboard"; DeviceType[0x0000000c] = "Mailslot"; DeviceType[0x0000000d] = "MIDI-In"; DeviceType[0x0000000e] = "MIDI-Out"; DeviceType[0x0000000f] = "Mouse"; DeviceType[0x00000010] = "Multi UNC Provider"; DeviceType[0x00000011] = "Named Pipe"; DeviceType[0x00000012] = "Network"; DeviceType[0x00000013] = "Network Browser"; DeviceType[0x00000014] = "Network Filesystem"; DeviceType[0x00000015] = "NULL"; DeviceType[0x00000016] = "Parallel Port"; DeviceType[0x00000017] = "Physical card"; DeviceType[0x00000018] = "Printer"; DeviceType[0x00000019] = "Scanner"; DeviceType[0x0000001a] = "Serial Mouse port"; DeviceType[0x0000001b] = "Serial port"; DeviceType[0x0000001c] = "Screen"; DeviceType[0x0000001d] = "Sound"; DeviceType[0x0000001e] = "Streams"; DeviceType[0x0000001f] = "Tape"; DeviceType[0x00000020] = "Tape Filesystem"; DeviceType[0x00000021] = "Transport"; DeviceType[0x00000022] = "Unknown"; DeviceType[0x00000023] = "Video"; DeviceType[0x00000024] = "Virtual Disk"; DeviceType[0x00000025] = "WAVE-In"; DeviceType[0x00000026] = "WAVE-Out"; DeviceType[0x00000027] = "8042 Port"; DeviceType[0x00000028] = "Network Redirector"; DeviceType[0x00000029] = "Battery"; DeviceType[0x0000002a] = "Bus Extender"; DeviceType[0x0000002b] = "Modem"; DeviceType[0x0000002c] = "VDM";
if( b > 0x2c ) return "Unknown";
return DeviceType[ b ];
}
public const uint NT_QSD_OWNER = 0x00000001; public const uint NT_QSD_GROUP = 0x00000002; public const uint NT_QSD_DACL = 0x00000004; public const uint NT_QSD_SACL = 0x00000008;
public static string GetSmbPrintModeString( byte b )
{
string [] PrintMode = new string[2];
PrintMode[0] = "Text Mode"; PrintMode[1] = "Graphics Mode";
if( b > 1 ) return "Unknown";
return PrintMode[ b ];
}
public static string GetSmbPrintStatusString( byte b )
{
string [] PrintStatus = new string[7];
PrintStatus[1] = "Held or Stopped"; PrintStatus[2] = "Printing"; PrintStatus[3] = "Awaiting print"; PrintStatus[4] = "In intercept"; PrintStatus[5] = "File had error"; PrintStatus[6] = "Printer error";
if( ( b == 0 ) || ( b > 6 ) ) return "Unknown";
return PrintStatus[ b ];
}
public static string GetSmbTrans2CommandString( byte b )
{
string [] Trans2Command = new string[18];
Trans2Command[0x00] = "OPEN2"; Trans2Command[0x01] = "FIND_FIRST2"; Trans2Command[0x02] = "FIND_NEXT2"; Trans2Command[0x03] = "QUERY_FS_INFORMATION"; Trans2Command[0x04] = "SET_FS_QUOTA"; Trans2Command[0x05] = "QUERY_PATH_INFORMATION"; Trans2Command[0x06] = "SET_PATH_INFORMATION"; Trans2Command[0x07] = "QUERY_FILE_INFORMATION"; Trans2Command[0x08] = "SET_FILE_INFORMATION"; Trans2Command[0x09] = "FSCTL"; Trans2Command[0x0A] = "IOCTL2"; Trans2Command[0x0B] = "FIND_NOTIFY_FIRST"; Trans2Command[0x0C] = "FIND_NOTIFY_NEXT"; Trans2Command[0x0D] = "CREATE_DIRECTORY"; Trans2Command[0x0E] = "SESSION_SETUP"; Trans2Command[0x10] = "GET_DFS_REFERRAL"; Trans2Command[0x11] = "REPORT_DFS_INCONSISTENCY";
if( b > 17 ) return "Unknown";
return Trans2Command[ b ];
}
public static string GetSmbFf2IlString( ushort b )
{
string Tmp = "";
switch( b )
{
case 1 : Tmp = "Info Standard (4.3.4.1)"; break; case 2 : Tmp = "Info Query EA Size (4.3.4.2)"; break; case 3 : Tmp = "Info Query EAs From List (4.3.4.2)"; break; case 0x0101 : Tmp = "Find File Directory Info (4.3.4.4)"; break; case 0x0102 : Tmp = "Find File Full Directory Info (4.3.4.5)"; break; case 0x0103 : Tmp = "Find File Names Info (4.3.4.7)"; break; case 0x0104 : Tmp = "Find File Both Directory Info (4.3.4.6)"; break; case 0x0202 : Tmp = "Find File UNIX (4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -