hacky fix for osx

MS-2855/keylogger-mettle-extension
Tim W 2017-11-22 13:07:42 +08:00
parent 92190403cc
commit 0f2bfb70c0
3 changed files with 6 additions and 2 deletions

View File

@ -647,6 +647,8 @@ class Meterpreter < Rex::Post::Meterpreter::Client
["#{self.arch}.dll"]
when 'linux' , 'aix' , 'hpux' , 'irix' , 'unix'
['bin', 'elf']
when 'osx'
['elf']
when 'android', 'java'
['jar']
when 'php'

View File

@ -305,7 +305,9 @@ class ClientCore < Extension
modnameprovided = mod
suffix = nil
if client.binary_suffix.size > 1
if not client.binary_suffix
suffix = ''
elsif client.binary_suffix.size > 1
client.binary_suffix.each { |s|
if (mod =~ /(.*)\.#{s}/ )
mod = $1

View File

@ -1178,7 +1178,7 @@ class Console::CommandDispatcher::Core
md = m.downcase
modulenameprovided = md
if client.binary_suffix.size > 1
if client.binary_suffix and client.binary_suffix.size > 1
client.binary_suffix.each { |s|
if (md =~ /(.*)\.#{s}/ )
md = $1