Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Location=mp.LocationDescriptor(DataSize=0,
Rva=mp.Rva(rva=0)
)
)
streamdir_size = len(empty_stream)
for i in xrange(self.minidumpHDR.NumberOfStreams):
stream_offset = base_offset + i * streamdir_size
stream = mp.StreamDirectory.unpack(self._content, stream_offset, self)
self.streams.append(stream)
# Launch specific action depending on the stream
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if stream.StreamType == mp.streamType.ModuleListStream:
self.modulelist = mp.ModuleList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryListStream:
self.memorylist = mp.MemoryList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.Memory64ListStream:
self.memory64list = mp.Memory64List.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryInfoListStream:
self.memoryinfolist = mp.MemoryInfoList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.SystemInfoStream:
self.systeminfo = mp.SystemInfo.unpack(self._content, offset, self)
# Some streams need the SystemInfo stream to work
for stream in self.streams:
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if (self.systeminfo is not None and
stream.StreamType == mp.streamType.ThreadListStream):
self.threads = mp.ThreadList.unpack(self._content, offset, self)
self.modulelist = mp.ModuleList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryListStream:
self.memorylist = mp.MemoryList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.Memory64ListStream:
self.memory64list = mp.Memory64List.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryInfoListStream:
self.memoryinfolist = mp.MemoryInfoList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.SystemInfoStream:
self.systeminfo = mp.SystemInfo.unpack(self._content, offset, self)
# Some streams need the SystemInfo stream to work
for stream in self.streams:
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if (self.systeminfo is not None and
stream.StreamType == mp.streamType.ThreadListStream):
self.threads = mp.ThreadList.unpack(self._content, offset, self)
)
)
streamdir_size = len(empty_stream)
for i in xrange(self.minidumpHDR.NumberOfStreams):
stream_offset = base_offset + i * streamdir_size
stream = mp.StreamDirectory.unpack(self._content, stream_offset, self)
self.streams.append(stream)
# Launch specific action depending on the stream
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if stream.StreamType == mp.streamType.ModuleListStream:
self.modulelist = mp.ModuleList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryListStream:
self.memorylist = mp.MemoryList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.Memory64ListStream:
self.memory64list = mp.Memory64List.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryInfoListStream:
self.memoryinfolist = mp.MemoryInfoList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.SystemInfoStream:
self.systeminfo = mp.SystemInfo.unpack(self._content, offset, self)
# Some streams need the SystemInfo stream to work
for stream in self.streams:
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if (self.systeminfo is not None and
stream.StreamType == mp.streamType.ThreadListStream):
self.threads = mp.ThreadList.unpack(self._content, offset, self)
stream_offset = base_offset + i * streamdir_size
stream = mp.StreamDirectory.unpack(self._content, stream_offset, self)
self.streams.append(stream)
# Launch specific action depending on the stream
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if stream.StreamType == mp.streamType.ModuleListStream:
self.modulelist = mp.ModuleList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryListStream:
self.memorylist = mp.MemoryList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.Memory64ListStream:
self.memory64list = mp.Memory64List.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryInfoListStream:
self.memoryinfolist = mp.MemoryInfoList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.SystemInfoStream:
self.systeminfo = mp.SystemInfo.unpack(self._content, offset, self)
# Some streams need the SystemInfo stream to work
for stream in self.streams:
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if (self.systeminfo is not None and
stream.StreamType == mp.streamType.ThreadListStream):
self.threads = mp.ThreadList.unpack(self._content, offset, self)
streamdir_size = len(empty_stream)
for i in xrange(self.minidumpHDR.NumberOfStreams):
stream_offset = base_offset + i * streamdir_size
stream = mp.StreamDirectory.unpack(self._content, stream_offset, self)
self.streams.append(stream)
# Launch specific action depending on the stream
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if stream.StreamType == mp.streamType.ModuleListStream:
self.modulelist = mp.ModuleList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryListStream:
self.memorylist = mp.MemoryList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.Memory64ListStream:
self.memory64list = mp.Memory64List.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryInfoListStream:
self.memoryinfolist = mp.MemoryInfoList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.SystemInfoStream:
self.systeminfo = mp.SystemInfo.unpack(self._content, offset, self)
# Some streams need the SystemInfo stream to work
for stream in self.streams:
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if (self.systeminfo is not None and
stream.StreamType == mp.streamType.ThreadListStream):
self.threads = mp.ThreadList.unpack(self._content, offset, self)
base_offset = self.minidumpHDR.StreamDirectoryRva.rva
empty_stream = mp.StreamDirectory(StreamType=0,
Location=mp.LocationDescriptor(DataSize=0,
Rva=mp.Rva(rva=0)
)
)
streamdir_size = len(empty_stream)
for i in xrange(self.minidumpHDR.NumberOfStreams):
stream_offset = base_offset + i * streamdir_size
stream = mp.StreamDirectory.unpack(self._content, stream_offset, self)
self.streams.append(stream)
# Launch specific action depending on the stream
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if stream.StreamType == mp.streamType.ModuleListStream:
self.modulelist = mp.ModuleList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryListStream:
self.memorylist = mp.MemoryList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.Memory64ListStream:
self.memory64list = mp.Memory64List.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.MemoryInfoListStream:
self.memoryinfolist = mp.MemoryInfoList.unpack(self._content, offset, self)
elif stream.StreamType == mp.streamType.SystemInfoStream:
self.systeminfo = mp.SystemInfo.unpack(self._content, offset, self)
# Some streams need the SystemInfo stream to work
for stream in self.streams:
datasize = stream.Location.DataSize
offset = stream.Location.Rva.rva
if (self.systeminfo is not None and
stream.StreamType == mp.streamType.ThreadListStream):