mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
add -h and usage to get_local_subnets
git-svn-id: file:///home/svn/framework3/trunk@7259 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
b0a38b1cfa
commit
cadb1c9337
@ -4,6 +4,20 @@
|
||||
## Provided by Nicob <nicob [at] nicob.net>
|
||||
## Ripped from http://blog.metasploit.com/2006/10/meterpreter-scripts-and-msrt.html
|
||||
|
||||
@@exec_opts = Rex::Parser::Arguments.new(
|
||||
"-h" => [ false,"Help menu." ]
|
||||
)
|
||||
|
||||
@@exec_opts.parse(args) { |opt, idx, val|
|
||||
case opt
|
||||
when "-h"
|
||||
print_line("Get a list of local subnets based on the host's routes")
|
||||
print_line("USAGE: run get_local_subnets")
|
||||
puts @@exec_opts.usage
|
||||
raise "Usage"
|
||||
end
|
||||
}
|
||||
|
||||
client.net.config.each_route { |route|
|
||||
# Remove multicast and loopback interfaces
|
||||
next if route.subnet =~ /^(224\.|127\.)/
|
||||
|
Loading…
Reference in New Issue
Block a user