我们从Python开源项目中,提取了以下16个代码示例,用于说明如何使用utils.convertFILETIMEtoEpoch()。
def decode(self, message): assert message.command == SMB2_COM_NEGOTIATE if message.status == 0: struct_size, self.security_mode, self.dialect_revision, _, self.server_guid, self.capabilities, \ self.max_transact_size, self.max_read_size, self.max_write_size, self.system_time, self.server_start_time, \ security_buf_offset, security_buf_len, _ = struct.unpack(self.STRUCTURE_FORMAT, message.raw_data[SMB2Message.HEADER_SIZE:SMB2Message.HEADER_SIZE+self.STRUCTURE_SIZE]) self.server_start_time = convertFILETIMEtoEpoch(self.server_start_time) self.system_time = convertFILETIMEtoEpoch(self.system_time) self.security_blob = message.raw_data[security_buf_offset:security_buf_offset+security_buf_len]
def decode(self, message): assert message.command == SMB2_COM_CREATE if message.status == 0: struct_size, self.oplock, _, self.create_action, \ create_time, lastaccess_time, lastwrite_time, change_time, \ self.allocation_size, self.file_size, self.file_attributes, \ _, self.fid, _, _ = struct.unpack(self.STRUCTURE_FORMAT, message.raw_data[SMB2Message.HEADER_SIZE:SMB2Message.HEADER_SIZE+self.STRUCTURE_SIZE]) self.create_time = convertFILETIMEtoEpoch(create_time) self.lastaccess_time = convertFILETIMEtoEpoch(lastaccess_time) self.lastwrite_time = convertFILETIMEtoEpoch(lastwrite_time) self.change_time = convertFILETIMEtoEpoch(change_time)