added validation for the route command - thanks robin wood

git-svn-id: file:///home/svn/framework3/trunk@9992 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Jonathan Cran 2010-08-13 06:11:10 +00:00
parent f48afb37a7
commit fb6b993492
1 changed files with 25 additions and 0 deletions

View File

@ -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