Adding aczid's minimal exploit configurator

Note the syntax change, need to chase this down before pushing upstream
and make sure nobody's relying on that.... and grep says everything's
cool.

[Closes #295]

Squashed commit of the following:

commit 33b7438731ae5377c95d3d752d76eca73bad20ef
Merge: 6d3e6dd 7811b0a
Author: Tod Beardsley <todb@metasploit.com>
Date:   Fri May 18 16:55:49 2012 -0500

    Merge branch 'master' into HEAD

commit 6d3e6dd6e2
Author: Aram Verstegen <aram.verstegen@gmail.com>
Date:   Sat Apr 7 22:58:29 2012 +0200

    Automatically configure payloads for wmap-enabled exploits

commit 410008bab7
Author: Aram Verstegen <aram.verstegen@gmail.com>
Date:   Sat Apr 7 22:58:06 2012 +0200

    Exposed exploit_choose_payload as class method Exploit.choose_payload
This commit is contained in:
Aram Verstegen 2012-05-18 17:20:59 -05:00 committed by Tod Beardsley
parent 7811b0a3fd
commit d5d285ae96
2 changed files with 6 additions and 2 deletions

View File

@ -140,7 +140,7 @@ class Exploit
end
if not payload
payload = exploit_choose_payload(mod, target)
payload = Exploit.choose_payload(mod, target)
end
begin
@ -236,7 +236,7 @@ class Exploit
#
# Picks a reasonable payload and minimally configures it
#
def exploit_choose_payload(mod, target)
def self.choose_payload(mod, target)
# Choose either the real target or an invalid address
# This is used to determine the LHOST value

View File

@ -1679,6 +1679,10 @@ class Plugin::Wmap < Msf::Plugin
'Options' => opts
})
when 'exploit'
if not opts['PAYLOAD']
opts['PAYLOAD'] = WmapCommandDispatcher::Exploit.choose_payload(modinst, opts['TARGET'])
end
sess = Msf::Simple::Exploit.exploit_simple(modinst, {
'Payload' => opts['PAYLOAD'],
'Target' => opts['TARGET'],