Merge pull request #72 from mbevand-r7/nexpose-pth-bugfix

Fix Nexpose plugin bug to allow pass the hash to work
This commit is contained in:
HD Moore 2011-12-20 21:48:15 -08:00
commit d27e05e2d2
1 changed files with 2 additions and 2 deletions

View File

@ -305,7 +305,7 @@ class Plugin::Nexpose < Msf::Plugin
opts = Rex::Parser::Arguments.new( opts = Rex::Parser::Arguments.new(
"-h" => [ false, "This help menu"], "-h" => [ false, "This help menu"],
"-t" => [ true, "The scan template to use (default:pentest-audit options:full-audit,exhaustive-audit,discovery,aggressive-discovery,dos-audit)"], "-t" => [ true, "The scan template to use (default:pentest-audit options:full-audit,exhaustive-audit,discovery,aggressive-discovery,dos-audit)"],
"-c" => [ true, "Specify credentials to use against these targets (format is type:user:pass[@host[:port]]"], "-c" => [ true, "Specify credentials to use against these targets (format is type:user:pass"],
"-n" => [ true, "The maximum number of IPs to scan at a time (default is 32)"], "-n" => [ true, "The maximum number of IPs to scan at a time (default is 32)"],
"-s" => [ true, "The directory to store the raw XML files from the Nexpose instance (optional)"], "-s" => [ true, "The directory to store the raw XML files from the Nexpose instance (optional)"],
"-P" => [ false, "Leave the scan data on the server when it completes (this counts against the maximum licensed IPs)"], "-P" => [ false, "Leave the scan data on the server when it completes (this counts against the maximum licensed IPs)"],
@ -343,7 +343,7 @@ class Plugin::Nexpose < Msf::Plugin
when "-s" when "-s"
opt_savexml = val opt_savexml = val
when "-c" when "-c"
if (val =~ /^([^:]+):([^:]+):([^:]+)/) if (val =~ /^([^:]+):([^:]+):(.+)/)
type, user, pass = [ $1, $2, $3 ] type, user, pass = [ $1, $2, $3 ]
newcreds = Nexpose::AdminCredentials.new newcreds = Nexpose::AdminCredentials.new
newcreds.setCredentials(type, nil, nil, user, pass, nil) newcreds.setCredentials(type, nil, nil, user, pass, nil)