⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 const.cs

📁 一个抓包工具
💻 CS
📖 第 1 页 / 共 5 页
字号:
		public const byte SAP_MASK	 = 0xFE;
		public const byte DSAP_GI_BIT	= 0x01;
		public const byte SSAP_CR_BIT	= 0x01;
		public const byte XDLC_I		= 0x00;	// Information frames		public const byte XDLC_S		= 0x01; // Supervisory frames		public const byte XDLC_U		= 0x03;	// Unnumbered frames
		 // U-format modifiers.		public const byte XDLC_U_MODIFIER_MASK	= 0xEC;		public const byte XDLC_UI		= 0x00	; // Unnumbered Information 		public const byte XDLC_UP		= 0x20	; // Unnumbered Poll 		public const byte XDLC_DISC	= 0x40	; // Disconnect (command) 		public const byte XDLC_RD		= 0x40	; // Request Disconnect (response) 		public const byte XDLC_UA		= 0x60	; // Unnumbered Acknowledge 		public const byte XDLC_SNRM	= 0x80	; // Set Normal Response Mode 		public const byte XDLC_TEST	= 0xE0	; // Test 		public const byte XDLC_SIM	= 0x04	; // Set Initialization Mode (command) 		public const byte XDLC_RIM	= 0x04	; // Request Initialization Mode (response) 		public const byte XDLC_FRMR	= 0x84	; // Frame reject 		public const byte XDLC_CFGR	= 0xC4	; // Configure 		public const byte XDLC_SARM	= 0x0C	; // Set Asynchronous Response Mode (command) 		public const byte XDLC_DM		= 0x0C	; // Disconnected mode (response) 		public const byte XDLC_SABM	= 0x2C	; // Set Asynchronous Balanced Mode 		public const byte XDLC_SARME	= 0x4C	; // Set Asynchronous Response Mode Extended 		public const byte XDLC_SABME	= 0x6C	; // Set Asynchronous Balanced Mode Extended 		public const byte XDLC_RESET	= 0x8C	; // Reset 		public const byte XDLC_XID	= 0xAC	; // Exchange identification 		public const byte XDLC_SNRME	= 0xCC	; // Set Normal Response Mode Extended 		public const byte XDLC_BCN	= 0xEC	; // Beacon 

		//N(S) and N(R) fields, in basic and extended operation.		public const ushort XDLC_N_R_MASK		= 0xE0;	// basic		public const ushort XDLC_N_R_SHIFT		= 5;		public const ushort XDLC_N_R_EXT_MASK	= 0xFE00;	// extended		public const ushort XDLC_N_R_EXT_SHIFT	= 9;		public const ushort XDLC_N_S_MASK		= 0x0E;	// basic		public const ushort XDLC_N_S_SHIFT		= 1;		public const ushort XDLC_N_S_EXT_MASK	= 0x00FE;	// extended		public const ushort XDLC_N_S_EXT_SHIFT	= 1;		//Poll/Final bit, in basic and extended operation.		public const ushort XDLC_P_F	= 0x10;	// basic		public const ushort XDLC_P_F_EXT	= 0x0100;	// extended		//S-format frame types.		public const ushort XDLC_S_FTYPE_MASK	= 0x0C;		public const ushort XDLC_RR			= 0x00;	// Receiver ready		public const ushort XDLC_RNR		= 0x04;	// Receiver not ready		public const ushort XDLC_REJ		= 0x08;	// Reject		public const ushort XDLC_SREJ		= 0x0C;	// Selective reject
		public const uint OUI_ENCAP_ETHER	= 0x000000;	// encapsulated Ethernet		public const uint OUI_CISCO	= 0x00000C;	// Cisco (future use)		public const uint OUI_CISCO_90	= 0x0000F8;	// Cisco (IOS 9.0 and above?)		public const uint OUI_BRIDGED	= 0x0080C2;	// Bridged Frame-Relay, RFC 2427 and Bridged ATM, RFC 2684		public const uint OUI_ATM_FORUM	 = 0x00A03E;	// ATM Foru		public const uint OUI_CABLE_BPDU	= 0x00E02F;	// DOCSIS spanning tree BPDU		public const uint OUI_APPLE_ATALK	= 0x080007;	// Appletalk
		public const byte LLCSAP_NULL	= 0x00;
		public const byte LLCSAP_GLOBAL	= 0xff;
		public const byte LLCSAP_8021B_I	= 0x02;
		public const byte LLCSAP_8021B_G	= 0x03;
		public const byte LLCSAP_IP	= 0x06;
		public const byte LLCSAP_PROWAYNM	= 0x0e;
		public const byte LLCSAP_8021D	= 0x42;
		public const byte LLCSAP_RS511	= 0x4e;
		public const byte LLCSAP_ISO8208	= 0x7e;
		public const byte LLCSAP_PROWAY	= 0x8e;
		public const byte LLCSAP_SNAP	= 0xaa;
		public const byte LLCSAP_IPX	= 0xe0;
		public const byte LLCSAP_NETBEUI	= 0xf0;
		public const byte LLCSAP_ISONS	= 0xfe;

		public const byte LLC_TYPE_LSAP = 0x00;
		public const byte LLC_TYPE_SMAN_FUNCTION_I = 0x02;
		public const byte LLC_TYPE_SMAN_FUNCTION_G = 0x03;
		public const byte LLC_TYPE_IBM_SNA_PATH_CTRL_I = 0x04;
		public const byte LLC_TYPE_IBM_SNA_PATH_CTRL_G = 0x05;
		public const byte LLC_TYPE_ARPANET_IP = 0x06;
		public const byte LLC_TYPE_SNA_CSNA_EPROWAY = 0x08;
		public const byte LLC_TYPE_TEXAS_INSTRUMENTS = 0x18;
		public const byte LLC_TYPE_STP = 0x42;
		public const byte LLC_TYPE_EIA_MMS = 0x4E;
		public const byte LLC_TYPE_X25_OVER_LLC2 = 0x7E;
		public const byte LLC_TYPE_XNS = 0x80;
		public const byte LLC_TYPE_NESTAR = 0x86;
		public const byte LLC_TYPE_PROWAY = 0x8E;
		public const byte LLC_TYPE_ARPANET_ARP = 0x98;
		public const byte LLC_TYPE_BANYAN_VINES = 0xBC;
		public const byte LLC_TYPE_SNAP = 0xAA;
		public const byte LLC_TYPE_NOVELL_NETWARE = 0xE0;
		public const byte LLC_TYPE_IBM_NETBIOS = 0xF0;
		public const byte LLC_TYPE_IBM_LANMAN_I = 0xF4;
		public const byte LLC_TYPE_IBM_LANMAN_G = 0xF5;
		public const byte LLC_TYPE_IBM_RPL = 0xF8;
		public const byte LLC_TYPE_UNGERMANN_BASS = 0xFA;
		public const byte LLC_TYPE_ISO_NLP = 0xFE;
		public const byte LLC_TYPE_GLOBAL_LSAP = 0xFF;

		public const int PACKET_ORGANIZATION_CISCO = 0x0000000C;

		public const byte NBDS_DIRECT_UNIQUE	= 0x10;		public const byte NBDS_DIRECT_GROUP	= 0x11;		public const byte NBDS_BROADCAST		= 0x12;		public const byte NBDS_ERROR		= 0x13;		public const byte NBDS_QUERY_REQUEST	= 0x14;		public const byte NBDS_POS_QUERY_RESPONSE	= 0x15;		public const byte NBDS_NEG_QUERY_RESPONSE	= 0x16;

		public const ushort UDP_PORT_NBNS	= 137;		public const ushort UDP_PORT_NBDGM	= 138;		public const ushort TCP_PORT_NBSS	= 139;		public const ushort TCP_PORT_CIFS	= 445;		// Bit fields in the flags 		public const ushort FLAGS_OP_CODE				= (0xF<<11);       // query opcode 		public const ushort OPCODE_SHIFT				= 11;		public const ushort FLAGS_REPLY_CODE			= (0xF<<0);        // reply code 
		// type values  
		public const ushort TYPE_NB	= 0x0020; // NetBIOS name service RR 
		public const ushort TYPE_NBSTAT = 0x0021; // NetBIOS node status RR 

		public const ushort CLASS_INET	 = 1;		// the Internet		public const ushort CLASS_CSNET	 = 2;		// CSNET (obsolete)		public const ushort CLASS_CHAOS	 = 3;		// CHAOS		public const ushort CLASS_HESIOD = 4;		// Hesiod		public const ushort CLASS_NONE	 = 254;		// none		public const ushort CLASS_ANY	 = 255;		// any		public const ushort CLASS_FLUSH  = 0x8000;  // High bit is set for MDNS cache flush
		// Opcodes 
		public const byte OPCODE_QUERY          = 0;         // standard query		public const byte OPCODE_REGISTRATION   = 5;         // registration		public const byte OPCODE_RELEASE        = 6;         // release name		public const byte OPCODE_WACK           = 7;         // wait for acknowledgement		public const byte OPCODE_REFRESH        = 8;         // refresh registration		public const byte OPCODE_REFRESHALT     = 9;         // refresh registration (alternate opcode)		public const byte OPCODE_MHREGISTRATION = 15;        // multi-homed registration
		// Reply codes		public const byte RCODE_NOERROR   = 0;		public const byte RCODE_FMTERROR  = 1;		public const byte RCODE_SERVFAIL  = 2;		public const byte RCODE_NAMEERROR = 3;		public const byte RCODE_NOTIMPL   = 4;		public const byte RCODE_REFUSED   = 5;		public const byte RCODE_ACTIVE    = 6;		public const byte RCODE_CONFLICT  = 7;

		public const ushort	NB_FLAGS_MASK		= 0x6000;	// bits for node type 		public const ushort	NB_FLAGS_B_NODE	= 0;	// B-mode node 		public const ushort	NB_FLAGS_P_NODE	= 1;	// P-mode node 		public const ushort	NB_FLAGS_M_NODE	= 2;	// M-mode node 		public const ushort	NB_FLAGS_H_NODE	= 3;	// H-mode node 		public const ushort	NB_FLAGS_G		= 0x8000;	// group name 		public const ushort	NAME_FLAGS_PRM		= 0x0200;	// name is permanent node name 		public const ushort	NAME_FLAGS_ACT		= 0x0400;	// name is active 		public const ushort	NAME_FLAGS_CNF		= 0x0800;	// name is in conflict 		public const ushort	NAME_FLAGS_DRG		= 0x1000;	// name is being deregistered 		public const ushort	NAME_FLAGS_MASK		= 0x6000;	// bits for node type 		public const ushort	NAME_FLAGS_B_NODE	= 0;	// B-mode node 		public const ushort	NAME_FLAGS_P_NODE	= 1;	// P-mode node 		public const ushort	NAME_FLAGS_M_NODE	= 2;	// M-mode node 		public const ushort	NAME_FLAGS_G		= 0x8000;	// group name 

		public const byte SESSION_MESSAGE			= 0x00;		public const byte SESSION_REQUEST			= 0x81;		public const byte POSITIVE_SESSION_RESPONSE	= 0x82;		public const byte NEGATIVE_SESSION_RESPONSE	= 0x83;		public const byte RETARGET_SESSION_RESPONSE	= 0x84;		public const byte SESSION_KEEP_ALIVE		= 0x85;		public const byte NBSS_FLAGS_E			= 0x1;

		/* Netbios command numbers */		public const byte NB_ADD_GROUP		= 0x00;		public const byte NB_ADD_NAME		= 0x01;		public const byte NB_NAME_IN_CONFLICT	= 0x02;		public const byte NB_STATUS_QUERY		= 0x03;		public const byte NB_TERMINATE_TRACE_R	= 0x07;		public const byte NB_DATAGRAM		= 0x08;		public const byte NB_DATAGRAM_BCAST	= 0x09;		public const byte NB_NAME_QUERY		= 0x0a;		public const byte NB_ADD_NAME_RESP	= 0x0d;		public const byte NB_NAME_RESP 		= 0x0e;		public const byte NB_STATUS_RESP 		= 0x0f;		public const byte NB_TERMINATE_TRACE_LR	= 0x13;		public const byte NB_DATA_ACK		= 0x14;		public const byte NB_DATA_FIRST_MIDDLE	= 0x15;		public const byte NB_DATA_ONLY_LAST	= 0x16;		public const byte NB_SESSION_CONFIRM	= 0x17;		public const byte NB_SESSION_END		= 0x18;		public const byte NB_SESSION_INIT		= 0x19;		public const byte NB_NO_RECEIVE		= 0x1a;		public const byte NB_RECEIVE_OUTSTANDING	= 0x1b;		public const byte NB_RECEIVE_CONTINUE	= 0x1c;		public const byte NB_KEEP_ALIVE		= 0x1f;

		public const byte SMB_CMD_CREATE_DIR = 0x00; // Create directory 
		public const byte SMB_CMD_DELETE_DIR =  0x01; //  Delete directory 
		public const byte SMB_CMD_OPEN_FILE = 0x02; //  Open file 
		public const byte SMB_CMD_CREATE_FILE = 0x03; //  Create file 
		public const byte SMB_CMD_CLOSE_FILE = 0x04; //  Close file 
		public const byte SMB_CMD_COMMIT_ALL_FILES = 0x05; //  Commit all files 
		public const byte SMB_CMD_DELETE_FILE = 0x06; //  Delete file 
		public const byte SMB_CMD_RENAME_FILE = 0x07; //  Rename file 
		public const byte SMB_CMD_GET_FILE_ATTRIBUTE = 0x08; //  Get file attribute 
		public const byte SMB_CMD_SET_FILE_ATTRIBUTE = 0x09; //  Set file attribute 
		public const byte SMB_CMD_READ_BYTE_BLOCK = 0x0a; //  Read byte block 
		public const byte SMB_CMD_WRITE_BYTE_BLOCK = 0x0b; //  Write byte block 
		public const byte SMB_CMD_LOCK_BYTE_BLOCK = 0x0c; //  Lock byte block 
		public const byte SMB_CMD_UNLOCK_BYTE_BLOCK = 0x0d; //  Unlock byte block 
		public const byte SMB_CMD_CREATE_NEW_FILE = 0x0f; //  Create new file 
		public const byte SMB_CMD_CHECK_DIR = 0x10; //  Check directory 
		public const byte SMB_CMD_END_OF_PROCESS = 0x11; //  End of process 
		public const byte SMB_CMD_LSEEK = 0x12; //  LSEEK 
		public const byte SMB_CMD_START_CONNECTION = 0x70; //  Start connection 
		public const byte SMB_CMD_END_CONNECTION = 0x71; //  End connection 
		public const byte SMB_CMD_VERIFY_DIALECT = 0x72; //  Verify dialect 
		public const byte SMB_CMD_GET_DISK_ATTRIBUTES = 0x80; //  Get disk attributes 
		public const byte SMB_CMD_SEARCH_MULTIPLE_FILES = 0x81; //  Search multiple files 
		public const byte SMB_CMD_CREATE_SPOOL_FILE = 0xc0; //  Create spool file 
		public const byte SMB_CMD_SPOOL_BYTE_BLOCK = 0xc1; //  Spool byte block 
		public const byte SMB_CMD_CLOSE_SPOOL_FILE = 0xc2; //  Close spool file 
		public const byte SMB_CMD_RETURN_PRINT_QUEUE = 0xc3; //  Return print queue 
		public const byte SMB_CMD_SEND_MESSAGE = 0xd0; //  Send message 
		public const byte SMB_CMD_SEND_BROADCAST = 0xd1; //  Send broadcast 
		public const byte SMB_CMD_FORWARD_USER_NAME = 0xd2; //  Forward user name 
		public const byte SMB_CMD_CANCEL_FORWARD = 0xd3; //  Cancel forward 
		public const byte SMB_CMD_GET_MACHINE_NAME = 0xd4; //  Get machine name 
		public const byte SMB_CMD_START_MULTI_BLOCK_MESSAGE = 0xd5; //  Start multi-block message 
		public const byte SMB_CMD_END_MULTI_BLOCK_MESSAGE = 0xd6; //  End multi-block message 
		public const byte SMB_CMD_MULTI_BLOCK_MESSAGE_TEXT = 0xd7; //  Multi-block message text 
		public const byte SMB_CMD_INVALID = 0xfe; //  Invalid 
		public const byte SMB_CMD_IMPLEMENTATION_DEPENDENT = 0xff; //  Implementation-dependant 

		// SMB Core Plus Commands

		public const byte SMB_CMD_LOCAK_THEN_READ_DATA = 0x13; // Lock then read data 
		public const byte SMB_CMD_WRITE_THEN_UNLOCK_DATA = 0x14; // Write then unlock data 
		public const byte SMB_CMD_READ_BLOCK_RAW = 0x1a; // Read block raw 
		public const byte SMB_CMD_WRITE_BLOCK_RAW = 0x1d; // Write block raw 

		//

		//LANMAN 1.0 SMB Commands
		public const byte SMB_CMD_READ_BLOCK_MULTIPLEXED = 0x1b; // Read block multiplexed 
		public const byte SMB_CMD_READ_BLOCK_SR = 0x1c; // Read block (secondary response) 
		public const byte SMB_CMD_WRITE_BLOCK_MULTIPLEXED = 0x1e; // Write block multiplexed 
		public const byte SMB_CMD_WRITE_BLOCK_SR = 0x1f; // Write block (secondary response) 
		public const byte SMB_CMD_WRITE_COMPLETE_RESPONSE = 0x20; // Write complete response 
		public const byte SMB_CMD_SET_FILE_ATTRIBUTES_EXPANDED = 0x22; // Set file attributes expanded 
		public const byte SMB_CMD_GET_FILE_ATTRIBUTES_EXPANDED = 0x23; // Get file attributes expanded 
		public const byte SMB_CMD_LOCK_UNLOCK_BYTE_RANGES_AND_X = 0x24; // Lock/unlock byte ranges and X 
		public const byte SMB_CMD_TRANSACTION = 0x25; // Transaction (name, bytes in/out) 
		public const byte SMB_CMD_TRANSACTION_SECONDARY = 0x26; // Transaction (secondary request/response) 
		public const byte SMB_CMD_PASS_IOCTL_TO_SERVER = 0x27; // Passes the IOCTL to the server 
		public const byte SMB_CMD_IOCTL = 0x28; // IOCTL (secondary request/response) 
		public const byte SMB_CMD_COPY = 0x29; // Copy 
		public const byte SMB_CMD_MOVE = 0x2a; // Move 
		public const byte SMB_CMD_ECHO = 0x2b; // Echo 
		public const byte SMB_CMD_WRITE_AND_CLOSE = 0x2c; // Write and Close 
		public const byte SMB_CMD_OPEN_AND_X = 0x2d; // Open and X 
		public const byte SMB_CMD_READ_AND_X = 0x2e; // Read and X 
		public const byte SMB_CMD_WRITE_AND_X = 0x2f; // Write and X 
		public const byte SMB_CMD_SESSION_SETUP_AND_X = 0x73; // Session Set Up and X (including User Logon) 
		public const byte SMB_CMD_TREE_CONNECT_AND_X = 0x75; // Tree connect and X 
		public const byte SMB_CMD_FIND_FIRST = 0x82; // Find first 
		public const byte SMB_CMD_FIND_UNIQUE = 0x83; // Find unique 
		public const byte SMB_CMD_FIND_CLOSE = 0x84; // Find close 
		//public const byte SMB_CMD_INVALID = 0xfe; // Invalid command 

		// SMB Error Class Codes
		public const byte SMB_ERROR_CLASS_SUCCESS  = 0x00; // The request was successful 
		public const byte SMB_ERROR_CLASS_ERRSRV =  0x02; // Error generated by the LMX server 

		// SMB Return Codes for Error class 0x00 
		public const byte SMB_ERROR_CLASS_SUCCESS_BUFFERED = 0x54; // The Message was buffered 
		public const byte SMB_ERROR_CLASS_SUCCESS_LOGGED = 0x55; // The Message was logged 
		public const byte SMB_ERROR_CLASS_SUCCESS_DISPLAYED = 0x56; // The Message was displayed 


		// SMB Return Codes for Error class 0x02 
		public const byte SMB_ERROR_CLASS_ERRSRV_ERRerror = 0x01; // Non-specific error code 
		public const byte SMB_ERROR_CLASS_ERRSRV_ERRbadpw = 0x02; // Bad password 
		public const byte SMB_ERROR_CLASS_ERRSRV_ERRbadtype = 0x03; // Reserved 



		public const byte SMB_COMMAND_SEND_SINGLE_BLOCK_MESSAGE = 0xd0;
		public const byte SMB_COMMAND_TRANSACTION_REQUEST = 0x25;

		public const ushort  FLAGS_TRANSACTION_ONEWAY = 0x0002;
		public const ushort  FLAGS_TRANSACTION_DISCONNECT = 0x0001;

		public const byte FLAGS_REQUEST_RESPONSE = 0x80;
		public const byte FLAGS_NOTIFY = 0x40;
		public const byte FLAGS_OPLOCKS = 0x20;
		public const byte FLAGS_CANONICALIZED_PATH_NAMES = 0x10;
		public const byte FLAGS_CASE_SENSITIVITY = 0x08;
		public const byte FLAGS_RECEIVE_BUFFER_POSTED = 0x02;
		public const byte FLAGS_LOCK_AND_READ = 0x01;

		public const ushort FLAGS2_UNICODE_STRINGS = 0x8000;
		public const ushort FLAGS2_ERROR_CODE_TYPE = 0x4000;
		public const ushort FLAGS2_EXECUTE_ONLY_READS = 0x2000;
		public const ushort FLAGS2_DFS = 0x1000;
		public const ushort FLAGS2_EXTENDED_SECURITY_NEGOTIATION = 0x0800;
		public const ushort FLAGS2_LONG_NAMES_USED = 0x0040;
		public const ushort FLAGS2_SECUTIRY_SIGNATURES = 0x0004;
		public const ushort FLAGS2_EXTENDED_ATTRIBUTES = 0x0002;
		public const ushort FLAGS2_LONG_NAMES_ALLOWED = 0x0001;

		public const byte FORMAT_TYPE_ASCII = 0x04;
		public const byte FORMAT_TYPE_DATA_BLOCK = 0x01;


		public const uint SMB_FILE_ATTRIBUTE_READ_ONLY				= 0x00000001;		public const uint SMB_FILE_ATTRIBUTE_HIDDEN					= 0x00000002;		public const uint SMB_FILE_ATTRIBUTE_SYSTEM					= 0x00000004;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -