diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..cdc4e74 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,9 @@ +V0.3: + + * NtStatusException is now a WindowsError + * Add shr/shl RM32(64)/Imm8 + * Small fix simple_x64 Imm8 encoding + * `execute_64bits_code_from_syswow` able to return ULONG64 + * utils.get_short_path / utils.get_long_path + * Object returned by `windows.native_exec.create_function` has an attribute `code_addr` with the address of the executable code + * add `windows.winproxy.is_implemented` Ex: windows.winproxy.is_implemented(windows.winproxy.QueryWorkingSetEx) \ No newline at end of file diff --git a/windows/winproxy.py b/windows/winproxy.py index 8c183e0..7fe6fbf 100644 --- a/windows/winproxy.py +++ b/windows/winproxy.py @@ -9,6 +9,13 @@ from windows.generated_def.ntstatus import NtStatusException from windows.dbgprint import dbgprint +def is_implemented(winfunc): + try: + winfunc.force_resolution() + except ExportNotFound: + return False + return True + class Kernel32Error(WindowsError): def __new__(cls, func_name): win_error = ctypes.WinError() @@ -83,7 +90,7 @@ def error_ntstatus(func_name, result, func, args): return args -class ExportNotFound(AttributeError): +class ExportNotFound(RuntimeError): def __init__(self, func_name, api_name): self.func_name = func_name self.api_name = api_name