Skip to content

Commit 0f2bfb7

Browse files
committed
hacky fix for osx
1 parent 9219040 commit 0f2bfb7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

lib/msf/base/sessions/meterpreter.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,8 @@ def binary_suffix
647647
["#{self.arch}.dll"]
648648
when 'linux' , 'aix' , 'hpux' , 'irix' , 'unix'
649649
['bin', 'elf']
650+
when 'osx'
651+
['elf']
650652
when 'android', 'java'
651653
['jar']
652654
when 'php'

lib/rex/post/meterpreter/client_core.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ def use(mod, opts = { })
305305

306306
modnameprovided = mod
307307
suffix = nil
308-
if client.binary_suffix.size > 1
308+
if not client.binary_suffix
309+
suffix = ''
310+
elsif client.binary_suffix.size > 1
309311
client.binary_suffix.each { |s|
310312
if (mod =~ /(.*)\.#{s}/ )
311313
mod = $1

lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ def cmd_load(*args)
11781178
md = m.downcase
11791179
modulenameprovided = md
11801180

1181-
if client.binary_suffix.size > 1
1181+
if client.binary_suffix and client.binary_suffix.size > 1
11821182
client.binary_suffix.each { |s|
11831183
if (md =~ /(.*)\.#{s}/ )
11841184
md = $1

0 commit comments

Comments
 (0)