Files
metasploit-gs/tools/modules/module_payloads.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
795 B
Ruby
Raw Normal View History

2012-09-12 18:44:00 -05:00
#!/usr/bin/env ruby
2018-03-20 11:33:34 +00:00
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
2012-09-12 18:44:00 -05:00
#
# This script lists each exploit module by its compatible payloads
#
msfbase = __FILE__
while File.symlink?(msfbase)
2013-09-30 13:47:53 -05:00
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
2012-09-12 18:44:00 -05:00
end
2015-10-06 10:30:52 -05:00
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), '..', '..', 'lib')))
2012-09-12 18:44:00 -05:00
require 'msfenv'
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
require 'rex'
# Initialize the simplified framework instance.
$framework = Msf::Simple::Framework.create('DisableDatabase' => true)
$framework.exploits.each_module { |name, mod|
2013-09-30 13:47:53 -05:00
x = mod.new
2012-09-12 18:44:00 -05:00
2013-09-30 13:47:53 -05:00
x.compatible_payloads.map{|n, m|
puts "#{x.refname.ljust 40} - #{n}"
}
2012-09-12 18:44:00 -05:00
}