From 84ff72eb927374ae2c882212552fa1da32400280 Mon Sep 17 00:00:00 2001 From: Rob Fuller Date: Fri, 10 May 2013 11:17:42 -0400 Subject: [PATCH] use file_exist? instead of fs.file.stat --- modules/post/windows/gather/enum_chrome.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/post/windows/gather/enum_chrome.rb b/modules/post/windows/gather/enum_chrome.rb index 3c5b8546ad..a5656c17a8 100644 --- a/modules/post/windows/gather/enum_chrome.rb +++ b/modules/post/windows/gather/enum_chrome.rb @@ -47,9 +47,7 @@ class Metasploit3 < Msf::Post def extension_mailvelope(username, extname) chrome_path = @profiles_path + "\\" + username + @data_path maildb_path = chrome_path + "/Local Storage/chrome-extension_#{extname}_0.localstorage" - begin - x = session.fs.file.stat(maildb_path) - rescue + if file_exist?(maildb_path) == false print_error("==> Mailvelope database not found") return end @@ -195,9 +193,7 @@ class Metasploit3 < Msf::Post remote_path = chrome_path + '\\' + f #Verify the path before downloading the file - begin - x = session.fs.file.stat(remote_path) - rescue + if file_exist?(remote_path) == false print_error("#{f} not found") next end