2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-11-28 14:26:33 +00:00
|
|
|
#
|
2010-05-03 17:13:09 +00:00
|
|
|
# $Id$
|
|
|
|
#
|
2005-11-28 14:26:33 +00:00
|
|
|
# This sample demonstrates enumerating all of the modules in the framework and
|
|
|
|
# displays their module type and reference name.
|
|
|
|
#
|
2010-05-03 17:13:09 +00:00
|
|
|
# $Revision$
|
|
|
|
#
|
2005-11-28 14:26:33 +00:00
|
|
|
|
|
|
|
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib'))
|
|
|
|
|
|
|
|
require 'msf/base'
|
|
|
|
|
|
|
|
framework = Msf::Simple::Framework.create
|
|
|
|
|
|
|
|
# Enumerate each module in the framework.
|
|
|
|
framework.modules.each_module { |name, mod|
|
|
|
|
puts "#{mod.type}: #{name}"
|
|
|
|
}
|