Pymem icon indicating copy to clipboard operation
Pymem copied to clipboard

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

Open nyaoouo opened this issue 5 years ago • 3 comments

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

nyaoouo avatar Mar 02 '21 06:03 nyaoouo

@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 ?

srounet avatar Mar 16 '21 09:03 srounet

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

poopypiper avatar Feb 21 '22 00:02 poopypiper

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

coolpancakes avatar Mar 13 '24 00:03 coolpancakes