Skip to content

Instantly share code, notes, and snippets.

Created March 9, 2018 23:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lekv/82d258803d634307fb3123dfc97601aa to your computer and use it in GitHub Desktop.
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