Can you inject code/an exe into a process with python?

user785255 picture user785255 · Jun 6, 2011 · Viewed 7.2k times · Source

I've seen a few sites talking about injecting DLL's (such as http://www.codeproject.com/KB/DLL/DLL_Injection_tutorial.aspx), but I'm struggling with how to get an EXE to work. any help/tips would be appreciated.

The best way I know how to explain it is "RunPE" where you execute an exe in the memory. Does that help at all?

Answer

fractalcat picture fractalcat · Sep 19, 2011

If you're asking how to inject code into a running Python process, what you want is https://fedorahosted.org/pyrasite/ .