diff --git a/lib/msf/ui/console/module_command_dispatcher.rb b/lib/msf/ui/console/module_command_dispatcher.rb index 46a80ba9e3..908f13916b 100644 --- a/lib/msf/ui/console/module_command_dispatcher.rb +++ b/lib/msf/ui/console/module_command_dispatcher.rb @@ -122,6 +122,11 @@ module ModuleCommandDispatcher # Checks to see if a target is vulnerable. # def cmd_check(*args) + if args.first =~ /^\-h$/i + cmd_check_help + return + end + ip_range_arg = args.shift || mod.datastore['RHOSTS'] || framework.datastore['RHOSTS'] || '' opt = Msf::OptAddressRange.new('RHOSTS') @@ -162,6 +167,32 @@ module ModuleCommandDispatcher end end + def cmd_check_help + print_line('Usage: check [option] [IP Range]') + print_line + print_line('Options:') + print_line('-h You are looking at it.') + print_line + print_line('Examples:') + print_line('') + print_line('Normally, if a RHOST is already specified, you can just run check.') + print_line('But here are different ways to use the command:') + print_line + print_line('Against a single host:') + print_line('check 192.168.1.123') + print_line + print_line('Against a range of IPs:') + print_line('check 192.168.1.1-192.168.1.254') + print_line + print_line('Against a range of IPs loaded from a file:') + print_line('check file:///tmp/ip_list.txt') + print_line + print_line('Multi-threaded checks:') + print_line('1. set THREADS 10') + print_line('2. check') + print_line + end + def report_vuln(instance) framework.db.report_vuln( workspace: instance.workspace,