Avoid misleading error

unstable
sinn3r 2013-07-05 12:12:30 -05:00
parent 1064c050de
commit dc90904e50
1 changed files with 10 additions and 2 deletions

View File

@ -52,7 +52,11 @@ class Metasploit3 < Msf::Post
print_status("Already Checked SYSTEMROOT")
when ".\\wcx_ftp.ini"
hklminstpath = registry_getvaldata(commander_key, 'InstallDir') || ''
if hklminstpath.empty?
print_error("Unable to find InstallDir in registry, skipping wcx_ftp.ini")
else
check_other(hklminstpath +'\\wcx_ftp.ini')
end
when /APPDATA/
print_status("Already Checked AppData")
when /USERPROFILE/
@ -75,7 +79,11 @@ class Metasploit3 < Msf::Post
print_status("Already Checked SYSTEMROOT")
when ".\\wcx_ftp.ini"
hklminstpath = registry_getvaldata(profile_commander_key, 'InstallDir') || ''
if hklminstpath.empty?
print_error("Unable to find InstallDir in registry, skipping wcx_ftp.ini")
else
check_other(hklminstpath +'\\wcx_ftp.ini')
end
when /APPDATA/
print_status("Already Checked AppData")