metasploit-runner 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/MetasploitPenTestScript/version.rb +1 -1
- data/lib/metasploit/exploit.rb +2 -1
- data/spec/exploit_spec.rb +13 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e91b24d1c3fd0bc018ca58dba882770540309d3
|
4
|
+
data.tar.gz: 8d78216498c5df4ca3c7d268740c00f12432cd10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b77fded959b7c2b3fdcaa3fe439a5c9fce4ac510c7afc182d3e93bfc779bceda5c251fa8bc4aee44a434eff7d9d4bdea5585f15e6813bcf7cc8479287df4113e
|
7
|
+
data.tar.gz: d6e225a1c97329fb7a15c9acaaab33f0ce6780bd3511da60d4346b74118050b4d423fb3bf2f5286825be9cf9a9041d778fb0b58791d450392b6a231d870f309a
|
data/lib/metasploit/exploit.rb
CHANGED
@@ -56,8 +56,9 @@ module Metasploit
|
|
56
56
|
sleep(3)
|
57
57
|
status = rpc_client.call('pro.task_status', task_id)
|
58
58
|
puts status_message
|
59
|
+
status = status.fetch(task_id, {}).fetch('status', {})
|
59
60
|
|
60
|
-
wait_for_task_to_stop_running(rpc_client, status_message, task_id) if status
|
61
|
+
wait_for_task_to_stop_running(rpc_client, status_message, task_id) if status == CONSTANTS::RUNNING_IMPORT_STATUS
|
61
62
|
end
|
62
63
|
end
|
63
64
|
end
|
data/spec/exploit_spec.rb
CHANGED
@@ -111,13 +111,13 @@ describe 'exploit' do
|
|
111
111
|
it 'should call to check the status until it is not running' do
|
112
112
|
expect(@mock_rpc_client).to receive(:call)
|
113
113
|
.with('pro.task_status', @expected_import_task_id)
|
114
|
-
.and_return({'status' => 'running'})
|
114
|
+
.and_return({'1'=>{'status' => 'running'}})
|
115
115
|
.exactly(3).times
|
116
116
|
.ordered
|
117
117
|
|
118
118
|
expect(@mock_rpc_client).to receive(:call)
|
119
119
|
.with('pro.task_status', @expected_import_task_id)
|
120
|
-
.and_return({'status' => 'not running'})
|
120
|
+
.and_return({'1'=>{'status' => 'not running'}})
|
121
121
|
.once
|
122
122
|
.ordered
|
123
123
|
|
@@ -125,15 +125,15 @@ describe 'exploit' do
|
|
125
125
|
end
|
126
126
|
|
127
127
|
it 'should sleep for 3 seconds if the status is still running' do
|
128
|
-
|
128
|
+
expect(@mock_rpc_client).to receive(:call)
|
129
129
|
.with('pro.task_status', @expected_import_task_id)
|
130
|
-
.and_return({'status' => 'running'})
|
130
|
+
.and_return({'1'=>{'status' => 'running'}})
|
131
131
|
.exactly(3).times
|
132
132
|
.ordered
|
133
133
|
|
134
134
|
expect(@mock_rpc_client).to receive(:call)
|
135
135
|
.with('pro.task_status', @expected_import_task_id)
|
136
|
-
.and_return({'status' => 'not running'})
|
136
|
+
.and_return({'1'=>{'status' => 'not running'}})
|
137
137
|
.once
|
138
138
|
.ordered
|
139
139
|
|
@@ -171,13 +171,13 @@ describe 'exploit' do
|
|
171
171
|
it 'should call to check the status until it is not running' do
|
172
172
|
expect(@mock_rpc_client).to receive(:call)
|
173
173
|
.with('pro.task_status', @expected_webscan_task_id)
|
174
|
-
.and_return({'status' => 'running'})
|
174
|
+
.and_return({'12'=>{'status' => 'running'}})
|
175
175
|
.exactly(3).times
|
176
176
|
.ordered
|
177
177
|
|
178
178
|
expect(@mock_rpc_client).to receive(:call)
|
179
179
|
.with('pro.task_status', @expected_webscan_task_id)
|
180
|
-
.and_return({'status' => 'not running'})
|
180
|
+
.and_return({'12'=>{'status' => 'not running'}})
|
181
181
|
.once
|
182
182
|
.ordered
|
183
183
|
|
@@ -187,13 +187,13 @@ describe 'exploit' do
|
|
187
187
|
it 'should sleep for 3 seconds if the status is still running' do
|
188
188
|
expect(@mock_rpc_client).to receive(:call)
|
189
189
|
.with('pro.task_status', @expected_webscan_task_id)
|
190
|
-
.and_return({'status' => 'running'})
|
190
|
+
.and_return({'12'=>{'status' => 'running'}})
|
191
191
|
.exactly(3).times
|
192
192
|
.ordered
|
193
193
|
|
194
194
|
expect(@mock_rpc_client).to receive(:call)
|
195
195
|
.with('pro.task_status', @expected_webscan_task_id)
|
196
|
-
.and_return({'status' => 'not running'})
|
196
|
+
.and_return({'12'=>{'status' => 'not running'}})
|
197
197
|
.once
|
198
198
|
.ordered
|
199
199
|
|
@@ -231,13 +231,13 @@ describe 'exploit' do
|
|
231
231
|
it 'should call to check the status until it is not running' do
|
232
232
|
expect(@mock_rpc_client).to receive(:call)
|
233
233
|
.with('pro.task_status', @expected_exploit_task_id)
|
234
|
-
.and_return({'status' => 'running'})
|
234
|
+
.and_return({'13'=>{'status' => 'running'}})
|
235
235
|
.exactly(3).times
|
236
236
|
.ordered
|
237
237
|
|
238
238
|
expect(@mock_rpc_client).to receive(:call)
|
239
239
|
.with('pro.task_status', @expected_exploit_task_id)
|
240
|
-
.and_return({'status' => 'not running'})
|
240
|
+
.and_return({'13'=>{'status' => 'not running'}})
|
241
241
|
.once
|
242
242
|
.ordered
|
243
243
|
|
@@ -247,13 +247,13 @@ describe 'exploit' do
|
|
247
247
|
it 'should sleep for 3 seconds if the status is still running' do
|
248
248
|
expect(@mock_rpc_client).to receive(:call)
|
249
249
|
.with('pro.task_status', @expected_exploit_task_id)
|
250
|
-
.and_return({'status' => 'running'})
|
250
|
+
.and_return({'13'=>{'status' => 'running'}})
|
251
251
|
.exactly(3).times
|
252
252
|
.ordered
|
253
253
|
|
254
254
|
expect(@mock_rpc_client).to receive(:call)
|
255
255
|
.with('pro.task_status', @expected_exploit_task_id)
|
256
|
-
.and_return({'status' => 'not running'})
|
256
|
+
.and_return({'13'=>{'status' => 'not running'}})
|
257
257
|
.once
|
258
258
|
.ordered
|
259
259
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Gibson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msfrpc-client
|