commit
3dd7fdfd95
|
@ -32,7 +32,7 @@ _arguments \
|
|||
{-n,--no-database}"[Disable database support]" \
|
||||
{-o,--output}"[Output to the specified file]:output file" \
|
||||
{-p,--plugin}"[Load a plugin on startup]:plugin file:_files" \
|
||||
{-q,--quiet}"[Do not print the banner on start up]" \
|
||||
{-q,--quiet}"[Do not print the banner on startup]" \
|
||||
{-r,--resource}"[Execute the specified resource file (- for stdin)]:resource file:_files" \
|
||||
{-v,--version}"[Show version]" \
|
||||
{-x,--execute-command}"[Execute the specified string as console commands]:commands" \
|
||||
|
|
|
@ -56,7 +56,7 @@ class Metasploit::Framework::ParsedOptions::Console < Metasploit::Framework::Par
|
|||
options.console.plugins << plugin
|
||||
end
|
||||
|
||||
option_parser.on('-q', '--quiet', 'Do not print the banner on start up') do
|
||||
option_parser.on('-q', '--quiet', 'Do not print the banner on startup') do
|
||||
options.console.quiet = true
|
||||
end
|
||||
|
||||
|
|
8
msfd
8
msfd
|
@ -34,9 +34,13 @@ arguments = Rex::Parser::Arguments.new(
|
|||
"-f" => [ false, "Run the daemon in the foreground" ],
|
||||
"-A" => [ true, "Specify list of hosts allowed to connect" ],
|
||||
"-D" => [ true, "Specify list of hosts not allowed to connect" ],
|
||||
"-q" => [ false, "Do not print the banner on startup" ],
|
||||
"-h" => [ false, "Help banner" ])
|
||||
|
||||
opts = { 'RunInForeground' => true }
|
||||
opts = {
|
||||
'RunInForeground' => true,
|
||||
'DisableBanner' => false
|
||||
}
|
||||
foreground = false
|
||||
|
||||
# Parse command line arguments.
|
||||
|
@ -68,6 +72,8 @@ arguments.parse(ARGV) { |opt, idx, val|
|
|||
$stderr.puts "Bad argument for -D: #{$!}"
|
||||
exit
|
||||
end
|
||||
when "-q"
|
||||
opts['DisableBanner'] = true
|
||||
when "-h"
|
||||
print(
|
||||
"\nUsage: #{File.basename(__FILE__)} <options>\n" +
|
||||
|
|
|
@ -127,7 +127,8 @@ class Plugin::Msfd < Msf::Plugin
|
|||
'Framework' => framework,
|
||||
'LocalInput' => Rex::Ui::Text::Input::Socket.new(cli),
|
||||
'LocalOutput' => Rex::Ui::Text::Output::Socket.new(cli),
|
||||
'AllowCommandPassthru' => false).run
|
||||
'AllowCommandPassthru' => false,
|
||||
'DisableBanner' => opts['DisableBanner'] ? true : false).run
|
||||
rescue
|
||||
elog("Msfd: Client error: #{$!}\n\n#{$@.join("\n")}", 'core')
|
||||
ensure
|
||||
|
|
Loading…
Reference in New Issue