Skip to content

Commit f95d7b2

Browse files
committed
Land rapid7#9438, address cmd_exec inconsistencies
2 parents f355d10 + 69818ae commit f95d7b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+47
-48
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ PATH
2020
metasploit-model
2121
metasploit-payloads (= 1.3.25)
2222
metasploit_data_models
23-
metasploit_payloads-mettle (= 0.3.3)
23+
metasploit_payloads-mettle (= 0.3.6)
2424
mqtt
2525
msgpack
2626
nessus_rest
@@ -192,7 +192,7 @@ GEM
192192
postgres_ext
193193
railties (~> 4.2.6)
194194
recog (~> 2.0)
195-
metasploit_payloads-mettle (0.3.3)
195+
metasploit_payloads-mettle (0.3.6)
196196
method_source (0.9.0)
197197
mini_portile2 (2.3.0)
198198
minitest (5.11.1)

lib/msf/core/post/common.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,13 @@ def cmd_exec(cmd, args=nil, time_out=15)
111111
o = ""
112112
# Wait up to time_out seconds for the first bytes to arrive
113113
while (d = process.channel.read)
114+
o << d
114115
if d == ""
115-
if (Time.now.to_i - start < time_out) && (o == '')
116+
if Time.now.to_i - start < time_out
116117
sleep 0.1
117118
else
118119
break
119120
end
120-
else
121-
o << d
122121
end
123122
end
124123
o.chomp! if o

metasploit-framework.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Gem::Specification.new do |spec|
7272
# Needed for Meterpreter
7373
spec.add_runtime_dependency 'metasploit-payloads', '1.3.25'
7474
# Needed for the next-generation POSIX Meterpreter
75-
spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.3.3'
75+
spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.3.6'
7676
# Needed by msfgui and other rpc components
7777
spec.add_runtime_dependency 'msgpack'
7878
# get list of network interfaces, like eth* from OS.

modules/payloads/singles/apple_ios/aarch64/meterpreter_reverse_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
module MetasploitModule
1212

13-
CachedSize = 692552
13+
CachedSize = 692904
1414

1515
include Msf::Payload::Single
1616
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/apple_ios/aarch64/meterpreter_reverse_https.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
module MetasploitModule
1212

13-
CachedSize = 692552
13+
CachedSize = 692904
1414

1515
include Msf::Payload::Single
1616
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/apple_ios/aarch64/meterpreter_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
module MetasploitModule
1212

13-
CachedSize = 692552
13+
CachedSize = 692904
1414

1515
include Msf::Payload::Single
1616
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/linux/aarch64/meterpreter_reverse_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
module MetasploitModule
1212

13-
CachedSize = 966336
13+
CachedSize = 967672
1414

1515
include Msf::Payload::Single
1616
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/linux/aarch64/meterpreter_reverse_https.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
module MetasploitModule
1212

13-
CachedSize = 966336
13+
CachedSize = 967672
1414

1515
include Msf::Payload::Single
1616
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/linux/aarch64/meterpreter_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
module MetasploitModule
1212

13-
CachedSize = 966336
13+
CachedSize = 967672
1414

1515
include Msf::Payload::Single
1616
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/linux/armbe/meterpreter_reverse_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
module MetasploitModule
1212

13-
CachedSize = 902448
13+
CachedSize = 902836
1414

1515
include Msf::Payload::Single
1616
include Msf::Sessions::MeterpreterOptions

0 commit comments

Comments
 (0)