Files
metasploit-gs/scripts/meterpreter/get_local_subnets.rb
T
Ramon de C Valle f124597a56 Code cleanups
git-svn-id: file:///home/svn/framework3/trunk@5773 4d416f70-5f16-0410-b530-b9f4589650da
2008-10-19 21:03:39 +00:00

11 lines
423 B
Ruby

## 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\.)/
next if route.netmask == '255.255.255.255'
print_line("Local subnet: #{route.subnet}/#{route.netmask}")
}