From 36c1eb647feccb5973d4284e2e2b0cf3ea1955d3 Mon Sep 17 00:00:00 2001 From: hakril Date: Fri, 31 Jan 2025 17:13:33 +0100 Subject: [PATCH] Fix WinThread.teb_syswow --- tests/test_process.py | 2 +- windows/winobject/process.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_process.py b/tests/test_process.py index c8631e2..13b4e89 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -511,7 +511,7 @@ class TestProcessWithCheckGarbage(object): assert teb_syswow.NtTib.Self.value == teb_syswow._base_addr assert teb_syswow.ProcessEnvironmentBlock.value == teb_syswow.peb._base_addr # Check type of teb.peb is the correct subclass (with modules & co) - assert teb.peb.modules + assert teb_syswow.peb.modules def test_thread_owner_from_tid(self, proc32_64): thread = proc32_64.threads[0] diff --git a/windows/winobject/process.py b/windows/winobject/process.py index ac52c44..6bb6ab9 100644 --- a/windows/winobject/process.py +++ b/windows/winobject/process.py @@ -916,7 +916,7 @@ class WinThread(Thread): @property def teb_syswow(self): - return RemoteTEB64.from_address(self.teb_syswow_base) + return RemoteTEB64(self.teb_syswow_base, self.owner) def exit(self, code=0):