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

Method decode

pager_lib/smb/smb2_structs.py:611–627  ·  view source on GitHub ↗
(self, message)

Source from the content-addressed store, hash-verified

609 STRUCTURE_SIZE = struct.calcsize(STRUCTURE_FORMAT)
610
611 def decode(self, message):
612 assert message.command == SMB2_COM_IOCTL
613
614 if message.status == 0:
615 struct_size, _, self.ctlcode, self.fid, \
616 input_offset, input_len, output_offset, output_len, \
617 self.flags, _ = struct.unpack(self.STRUCTURE_FORMAT, message.raw_data[SMB2Message.HEADER_SIZE:SMB2Message.HEADER_SIZE+self.STRUCTURE_SIZE])
618
619 if input_len > 0:
620 self.in_data = message.raw_data[input_offset:input_offset+input_len]
621 else:
622 self.in_data = b''
623
624 if output_len > 0:
625 self.out_data = message.raw_data[output_offset:output_offset+output_len]
626 else:
627 self.out_data = b''
628
629
630class SMB2CloseRequest(Structure):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected