Skip to content

Commit 5a92dc2

Browse files
committed
Land rapid7#6997, Avoid exception on missing key in enum_chrome
2 parents bbaa3ad + 95517b4 commit 5a92dc2

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

modules/post/windows/gather/enum_chrome.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,15 @@ def parse_prefs(username, filepath)
8585
prefs = f.read
8686
end
8787
results = ActiveSupport::JSON.decode(prefs)
88-
print_status("Extensions installed: ")
89-
results['extensions']['settings'].each do |name,values|
90-
if values['manifest']
91-
print_status("=> #{values['manifest']['name']}")
92-
if values['manifest']['name'] =~ /mailvelope/i
93-
print_good("==> Found Mailvelope extension, extracting PGP keys")
94-
extension_mailvelope(username, name)
88+
if results['extensions']['settings']
89+
print_status("Extensions installed: ")
90+
results['extensions']['settings'].each do |name,values|
91+
if values['manifest']
92+
print_status("=> #{values['manifest']['name']}")
93+
if values['manifest']['name'] =~ /mailvelope/i
94+
print_good("==> Found Mailvelope extension, extracting PGP keys")
95+
extension_mailvelope(username, name)
96+
end
9597
end
9698
end
9799
end

0 commit comments

Comments
 (0)