From 3bb17dad72ea0eface3a99ce222cb0df02270903 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Sat, 25 Jan 2014 20:10:22 -0600 Subject: [PATCH] Check argument --- lib/msf/ui/console/module_command_dispatcher.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/msf/ui/console/module_command_dispatcher.rb b/lib/msf/ui/console/module_command_dispatcher.rb index 8fcab6b909..10573cba18 100644 --- a/lib/msf/ui/console/module_command_dispatcher.rb +++ b/lib/msf/ui/console/module_command_dispatcher.rb @@ -109,7 +109,10 @@ module ModuleCommandDispatcher hosts = Rex::Socket::RangeWalker.new(ip_range_arg) begin - if hosts.ranges.blank? + if hosts.ranges.blank? and mod.datastore['RHOST'].blank? + print_error("No host specified") + return + elsif hosts.ranges.blank? # Check a single rhost check_simple else