2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
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.
|
|
|
|
#
|
|
|
|
|
|
|
|
$:.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}"
|
|
|
|
}
|