deploy-ng: fix issue locating blobinfo symbol on Py3+Windows

This commit is contained in:
rdb 2017-12-21 14:10:34 +01:00
parent a512c44366
commit 5b2f3bc9bf

View File

@ -601,6 +601,9 @@ class PEFile(object):
def get_export_address(self, symbol_name):
""" Finds the virtual address for a named export symbol. """
if isinstance(symbol_name, bytes):
symbol_name = symbol_name.decode('ascii')
start = self.exp_rva.addr
expdir = expdirtab(*unpack('<IIHHIIIIIII', self.vmem[start:start+40]))
if expdir.nnames == 0 or expdir.ordinals == 0 or expdir.names == 0: