1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-11-20 14:39:22 +01:00

Only enumerate the local directory if it exists

This commit is contained in:
Spencer McIntyre 2021-02-12 11:50:55 -05:00
parent 826b13e184
commit ff2459e08b

View File

@ -84,6 +84,8 @@ module MetasploitPayloads
end
root_dirs.each do |dir|
next unless ::File.directory?(dir)
# Merge in any that don't already exist in the collection.
meterpreter_enum_ext(dir, binary_suffix).each do |e|
extensions.push(e) unless extensions.include?(e)