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

Class SMB2SetInfoRequest

pager_lib/smb/smb2_structs.py:786–817  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

784
785
786class SMB2SetInfoRequest(Structure):
787 """
788 References:
789 ===========
790 - [MS-SMB2]: 2.2.39
791 """
792
793 STRUCTURE_FORMAT = "<HBBIHHI16s"
794 STRUCTURE_SIZE = struct.calcsize(STRUCTURE_FORMAT)
795
796 def __init__(self, fid, additional_info, info_type, file_info_class, data):
797 self.fid = fid
798 self.additional_info = additional_info
799 self.info_type = info_type
800 self.file_info_class = file_info_class
801 self.data = data or b''
802
803 def initMessage(self, message):
804 Structure.initMessage(self, message)
805 message.command = SMB2_COM_SET_INFO
806
807 def prepare(self, message):
808 message.data = struct.pack(self.STRUCTURE_FORMAT,
809 33, # StructureSize. Must be 33 as mandated by [MS-SMB2] 2.2.39
810 self.info_type, # InfoType
811 self.file_info_class, # FileInfoClass
812 len(self.data), # BufferLength
813 SMB2Message.HEADER_SIZE + self.STRUCTURE_SIZE, # BufferOffset
814 0, # Reserved
815 self.additional_info, # AdditionalInformation
816 self.fid # FileId
817 ) + self.data
818
819class SMB2SetInfoResponse(Structure):
820 """

Callers 3

sendDeleteMethod · 0.85
sendResetMethod · 0.85
sendRenameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected