Refactored jboss mixin and modules

Moved VERB option to the mixin. Replaced "if datastore['VERBOSE']"
by vprint_status().
bug/bundler_fix
us3r777 2014-07-22 23:08:42 +02:00
parent ae2cd63391
commit b526fc50f8
5 changed files with 10 additions and 12 deletions

View File

@ -15,7 +15,8 @@ module Msf
super
register_options(
[
OptString.new('TARGETURI', [ true, 'The URI path of the JMX console', '/jmx-console'])
OptString.new('TARGETURI', [ true, 'The URI path of the JMX console', '/jmx-console']),
OptEnum.new('VERB', [true, 'HTTP Method to use (for CVE-2010-0738)', 'POST', ['GET', 'POST', 'HEAD']])
], self.class)
end
end

View File

@ -30,13 +30,13 @@ module Msf::HTTP::JBoss::Base
elsif (res.code < 200 or res.code >= 300)
msg = "http request failed to #{uri} [#{res.code}]"
elsif (res.code == 200)
print_status("Successfully called '#{uri}'") if datastore['VERBOSE']
vprint_status("Successfully called '#{uri}'")
return res
end
if (attempt < num_attempts - 1)
msg << ", retrying in 5 seconds..."
print_status(msg) if datastore['VERBOSE']
vprint_status(msg)
select(nil, nil, nil, 5)
else
print_error(msg)

View File

@ -38,12 +38,10 @@ class Metasploit3 < Msf::Auxiliary
[
Opt::RPORT(8080),
OptString.new('APPBASE', [ true, 'Application base name']),
OptString.new('STAGERNAME', [ false, 'Only used if VERB is not POST (default: "stager"', 'stager']),
OptString.new('PACKAGE', [ true, 'The package containing the BSHDeployer service', 'auto' ]),
OptString.new('STAGERNAME', [ false, 'Only used if VERB is not POST (default: "stager")', 'stager']),
OptString.new('WARFILE', [ true, 'The WAR file to deploy']),
OptBool.new('DEPLOY', [ true, 'Deploy: true. Undeploy: false', true]),
OptString.new('PACKAGE', [ true, 'The package containing the BSHDeployer service', 'auto' ]),
OptEnum.new('VERB', [true, 'HTTP Method to use (for CVE-2010-0738)', 'POST', ['GET', 'POST', 'HEAD']])
OptBool.new('DEPLOY', [ true, 'Deploy: true. Undeploy: false', true]),
], self.class)
end

View File

@ -85,7 +85,6 @@ class Metasploit3 < Msf::Exploit::Remote
OptString.new('JSP', [ false, 'JSP name to use without .jsp extension (default: random)', nil ]),
OptString.new('APPBASE', [ false, 'Application base name, (default: random)', nil ]),
OptString.new('PACKAGE', [ true, 'The package containing the BSHDeployer service', 'auto' ]),
OptEnum.new('VERB', [true, 'HTTP Method to use (for CVE-2010-0738)', 'POST', ['GET', 'POST', 'HEAD']])
], self.class)
end