From 2dc4319bba93f4b0d6943e883181b015bbb110bc Mon Sep 17 00:00:00 2001 From: Marc Bevand Date: Tue, 20 Dec 2011 17:51:47 -0600 Subject: [PATCH] Fix Nexpose plugin bug to allow pass the hash to work --- plugins/nexpose.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/nexpose.rb b/plugins/nexpose.rb index 92258c6b1d..e6b132a5bc 100644 --- a/plugins/nexpose.rb +++ b/plugins/nexpose.rb @@ -305,7 +305,7 @@ class Plugin::Nexpose < Msf::Plugin opts = Rex::Parser::Arguments.new( "-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)"], - "-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)"], "-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)"], @@ -343,7 +343,7 @@ class Plugin::Nexpose < Msf::Plugin when "-s" opt_savexml = val when "-c" - if (val =~ /^([^:]+):([^:]+):([^:]+)/) + if (val =~ /^([^:]+):([^:]+):(.+)/) type, user, pass = [ $1, $2, $3 ] newcreds = Nexpose::AdminCredentials.new newcreds.setCredentials(type, nil, nil, user, pass, nil)