Skip to content

Commit

Permalink
use file_exist? instead of fs.file.stat
Browse files Browse the repository at this point in the history
  • Loading branch information
mubix committed May 10, 2013
1 parent 25f7af4 commit 84ff72e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions modules/post/windows/gather/enum_chrome.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ def extension_mailvelope_parse_key(data)
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
Expand Down Expand Up @@ -195,9 +193,7 @@ def extract_data(username)
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
Expand Down

0 comments on commit 84ff72e

Please sign in to comment.