-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api hooking error: hook ExtTextOutW in gdi32.dll and return unreadable codes #22
Comments
BTW:
|
Hi! The problem here is in using the ctypes pointer types. Ctypes assumes all pointer types point to data within your own process memory (a reasonable assumption!) which is not true in this case - your string is in another process, so you cannot read it directly with ctypes. You need to use WinAppDbg to fetch the string from the debugee's memory. You can define your hook to use void* types for all pointers so ctypes will just give you the address but not try to access the memory. Then just pass the address to process.read_string() to get the actual string. http://winappdbg.sourceforge.net/doc/v1.5/reference/winappdbg.process.Process-class.html#read_string Cheers! |
Hi,Mario Vilas:
Can you help me to figure it out where I was wrong! Thanks!
|
I am using winappdbg to hook ExtTextOutW function in gdi32.dll, the code is blow:
There are two type errors:
The first likes this :
the second likes this:
Is there something wrong?
The text was updated successfully, but these errors were encountered: