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

Method decode

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

Source from the content-addressed store, hash-verified

213 STRUCTURE_SIZE = struct.calcsize(STRUCTURE_FORMAT)
214
215 def decode(self, message):
216 assert message.command == SMB2_COM_NEGOTIATE
217
218 if message.status == 0:
219 struct_size, self.security_mode, self.dialect_revision, _, self.server_guid, self.capabilities, \
220 self.max_transact_size, self.max_read_size, self.max_write_size, self.system_time, self.server_start_time, \
221 security_buf_offset, security_buf_len, _ = struct.unpack(self.STRUCTURE_FORMAT, message.raw_data[SMB2Message.HEADER_SIZE:SMB2Message.HEADER_SIZE+self.STRUCTURE_SIZE])
222
223 self.server_start_time = convertFILETIMEtoEpoch(self.server_start_time)
224 self.system_time = convertFILETIMEtoEpoch(self.system_time)
225 self.security_blob = message.raw_data[security_buf_offset:security_buf_offset+security_buf_len]
226
227
228class SMB2SessionSetupRequest(Structure):

Callers

nothing calls this directly

Calls 1

convertFILETIMEtoEpochFunction · 0.85

Tested by

no test coverage detected