added route get
git-svn-id: file:///home/svn/incoming/trunk@3018 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
d0a66d9ec1
commit
576296fe61
|
@ -177,7 +177,7 @@ class Core
|
||||||
def cmd_route(*args)
|
def cmd_route(*args)
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
print(
|
print(
|
||||||
"Usage: route [add/remove/flush/print] subnet netmask [local/sid]\n\n" +
|
"Usage: route [add/remove/get/flush/print] subnet netmask [local/sid]\n\n" +
|
||||||
"Route traffic destined to a given subnet through a supplied session.\n")
|
"Route traffic destined to a given subnet through a supplied session.\n")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -229,6 +229,20 @@ class Core
|
||||||
args[0],
|
args[0],
|
||||||
args[1],
|
args[1],
|
||||||
gw)
|
gw)
|
||||||
|
when "get"
|
||||||
|
if (args.length == 0)
|
||||||
|
print_error("You must supply an IP address.")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
comm = Rex::Socket::SwitchBoard.best_comm(args[0])
|
||||||
|
|
||||||
|
if ((comm) and
|
||||||
|
(comm.kind_of?(Msf::Session)))
|
||||||
|
print_line("#{args[0]} routes through: Session #{comm.sid}")
|
||||||
|
else
|
||||||
|
print_line("#{args[0]} routes through: Local")
|
||||||
|
end
|
||||||
when "flush"
|
when "flush"
|
||||||
Rex::Socket::SwitchBoard.flush_routes
|
Rex::Socket::SwitchBoard.flush_routes
|
||||||
when "print"
|
when "print"
|
||||||
|
|
Loading…
Reference in New Issue