MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / SMB2TreeConnectResponse

Class SMB2TreeConnectResponse

pager_lib/smb/smb2_structs.py:315–339  ·  view source on GitHub ↗

Contains information about the SMB2_COM_TREE_CONNECT response from the server. If the message has no errors, each instance contains the following attributes: - share_type (integer): one of the SMB2_SHARE_TYPE_xxx constants - share_flags (integer) - capabilities (integer): bitma

Source from the content-addressed store, hash-verified

313
314
315class SMB2TreeConnectResponse(Structure):
316 """
317 Contains information about the SMB2_COM_TREE_CONNECT response from the server.
318
319 If the message has no errors, each instance contains the following attributes:
320 - share_type (integer): one of the SMB2_SHARE_TYPE_xxx constants
321 - share_flags (integer)
322 - capabilities (integer): bitmask of SMB2_SHARE_CAP_xxx
323 - maximal_access (integer)
324
325 References:
326 ===========
327 - [MS-SMB2]: 2.2.10
328 """
329
330 STRUCTURE_FORMAT = "<HBBIII"
331 STRUCTURE_SIZE = struct.calcsize(STRUCTURE_FORMAT)
332
333 def decode(self, message):
334 assert message.command == SMB2_COM_TREE_CONNECT
335
336 if message.status == 0:
337 struct_size, self.share_type, _, \
338 self.share_flags, self.capabilities, self.maximal_access \
339 = struct.unpack(self.STRUCTURE_FORMAT, message.raw_data[SMB2Message.HEADER_SIZE:SMB2Message.HEADER_SIZE+self.STRUCTURE_SIZE])
340
341
342class SMB2CreateRequest(Structure):

Callers 1

_decodeCommandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected