Skip to content

Instantly share code, notes, and snippets.

@lekv
Created March 9, 2018 23:04
Show Gist options
  • Save lekv/82d258803d634307fb3123dfc97601aa to your computer and use it in GitHub Desktop.
Save lekv/82d258803d634307fb3123dfc97601aa to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import sys
from collections import namedtuple
from datetime import datetime
from struct import Struct
MDRawHeader = namedtuple("MDRawHeader", "signature version stream_count \
stream_directory_rva checksum time_date_stamp flags")
minidump = sys.argv[1]
s = Struct("IIIiIIQ")
data = open(minidump, 'rb').read(s.size)
header = MDRawHeader(*s.unpack_from(data))
created = datetime.utcfromtimestamp(header.time_date_stamp)
print "Minidump was created at: %s UTC (%s)" % (created, header.time_date_stamp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment