allow 'route del' as a synonym for 'route remove' since i can never remember to do it right; fix a bug with improper usage for cmd_route; add Prompt* to the list of known global options

git-svn-id: file:///home/svn/framework3/trunk@14063 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
James Lee 2011-10-25 16:31:35 +00:00
parent 2b46420b36
commit d218852f0a
1 changed files with 6 additions and 3 deletions

View File

@ -960,7 +960,7 @@ class Core
arg = args.shift
case arg
when "add", "remove"
when "add", "remove", "del"
if (args.length < 3)
print_error("Missing arguments to route #{arg}.")
return false
@ -1000,7 +1000,7 @@ class Core
return false
end
if arg == "remove"
if arg == "remove" or arg == "del"
worked = Rex::Socket::SwitchBoard.remove_route(args[0], args[1], gw)
if worked
print_status("Route removed")
@ -1066,7 +1066,7 @@ class Core
print(tbl.to_s)
else
print(usage)
cmd_route_help
end
end
@ -2428,6 +2428,9 @@ protected
[ 'MinimumRank', framework.datastore['MinimumRank'] || '', 'The minimum rank of exploits that will run without explicit confirmation' ],
[ 'SessionLogging', framework.datastore['SessionLogging'] || '', 'Log all input and output for sessions' ],
[ 'TimestampOutput', framework.datastore['TimestampOutput'] || '', 'Prefix all console output with a timestamp' ],
[ 'Prompt', framework.datastore['Prompt'] || '', 'The prompt string, defaults to "%undmsf%clr"' ],
[ 'PromptChar', framework.datastore['PromptChar'] || '', 'The prompt character, defaults to ">"' ],
[ 'PromptTimeFormat', framework.datastore['PromptTimeFormat'] || '', 'A format for timestamp escapes in the prompt, see ruby\'s strftime docs' ],
].each { |r| tbl << r }
print(tbl.to_s)