diff --git a/windows/com.py b/windows/com.py index b272a40..ba5cfda 100644 --- a/windows/com.py +++ b/windows/com.py @@ -16,9 +16,10 @@ from windows.generated_def.interfaces import generate_IID, IID # "-".join("{:02X}".format(c) for c in struct.unpack(" (wtf)") with target.allocated_memory(0x1000) as addr: - # target.write_memory(addr, dll_name + "\x00") target.write_memory(addr, (dll_name + "\x00").encode('utf-16le')) t = target.create_thread(load_libraryW, addr) t.wait() if not t.exit_code: raise InjectionFailedError(u"Injection of <{0}> failed".format(dll_name)) dbgprint("DLL Injected via LoadLibray", "DLLINJECT") + # Cannot return the full return value of load_libraryW in 64b target.. (exit_code is a DWORD) return t.exit_code # Hardcore mode # We don't have k32 or PEB->Ldr diff --git a/windows/pe_parse.py b/windows/pe_parse.py index 1fa98f3..ac8d62a 100644 --- a/windows/pe_parse.py +++ b/windows/pe_parse.py @@ -7,10 +7,6 @@ from windows.generated_def.winstructs import * from windows.utils import transform_ctypes_fields import windows.remotectypes as rctypes -# This must go to windefs -IMAGE_DIRECTORY_ENTRY_EXPORT = 0 -IMAGE_DIRECTORY_ENTRY_IMPORT = 1 - IMAGE_ORDINAL_FLAG32 = 0x80000000 IMAGE_ORDINAL_FLAG64 = 0x8000000000000000 diff --git a/windows/winobject/wmi.py b/windows/winobject/wmi.py index 1164c9e..4345217 100644 --- a/windows/winobject/wmi.py +++ b/windows/winobject/wmi.py @@ -133,7 +133,7 @@ class WmiRequester(object): class WmiManager(dict): """The main WMI class exposed, used to list and access differents WMI namespace, can be used as a dict to access - :cls:`WmiRequester` by namespace""" + :class:`WmiRequester` by namespace""" DEFAULT_NAMESPACE = "root\\cimv2" def __init__(self): self.wmi_requester_by_namespace = {}