Skip to content

Commit 0971d7c

Browse files
committed
Remove ... from prints, only map a browser if we found something
1 parent 967800e commit 0971d7c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/post/multi/gather/lastpass_creds.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def run
3434
return
3535
end
3636

37-
print_status "Searching for LastPass databases..."
37+
print_status "Searching for LastPass databases"
3838

3939
account_map = build_account_map
4040
if account_map.empty?
@@ -100,7 +100,7 @@ def run
100100
# Parse and decrypt credentials
101101
credentials.each do |row| # Decrypt passwords
102102
account, browser, user, enc_pass = row
103-
vprint_status "Decrypting password for #{account}'s #{user} from #{browser}..."
103+
vprint_status "Decrypting password for #{account}'s #{user} from #{browser}"
104104
password = clear_text_password(user, enc_pass)
105105
credentials_table << [account, browser, user, password]
106106
end
@@ -149,7 +149,8 @@ def build_account_map
149149

150150
found_dbs_map[account] = {}
151151
browser_path_map.each_pair do |browser, path|
152-
found_dbs_map[account][browser] = find_db_paths(path, browser, account)
152+
db_paths = find_db_paths(path, browser, account)
153+
found_dbs_map[account][browser] = db_paths unless db_paths.empty?
153154
end
154155
end
155156

@@ -161,7 +162,7 @@ def build_account_map
161162
def find_db_paths(path, browser, account)
162163
paths = []
163164

164-
vprint_status "Checking #{account}'s #{browser}..."
165+
vprint_status "Checking #{account}'s #{browser}"
165166
if browser == "Firefox" # Special case for Firefox
166167
profiles = firefox_profile_files(path, browser)
167168
paths |= profiles

0 commit comments

Comments
 (0)