pe-parse/python/test.py
Wesley Shields ed77443f31 Implement timedatestamp member.
While here, DECREF the string used in init. Also, make a note that I really
want to use a bytearray instead of a list for get_bytes().
2013-11-29 14:11:01 -05:00

17 lines
363 B
Python
Executable File

#!/usr/bin/env python
import sys
import time
import pepy
import binascii
from pprint import pprint
p = pepy.parse(sys.argv[1])
ep = p.get_entry_point()
byts = p.get_bytes(ep, 8)
print "Timedatestamp: %s" % time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(p.timedatestamp))
print "Bytes at 0x%x: %s" % (ep, byts)
for sect in p.get_sections():
pprint(sect)