rapid7/metasploit-framework — pull request #2750 by zeroSteiner (2013-12-10 17:05:37+00:00)
Title: Honor the PID argument in the Process mixin execute_shellcode function.

This PR fixes the execute_shellcode function to honor the pid argument. Without this change, the execute_shellcode function will start a local thread at an invalid address when trying to inject shellcode into another process.

This PR also changes the lpStartAddress type in the railgun definition file for the CreateRemoteThread function. The CreateThread lpStartAddress type is LPVOID, and the changing the CreateRemoteThread lpStartAddress type to the same allows the function to be called specifying an address instead of a string. A quick grep seems to imply that CreateRemoteThread is not called through railgun.