make session query/shares help menu more explicit
This commit is contained in:
parent
923f4c9f7b
commit
2c9ade955e
|
@ -134,22 +134,33 @@ module Rex
|
|||
end
|
||||
|
||||
def cmd_query(*args)
|
||||
@@query_opts.parse(args) do |opt, idx, val|
|
||||
show_help = false
|
||||
call_interactive = false
|
||||
|
||||
@@query_opts.parse(args) do |opt, _idx, val|
|
||||
case opt
|
||||
when nil
|
||||
show_help = true if val == 'help'
|
||||
break
|
||||
when '-h', '--help'
|
||||
cmd_query_help
|
||||
return
|
||||
show_help = true
|
||||
break
|
||||
when '-i', '--interact'
|
||||
cmd_query_interactive
|
||||
return
|
||||
call_interactive = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if args.empty?
|
||||
if args.empty? || show_help
|
||||
cmd_query_help
|
||||
return
|
||||
end
|
||||
|
||||
if call_interactive
|
||||
cmd_query_interactive
|
||||
return
|
||||
end
|
||||
|
||||
result = run_query(args.join(' '))
|
||||
case result[:status]
|
||||
when :success
|
||||
|
|
|
@ -663,7 +663,7 @@ module DispatcherShell
|
|||
str << dispatcher.help_to_s(opts.merge({ command_width: [max_command_length, 12].max }))
|
||||
}
|
||||
|
||||
return str
|
||||
return str << "For more info on a specific command, use %grn<command> -h%clr or %grnhelp <command>%clr.\n\n"
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue