diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index 27c58e4533..257eed7785 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -783,6 +783,18 @@ class Core return false end + # Satisfy check to see that formatting is correct + unless Rex::Socket::RangeWalker.new(args[0]).length == 1 + print_error "Invalid IP Address" + return false + end + + unless Rex::Socket::RangeWalker.new(args[1]).length == 1 + print_error "Invalid Subnet mask" + return false + end + + gw = nil # Satisfy case problems @@ -816,6 +828,19 @@ class Core return false end + + # Satisfy check to see that formatting is correct + unless Rex::Socket::RangeWalker.new(args[0]).length == 1 + print_error "Invalid IP Address" + return false + end + + unless Rex::Socket::RangeWalker.new(args[1]).length == 1 + print_error "Invalid Subnet mask" + return false + end + + gw = nil # Satisfy case problems