Skip to content

Commit 84ff72e

Browse files
committed
use file_exist? instead of fs.file.stat
1 parent 25f7af4 commit 84ff72e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

modules/post/windows/gather/enum_chrome.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ def extension_mailvelope_parse_key(data)
4747
def extension_mailvelope(username, extname)
4848
chrome_path = @profiles_path + "\\" + username + @data_path
4949
maildb_path = chrome_path + "/Local Storage/chrome-extension_#{extname}_0.localstorage"
50-
begin
51-
x = session.fs.file.stat(maildb_path)
52-
rescue
50+
if file_exist?(maildb_path) == false
5351
print_error("==> Mailvelope database not found")
5452
return
5553
end
@@ -195,9 +193,7 @@ def extract_data(username)
195193
remote_path = chrome_path + '\\' + f
196194

197195
#Verify the path before downloading the file
198-
begin
199-
x = session.fs.file.stat(remote_path)
200-
rescue
196+
if file_exist?(remote_path) == false
201197
print_error("#{f} not found")
202198
next
203199
end

0 commit comments

Comments
 (0)