2007-05-22 21:08:47 +00:00
|
|
|
|
|
|
|
## Meterpreter script that display local subnets
|
|
|
|
## Provided by Nicob <nicob [at] nicob.net>
|
|
|
|
## Ripped from http://blog.metasploit.com/2006/10/meterpreter-scripts-and-msrt.html
|
|
|
|
|
|
|
|
client.net.config.each_route { |route|
|
|
|
|
# Remove multicast and loopback interfaces
|
|
|
|
next if route.subnet =~ /^(224\.|127\.)/
|
2008-11-14 17:12:38 +00:00
|
|
|
next if route.subnet == '0.0.0.0'
|
2007-05-22 21:08:47 +00:00
|
|
|
next if route.netmask == '255.255.255.255'
|
|
|
|
print_line("Local subnet: #{route.subnet}/#{route.netmask}")
|
2008-11-14 17:12:38 +00:00
|
|
|
}
|