srounet / Pymem

A python library for windows, providing the needed functions to start working on your own with memory editing.
MIT License
303 stars 45 forks source link

call remote assembly #84

Closed NyshMy closed 4 months ago

NyshMy commented 2 years ago

Can Python create a blank address and call remote assembly? I tried to use the createremotethread resumethread WaitForSingleObject functions and found that it took 10 calls to succeed once or twice. I don't know what the problem is. This is a very important assembly function

LoseNine commented 2 years ago

In fact, python remote thread injection is very simple, but generally speaking, many games require important call assembly to run in the main thread of the game. If your function is very important, it is necessary for hook game main thread to call in it.

NyshMy commented 2 years ago

其实python远程线程注入很简单,但是一般来说很多游戏都需要重要的调用程序集才能运行在游戏的主线程中。如果你的函数很重要,就需要hook游戏主线程调用。

Is there any relevant code? I want to see it

StarrFox commented 4 months ago

you can use start_thread for this: https://pymem.readthedocs.io/en/latest/api.html?highlight=start_thread#pymem.Pymem.start_thread