2010-04-02 00:34:17 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
2010-06-15 07:14:29 +00:00
|
|
|
# This script lists all modules with their targets
|
2010-04-02 00:34:17 +00:00
|
|
|
#
|
2010-05-03 17:13:09 +00:00
|
|
|
# $Revision$
|
|
|
|
#
|
2010-04-02 00:34:17 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|