Skip to content
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

inject_python_interpreter() get Err code 87(ERROR_INVALID_PARAMETER) when start_thread #48

Open
nyaoouo opened this issue Mar 2, 2021 · 3 comments

Comments

@nyaoouo
Copy link

nyaoouo commented Mar 2, 2021

i am trying to run the demo in https://pymem.readthedocs.io/en/latest/tutorials/inject_python_interpreter.html but it seems not run successfully by traceback:

2021-03-02 14:08:35,388 - pymem - DEBUG - Process 19392 is being debugged
2021-03-02 14:08:35,399 - pymem - WARNING - Got an error in start thread, code: 87
2021-03-02 14:08:35,913 - pymem - DEBUG - New thread_id: 0x00000284
2021-03-02 14:08:35,913 - pymem - DEBUG - Py_InitializeEx loc: 0x7ff84f148678
2021-03-02 14:08:35,913 - pymem - DEBUG - PyRun_SimpleString loc: 0x7ff84f256f60
2021-03-02 14:08:35,913 - pymem - DEBUG - shellcode_addr loc: 0x206981c0000
2021-03-02 14:08:35,913 - pymem - WARNING - Got an error in start thread, code: 5
Traceback (most recent call last):
File "D:/scripts/Test3.py", line 17, in
pm.inject_python_shellcode(shellcode)
File "D:\scripts\venv\lib\site-packages\pymem_init_.py", line 147, in inject_python_shellcode
self.start_thread(self.py_run_simple_string, shellcode_addr)
File "D:\scripts\venv\lib\site-packages\pymem_init_.py", line 180, in start_thread
pymem.logger.debug('New thread_id: 0x%08x' % thread_h)
TypeError: %x format: an integer is required, not NoneType

@srounet
Copy link
Owner

srounet commented Mar 16, 2021

@nyaoouo did you managed to have it working ?
If it's not the case could you try with pymem==1.8 and report any success // issue ?

@poopypiper
Copy link

I am having the exact same issue with the same code. I tried the above solution; it did not work. Please help.

@StarrFox StarrFox mentioned this issue Nov 28, 2023
@datarec
Copy link

datarec commented Mar 13, 2024

Hi I'm having the same issue. I keep getting: %x format: an integer is required, not NoneType
I also used the tutorial code on Pymems read the docs website to ensure i was writing it correctly, also tried restarting my laptop to ensure that there were no conflicts and yeah it sucks.

hope you guys can help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants