try to find wow64 installs. also fixes a problem where blank lines were printed when no DisplayName was found

git-svn-id: file:///home/svn/framework3/trunk@12021 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2011-03-18 21:46:01 +00:00
parent db9c9c625f
commit 8db83e406e
1 changed files with 7 additions and 3 deletions

View File

@ -39,8 +39,12 @@ class Metasploit3 < Msf::Post
"Name",
"Version"
])
appkeys = ['HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
'HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall' ]
appkeys = [
'HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
'HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
'HKLM\\SOFTWARE\\WOW6432NODE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
'HKCU\\SOFTWARE\\WOW6432NODE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
]
apps = []
appkeys.each do |keyx86|
registry_enumkeys(keyx86).each do |ak|
@ -56,7 +60,7 @@ class Metasploit3 < Msf::Post
begin
dispnm = registry_getvaldata("#{k}","DisplayName")
dispversion = registry_getvaldata("#{k}","DisplayVersion")
tbl << [dispnm,dispversion]
tbl << [dispnm,dispversion] if dispnm and dispversion
rescue
end
end