rapid7/metasploit-framework — pull request #295 by aczid (2012-04-03 14:26:41+00:00)
Title: Automatically choosing exploit payload for WMAP-enabled exploit modules.

Hello MSF team,

This is my first MSF patch (and also the first time I've filed a pull request) so please bear with me.

I exposed the exploit_choose_payload method as class method in the class Msf::Ui::Console::CommandDispatcher::Exploit, and reused it in WMAP so that it can automatically configure payloads for WMAP-enabled exploit modules.
I hope this use of class methods is permissible in MSF, and thought this would be the easiest way to reuse the code.
BTW, I think this method can lose its second argument as it seems to only need/use the datastore in the module instance.
Please review my patch.

best regards,

Aram Verstegen