2007-10-02 16:09:13 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
#
|
2010-05-03 17:13:09 +00:00
|
|
|
# $Id$
|
|
|
|
#
|
2007-10-02 16:09:13 +00:00
|
|
|
# This script lists each module by its licensing terms
|
|
|
|
#
|
2010-05-03 17:13:09 +00:00
|
|
|
# $Revision$
|
|
|
|
#
|
2007-10-02 16:09:13 +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'
|
|
|
|
|
2009-01-10 22:26:58 +00:00
|
|
|
Indent = ' '
|
2007-10-02 16:09:13 +00:00
|
|
|
|
|
|
|
# Initialize the simplified framework instance.
|
|
|
|
$framework = Msf::Simple::Framework.create
|
|
|
|
|
|
|
|
tbl = Rex::Ui::Text::Table.new(
|
|
|
|
'Header' => 'Module References',
|
2009-01-10 22:26:58 +00:00
|
|
|
'Indent' => Indent.length,
|
2007-10-02 16:09:13 +00:00
|
|
|
'Columns' => [ 'Module', 'Reference' ]
|
|
|
|
)
|
|
|
|
|
|
|
|
licenses = {}
|
|
|
|
|
|
|
|
$framework.payloads.each_module { |name, mod|
|
|
|
|
x = mod.new
|
|
|
|
x.references.each do |r|
|
|
|
|
tbl << [ 'payload/' + name, r.ctx_id + '-' + r.ctx_val ]
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|
|
|
|
$framework.exploits.each_module { |name, mod|
|
|
|
|
x = mod.new
|
|
|
|
x.references.each do |r|
|
|
|
|
tbl << [ 'exploit/' + name, r.ctx_id + '-' + r.ctx_val ]
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|
|
|
|
$framework.nops.each_module { |name, mod|
|
|
|
|
x = mod.new
|
|
|
|
x.references.each do |r|
|
|
|
|
tbl << [ 'nop/' + name, r.ctx_id + '-' + r.ctx_val ]
|
|
|
|
end
|
|
|
|
}
|
|
|
|
$framework.encoders.each_module { |name, mod|
|
|
|
|
x = mod.new
|
|
|
|
x.references.each do |r|
|
|
|
|
tbl << [ 'encoder/' + name, r.ctx_id + '-' + r.ctx_val ]
|
|
|
|
end
|
|
|
|
}
|
|
|
|
$framework.auxiliary.each_module { |name, mod|
|
|
|
|
x = mod.new
|
|
|
|
x.references.each do |r|
|
|
|
|
tbl << [ 'auxiliary/' + name, r.ctx_id + '-' + r.ctx_val ]
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2009-01-10 22:26:58 +00:00
|
|
|
puts tbl.to_s
|