diff --git a/modules/post/linux/gather/mount_cifs_creds.rb b/modules/post/linux/gather/mount_cifs_creds.rb index 302709d3e0..eb89855934 100644 --- a/modules/post/linux/gather/mount_cifs_creds.rb +++ b/modules/post/linux/gather/mount_cifs_creds.rb @@ -38,6 +38,7 @@ class MetasploitModule < Msf::Post ]) # parse each line from /etc/fstab + fail_with(Failure::NotFound, '/etc/fstab not found on system') unless file_exist?('/etc/fstab') read_file("/etc/fstab").each_line do |fstab_line| fstab_line.strip! # where we'll store the current parsed credentials, if any