rapid7 / meterpreter

THIS REPO IS OBSOLETE. USE https://github.com/rapid7/metasploit-payloads INSTEAD
Other
326 stars 144 forks source link

Packet dispatch refactor #152

Closed OJ closed 9 years ago

OJ commented 9 years ago

Up until now, all of the transport-specific packet transmit and receive functions has been part of core.c, which was included in the common.lib library. This didn't make any sense. The code never belonged there and the common code had nasty #ifdef/#else/endif blocks all over the shop.

This PR moves the transmit and receive code over into metsrv where it belongs. The transport-specific mechanisms are now sitting alongside all the other transport-specific things, which removes the need for the packet_receive function pointer as well.

This is more of a code tidy than a feature enhancement, but I think it's important.

Sample Run and Verification

Everything should run like it does right now, the code should just make more sense.

Note: This PR relies on the connection resiliency work done in #151, so that needs to be landed first. Ideally this will be landed around the same time and can be incorporated into the next set of meterpreter binaries.

metasploit-public-bot commented 9 years ago

Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/187/ Test PASSED.

OJ commented 9 years ago

That was quick! Thanks Brent.

bcook-r7 commented 9 years ago

I tested them merged together in the first place. Better write some JCL, because I'm in batch mode.