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

Method decode

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

Source from the content-addressed store, hash-verified

425 STRUCTURE_SIZE = struct.calcsize(STRUCTURE_FORMAT)
426
427 def decode(self, message):
428 assert message.command == SMB2_COM_CREATE
429
430 if message.status == 0:
431 struct_size, self.oplock, _, self.create_action, \
432 create_time, lastaccess_time, lastwrite_time, change_time, \
433 self.allocation_size, self.file_size, self.file_attributes, \
434 _, self.fid, _, _ = struct.unpack(self.STRUCTURE_FORMAT, message.raw_data[SMB2Message.HEADER_SIZE:SMB2Message.HEADER_SIZE+self.STRUCTURE_SIZE])
435
436 self.create_time = convertFILETIMEtoEpoch(create_time)
437 self.lastaccess_time = convertFILETIMEtoEpoch(lastaccess_time)
438 self.lastwrite_time = convertFILETIMEtoEpoch(lastwrite_time)
439 self.change_time = convertFILETIMEtoEpoch(change_time)
440
441
442class SMB2WriteRequest(Structure):

Callers

nothing calls this directly

Calls 1

convertFILETIMEtoEpochFunction · 0.85

Tested by

no test coverage detected