-
Notifications
You must be signed in to change notification settings - Fork 101
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
set_memory_ex
:TypeError function takes exactly 3 arguments (4 given)
#257
Comments
I understand that it might be defined wrong way and it should be fixed. >>> help(libmem.write_memory_ex)
Help on function write_memory_ex in module libmem:
write_memory_ex(process: libmem.lm_process_t, dest: int, source: bytearray) -> bool
Write memory to a remote process So your solution would look like that: import libmem
import traceback
try:
proc = libmem.find_process("notepad++.exe")
print(f"Process found = {proc}")
# Allocate memory
new_me = libmem.alloc_memory_ex(proc, 1024, libmem.PROT_XRW)
print(f"Allocated memory in remote process address = {new_me:016x}")
# Try to write memory
try:
res = libmem.write_memory_ex(proc, new_me, bytearray(b"\x00" * 10))
print("Memory written successfully:", res)
except Exception as e:
print("An error occurred while writing memory: ")
traceback.print_exc()
except Exception as e:
print("An error occurred: ")
traceback.print_exc() |
OK, I have completed the code using the write_memory_ex function correctly. Thank you very much for your patient answer, very detailed, thank you! |
I'll reopen since I'll look into this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Language:
python 3.11
Code:
I'm not sure why this error occurs. The
set_memory_ex
function should have passed in 4 parameters.The text was updated successfully, but these errors were encountered: