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

Class SMB2TreeConnectRequest

pager_lib/smb/smb2_structs.py:290–312  ·  view source on GitHub ↗

References: =========== - [MS-SMB2]: 2.2.9

Source from the content-addressed store, hash-verified

288
289
290class SMB2TreeConnectRequest(Structure):
291 """
292 References:
293 ===========
294 - [MS-SMB2]: 2.2.9
295 """
296
297 STRUCTURE_FORMAT = "<HHHH"
298 STRUCTURE_SIZE = struct.calcsize(STRUCTURE_FORMAT)
299
300 def __init__(self, path):
301 self.path = path
302
303 def initMessage(self, message):
304 Structure.initMessage(self, message)
305 message.command = SMB2_COM_TREE_CONNECT
306
307 def prepare(self, message):
308 message.data = struct.pack(self.STRUCTURE_FORMAT,
309 9, # Structure size. Must be 9 as mandated by [MS-SMB2] 2.2.9
310 0, # Reserved
311 SMB2Message.HEADER_SIZE + self.STRUCTURE_SIZE,
312 len(self.path)*2) + self.path.encode('UTF-16LE')
313
314
315class SMB2TreeConnectResponse(Structure):

Callers 12

_listShares_SMB2Method · 0.85
_listPath_SMB2Method · 0.85
_getAttributes_SMB2Method · 0.85
_getSecurity_SMB2Method · 0.85
_deleteFiles_SMB2Method · 0.85
_createDirectory_SMB2Method · 0.85
_deleteDirectory_SMB2Method · 0.85
_rename_SMB2Method · 0.85
_listSnapshots_SMB2Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected