diff options
| -rw-r--r-- | miasm/tools/pe_helper.py | 2 | ||||
| -rw-r--r-- | miasm/tools/win_api.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/miasm/tools/pe_helper.py b/miasm/tools/pe_helper.py index 4f5373cf..df98c41a 100644 --- a/miasm/tools/pe_helper.py +++ b/miasm/tools/pe_helper.py @@ -511,7 +511,7 @@ class libimp: all_ads = self.lib_imp2dstad[ad].values() all_ads = reduce(lambda x,y:x+list(y), all_ads, []) all_ads = [x for x in all_ads if filter(x)] - print [hex(x) for x in all_ads] + #print [hex(x) for x in all_ads] all_ads.sort() #first, drop None if not all_ads: diff --git a/miasm/tools/win_api.py b/miasm/tools/win_api.py index cb562503..13944051 100644 --- a/miasm/tools/win_api.py +++ b/miasm/tools/win_api.py @@ -1016,8 +1016,13 @@ def kernel32_GetProcAddress(): fname = fname else: fname = get_str_ansi(fname, 0x100) + if not fname: + fname = None print repr(fname) - + if fname != None: + ad = winobjs.runtime_dll.lib_get_add_func(libbase, fname) + else: + ad = 0 ad = winobjs.runtime_dll.lib_get_add_func(libbase, fname) regs = vm_get_gpreg() |