Browse Source

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

rdb 8 years ago
parent
commit
5b2f3bc9bf
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/showutil/pefile.py

+ 3 - 0
direct/src/showutil/pefile.py

@@ -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: