1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-14 17:37:27 +01:00

Don't modify strings you don't own

This commit is contained in:
dwelch-r7 2022-03-10 12:47:10 +00:00
parent 395c31d03e
commit c26ec62f55

View File

@ -38,7 +38,7 @@ module MetasploitPayloads
# Get the path to a meterpreter binary by full name.
#
def self.meterpreter_path(name, binary_suffix, debug: false)
binary_suffix&.gsub!(/dll$/, 'debug.dll') if debug
binary_suffix = binary_suffix&.gsub(/dll$/, 'debug.dll') if debug
path(METERPRETER_SUBFOLDER, "#{name}.#{binary_suffix}".downcase)
end