mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
213b188fdb
git-svn-id: file:///home/svn/framework3/trunk@10652 4d416f70-5f16-0410-b530-b9f4589650da
38 lines
723 B
Ruby
Executable File
38 lines
723 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
#
|
|
# $Id$
|
|
#
|
|
# This script lists all modules with their targets
|
|
#
|
|
# $Revision$
|
|
#
|
|
|
|
msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
|
|
$:.unshift(File.join(File.dirname(msfbase), '..', 'lib'))
|
|
|
|
require 'rex'
|
|
require 'msf/ui'
|
|
require 'msf/base'
|
|
|
|
Indent = ' '
|
|
|
|
# Initialize the simplified framework instance.
|
|
$framework = Msf::Simple::Framework.create('DisableDatabase' => true)
|
|
|
|
tbl = Rex::Ui::Text::Table.new(
|
|
'Header' => 'Module Targets',
|
|
'Indent' => Indent.length,
|
|
'Columns' => [ 'Module name','Target' ]
|
|
)
|
|
|
|
all_modules = $framework.exploits
|
|
|
|
all_modules.each_module { |name, mod|
|
|
x = mod.new
|
|
x.targets.each do |targ|
|
|
tbl << [ x.fullname, targ.name ]
|
|
end
|
|
}
|
|
|
|
puts tbl.to_s
|