Fix to pass failing spec test.

MS-2855/keylogger-mettle-extension
Pearce Barry 2018-02-27 09:57:23 -06:00
parent f73d593407
commit ed922340f0
No known key found for this signature in database
GPG Key ID: 0916F4DEA5C5DE0A
1 changed files with 6 additions and 2 deletions

View File

@ -320,9 +320,11 @@ class ClientCore < Extension
modnameprovided = mod modnameprovided = mod
suffix = nil suffix = nil
if client.binary_suffix.blank? # If there is no supported suffix *or* if the one supported suffix indicates
# ELF, then allow ELF files which have no '.elf' suffix.
if client.binary_suffix.blank? || (client.binary_suffix.size == 1 && client.binary_suffix.first == 'elf')
suffix = '' suffix = ''
else elsif client.binary_suffix.size > 1
client.binary_suffix.each { |s| client.binary_suffix.each { |s|
if (mod =~ /(.*)\.#{s}/ ) if (mod =~ /(.*)\.#{s}/ )
mod = $1 mod = $1
@ -330,6 +332,8 @@ class ClientCore < Extension
break break
end end
} }
else
suffix = client.binary_suffix.first
end end
# Query the remote instance to see if commands for the extension are # Query the remote instance to see if commands for the extension are