Retab all the things (except external/)

This commit is contained in:
Tab Assassin
2013-09-30 13:47:53 -05:00
parent 0ecba377f5
commit 2e8d19edcf
293 changed files with 32962 additions and 32962 deletions
+54 -54
View File
@@ -9,7 +9,7 @@
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), '..', 'lib')))
@@ -31,48 +31,48 @@ type='All'
match= nil
opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help menu." ],
"-s" => [ false, "Sort by Reference instead of Module Type."],
"-r" => [ false, "Reverse Sort"],
"-f" => [ true, "Filter based on Module Type [All,Exploit,Payload,Post,NOP,Encoder,Auxiliary] (Default = All)."],
"-t" => [ true, "Type of Reference to sort by [All,URL,CVE,OSVDB,BID,MSB,NSS,US-CERT-VU]"],
"-x" => [ true, "String or RegEx to try and match against the Reference Field"]
"-h" => [ false, "Help menu." ],
"-s" => [ false, "Sort by Reference instead of Module Type."],
"-r" => [ false, "Reverse Sort"],
"-f" => [ true, "Filter based on Module Type [All,Exploit,Payload,Post,NOP,Encoder,Auxiliary] (Default = All)."],
"-t" => [ true, "Type of Reference to sort by [All,URL,CVE,OSVDB,BID,MSB,NSS,US-CERT-VU]"],
"-x" => [ true, "String or RegEx to try and match against the Reference Field"]
)
opts.parse(ARGV) { |opt, idx, val|
case opt
when "-h"
puts "\nMetasploit Script for Displaying Module Reference information."
puts "=========================================================="
puts opts.usage
exit
when "-s"
puts "Sorting by License"
sort = 1
when "-r"
puts "Reverse Sorting"
sort = 2
when "-f"
unless filters.include?(val.downcase)
puts "Invalid Filter Supplied: #{val}"
puts "Please use one of these: #{filters.map{|f|f.capitalize}.join(", ")}"
exit
end
puts "Module Filter: #{val}"
filter = val
when "-t"
unless types.include?(val)
puts "Invalid Type Supplied: #{val}"
puts "Please use one of these: [All,URL,CVE,OSVDB,BID,MSB,NSS,US-CERT-VU]"
exit
end
puts "Type: #{val}"
type = val
when "-x"
puts "Regex: #{val}"
match = Regexp.new(val)
end
case opt
when "-h"
puts "\nMetasploit Script for Displaying Module Reference information."
puts "=========================================================="
puts opts.usage
exit
when "-s"
puts "Sorting by License"
sort = 1
when "-r"
puts "Reverse Sorting"
sort = 2
when "-f"
unless filters.include?(val.downcase)
puts "Invalid Filter Supplied: #{val}"
puts "Please use one of these: #{filters.map{|f|f.capitalize}.join(", ")}"
exit
end
puts "Module Filter: #{val}"
filter = val
when "-t"
unless types.include?(val)
puts "Invalid Type Supplied: #{val}"
puts "Please use one of these: [All,URL,CVE,OSVDB,BID,MSB,NSS,US-CERT-VU]"
exit
end
puts "Type: #{val}"
type = val
when "-x"
puts "Regex: #{val}"
match = Regexp.new(val)
end
}
@@ -86,7 +86,7 @@ framework_opts = { 'DisableDatabase' => true }
# If the user only wants a particular module type, no need to load the others
if filter.downcase != 'all'
framework_opts[:module_types] = [ filter.downcase ]
framework_opts[:module_types] = [ filter.downcase ]
end
# Initialize the simplified framework instance.
@@ -94,31 +94,31 @@ $framework = Msf::Simple::Framework.create(framework_opts)
tbl = Rex::Ui::Text::Table.new(
'Header' => 'Module References',
'Indent' => Indent.length,
'Columns' => [ 'Module', 'Reference' ]
'Header' => 'Module References',
'Indent' => Indent.length,
'Columns' => [ 'Module', 'Reference' ]
)
$framework.modules.each { |name, mod|
next if match and not name =~ match
next if match and not name =~ match
x = mod.new
x.references.each do |r|
if type=='All' or type==r.ctx_id
ref = "#{r.ctx_id}-#{r.ctx_val}"
tbl << [ x.fullname, ref ]
end
end
x = mod.new
x.references.each do |r|
if type=='All' or type==r.ctx_id
ref = "#{r.ctx_id}-#{r.ctx_val}"
tbl << [ x.fullname, ref ]
end
end
}
if sort == 1
tbl.sort_rows(1)
tbl.sort_rows(1)
end
if sort == 2
tbl.sort_rows(1)
tbl.rows.reverse
tbl.sort_rows(1)
tbl.rows.reverse
end