add tool to show disclosure dates

git-svn-id: file:///home/svn/framework3/trunk@9520 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-06-15 07:14:05 +00:00
parent afddb802ea
commit 6d38dd0850
1 changed files with 71 additions and 0 deletions

71
tools/module_disclodate.rb Executable file
View File

@ -0,0 +1,71 @@
#!/usr/bin/env ruby
#
# $Id$
# $Revision$
#
# This script lists each module by its disclosure date
#
msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
$:.unshift(File.join(File.dirname(msfbase), '..', 'lib'))
require 'rex'
require 'msf/ui'
require 'msf/base'
Indent = ' '
# Initialize the simplified framework instance.
$framework = Msf::Simple::Framework.create
tbl = Rex::Ui::Text::Table.new(
'Header' => 'Module References',
'Indent' => Indent.length,
'Columns' => [ 'Module', 'Disclosure Date' ]
)
# fancy monkey patch
class Msf::Module
def disclo_date
if (module_info and module_info['DisclosureDate'])
begin
dt = Date.parse(module_info['DisclosureDate'])
rescue ArgumentError
return 'Error'
end
return dt.strftime('%b %d %Y')
end
''
end
end
$framework.payloads.each_module { |name, mod|
x = mod.new
tbl << [ 'payload/' + name, x.disclo_date ]
}
$framework.exploits.each_module { |name, mod|
x = mod.new
tbl << [ 'exploit/' + name, x.disclo_date ]
}
$framework.nops.each_module { |name, mod|
x = mod.new
tbl << [ 'nop/' + name, x.disclo_date ]
}
$framework.encoders.each_module { |name, mod|
x = mod.new
tbl << [ 'encoder/' + name, x.disclo_date ]
}
$framework.auxiliary.each_module { |name, mod|
x = mod.new
tbl << [ 'auxiliary/' + name, x.disclo_date ]
}
puts tbl.to_s