winrm 2.2.3 → 2.3.6
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 +5 -5
- data/README.md +1 -1
- data/bin/rwinrm +90 -97
- data/lib/winrm/connection.rb +84 -86
- data/lib/winrm/connection_opts.rb +90 -91
- data/lib/winrm/exceptions.rb +14 -2
- data/lib/winrm/http/response_handler.rb +127 -96
- data/lib/winrm/http/transport.rb +462 -427
- data/lib/winrm/http/transport_factory.rb +1 -5
- data/lib/winrm/output.rb +1 -2
- data/lib/winrm/psrp/fragment.rb +0 -2
- data/lib/winrm/psrp/message.rb +128 -130
- data/lib/winrm/psrp/message_data/base.rb +0 -2
- data/lib/winrm/psrp/message_data/error_record.rb +2 -2
- data/lib/winrm/psrp/message_data/pipeline_host_call.rb +0 -2
- data/lib/winrm/psrp/message_data/pipeline_output.rb +48 -54
- data/lib/winrm/psrp/message_data/pipeline_state.rb +0 -2
- data/lib/winrm/psrp/message_data/runspacepool_host_call.rb +0 -2
- data/lib/winrm/psrp/message_data/runspacepool_state.rb +0 -2
- data/lib/winrm/psrp/message_data/session_capability.rb +0 -2
- data/lib/winrm/psrp/message_data.rb +0 -2
- data/lib/winrm/psrp/message_defragmenter.rb +2 -2
- data/lib/winrm/psrp/message_factory.rb +16 -5
- data/lib/winrm/psrp/message_fragmenter.rb +1 -3
- data/lib/winrm/psrp/powershell_output_decoder.rb +142 -144
- data/lib/winrm/psrp/receive_response_reader.rb +3 -5
- data/lib/winrm/psrp/uuid.rb +1 -2
- data/lib/winrm/shells/base.rb +7 -4
- data/lib/winrm/shells/cmd.rb +63 -65
- data/lib/winrm/shells/power_shell.rb +207 -202
- data/lib/winrm/shells/retryable.rb +44 -45
- data/lib/winrm/shells/shell_factory.rb +0 -2
- data/lib/winrm/version.rb +1 -3
- data/lib/winrm/wsmv/base.rb +0 -2
- data/lib/winrm/wsmv/cleanup_command.rb +1 -2
- data/lib/winrm/wsmv/close_shell.rb +1 -2
- data/lib/winrm/wsmv/command.rb +2 -3
- data/lib/winrm/wsmv/command_output.rb +2 -3
- data/lib/winrm/wsmv/command_output_decoder.rb +1 -2
- data/lib/winrm/wsmv/configuration.rb +0 -2
- data/lib/winrm/wsmv/create_pipeline.rb +0 -2
- data/lib/winrm/wsmv/create_shell.rb +2 -6
- data/lib/winrm/wsmv/header.rb +213 -215
- data/lib/winrm/wsmv/init_runspace_pool.rb +96 -95
- data/lib/winrm/wsmv/iso8601_duration.rb +0 -2
- data/lib/winrm/wsmv/keep_alive.rb +0 -2
- data/lib/winrm/wsmv/receive_response_reader.rb +128 -126
- data/lib/winrm/wsmv/send_data.rb +0 -2
- data/lib/winrm/wsmv/soap.rb +0 -2
- data/lib/winrm/wsmv/wql_pull.rb +54 -56
- data/lib/winrm/wsmv/wql_query.rb +98 -99
- data/lib/winrm/wsmv/write_stdin.rb +0 -2
- data/lib/winrm.rb +3 -5
- metadata +81 -135
- data/.gitignore +0 -10
- data/.rubocop.yml +0 -26
- data/.travis.yml +0 -11
- data/Gemfile +0 -3
- data/Rakefile +0 -34
- data/Vagrantfile +0 -6
- data/WinrmAppveyor.psm1 +0 -32
- data/appveyor.yml +0 -51
- data/changelog.md +0 -128
- data/preamble +0 -17
- data/tests/integration/auth_timeout_spec.rb +0 -18
- data/tests/integration/cmd_spec.rb +0 -131
- data/tests/integration/config-example.yml +0 -16
- data/tests/integration/issue_59_spec.rb +0 -26
- data/tests/integration/powershell_spec.rb +0 -165
- data/tests/integration/spec_helper.rb +0 -65
- data/tests/integration/transport_spec.rb +0 -99
- data/tests/integration/wql_spec.rb +0 -34
- data/tests/matchers.rb +0 -60
- data/tests/spec/configuration_spec.rb +0 -184
- data/tests/spec/connection_spec.rb +0 -39
- data/tests/spec/exception_spec.rb +0 -50
- data/tests/spec/http/transport_factory_spec.rb +0 -68
- data/tests/spec/http/transport_spec.rb +0 -44
- data/tests/spec/output_spec.rb +0 -127
- data/tests/spec/psrp/fragment_spec.rb +0 -62
- data/tests/spec/psrp/message_data/base_spec.rb +0 -13
- data/tests/spec/psrp/message_data/error_record_spec.rb +0 -41
- data/tests/spec/psrp/message_data/pipeline_host_call_spec.rb +0 -25
- data/tests/spec/psrp/message_data/pipeline_output_spec.rb +0 -32
- data/tests/spec/psrp/message_data/pipeline_state_spec.rb +0 -40
- data/tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb +0 -25
- data/tests/spec/psrp/message_data/runspacepool_state_spec.rb +0 -16
- data/tests/spec/psrp/message_data/session_capability_spec.rb +0 -30
- data/tests/spec/psrp/message_data_spec.rb +0 -35
- data/tests/spec/psrp/message_defragmenter_spec.rb +0 -47
- data/tests/spec/psrp/message_fragmenter_spec.rb +0 -105
- data/tests/spec/psrp/powershell_output_decoder_spec.rb +0 -100
- data/tests/spec/psrp/psrp_message_spec.rb +0 -70
- data/tests/spec/psrp/recieve_response_reader_spec.rb +0 -172
- data/tests/spec/psrp/uuid_spec.rb +0 -28
- data/tests/spec/response_handler_spec.rb +0 -61
- data/tests/spec/shells/base_spec.rb +0 -225
- data/tests/spec/shells/cmd_spec.rb +0 -75
- data/tests/spec/shells/powershell_spec.rb +0 -175
- data/tests/spec/spec_helper.rb +0 -47
- data/tests/spec/stubs/clixml/error_record.xml.erb +0 -84
- data/tests/spec/stubs/clixml/pipeline_state.xml.erb +0 -88
- data/tests/spec/stubs/responses/get_command_output_response.xml.erb +0 -13
- data/tests/spec/stubs/responses/get_command_output_response_not_done.xml.erb +0 -10
- data/tests/spec/stubs/responses/get_powershell_keepalive_response.xml.erb +0 -10
- data/tests/spec/stubs/responses/get_powershell_output_response.xml.erb +0 -12
- data/tests/spec/stubs/responses/get_powershell_output_response_not_done.xml.erb +0 -9
- data/tests/spec/stubs/responses/open_shell_v1.xml +0 -19
- data/tests/spec/stubs/responses/open_shell_v2.xml +0 -20
- data/tests/spec/stubs/responses/soap_fault_v1.xml +0 -36
- data/tests/spec/stubs/responses/soap_fault_v2.xml +0 -42
- data/tests/spec/stubs/responses/wmi_error_v2.xml +0 -41
- data/tests/spec/wsmv/cleanup_command_spec.rb +0 -22
- data/tests/spec/wsmv/close_shell_spec.rb +0 -17
- data/tests/spec/wsmv/command_output_decoder_spec.rb +0 -37
- data/tests/spec/wsmv/command_output_spec.rb +0 -45
- data/tests/spec/wsmv/command_spec.rb +0 -19
- data/tests/spec/wsmv/configuration_spec.rb +0 -17
- data/tests/spec/wsmv/create_pipeline_spec.rb +0 -31
- data/tests/spec/wsmv/create_shell_spec.rb +0 -38
- data/tests/spec/wsmv/init_runspace_pool_spec.rb +0 -36
- data/tests/spec/wsmv/keep_alive_spec.rb +0 -21
- data/tests/spec/wsmv/receive_response_reader_spec.rb +0 -123
- data/tests/spec/wsmv/send_data_spec.rb +0 -30
- data/tests/spec/wsmv/wql_query_spec.rb +0 -13
- data/tests/spec/wsmv/write_stdin_spec.rb +0 -22
- data/winrm.gemspec +0 -47
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: winrm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Wanek
|
|
@@ -11,8 +11,36 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
|
+
- !ruby/object:Gem::Dependency
|
|
17
|
+
name: builder
|
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
|
19
|
+
requirements:
|
|
20
|
+
- - ">="
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 2.1.2
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - ">="
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 2.1.2
|
|
30
|
+
- !ruby/object:Gem::Dependency
|
|
31
|
+
name: erubi
|
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
|
33
|
+
requirements:
|
|
34
|
+
- - "~>"
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '1.8'
|
|
37
|
+
type: :runtime
|
|
38
|
+
prerelease: false
|
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
40
|
+
requirements:
|
|
41
|
+
- - "~>"
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: '1.8'
|
|
16
44
|
- !ruby/object:Gem::Dependency
|
|
17
45
|
name: gssapi
|
|
18
46
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -28,45 +56,39 @@ dependencies:
|
|
|
28
56
|
- !ruby/object:Gem::Version
|
|
29
57
|
version: '1.2'
|
|
30
58
|
- !ruby/object:Gem::Dependency
|
|
31
|
-
name:
|
|
59
|
+
name: gyoku
|
|
32
60
|
requirement: !ruby/object:Gem::Requirement
|
|
33
61
|
requirements:
|
|
34
62
|
- - "~>"
|
|
35
63
|
- !ruby/object:Gem::Version
|
|
36
|
-
version: '
|
|
37
|
-
- - ">="
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: 2.2.0.2
|
|
64
|
+
version: '1.0'
|
|
40
65
|
type: :runtime
|
|
41
66
|
prerelease: false
|
|
42
67
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
68
|
requirements:
|
|
44
69
|
- - "~>"
|
|
45
70
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
47
|
-
- - ">="
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version: 2.2.0.2
|
|
71
|
+
version: '1.0'
|
|
50
72
|
- !ruby/object:Gem::Dependency
|
|
51
|
-
name:
|
|
73
|
+
name: httpclient
|
|
52
74
|
requirement: !ruby/object:Gem::Requirement
|
|
53
75
|
requirements:
|
|
54
76
|
- - "~>"
|
|
55
77
|
- !ruby/object:Gem::Version
|
|
56
|
-
version:
|
|
78
|
+
version: '2.2'
|
|
57
79
|
- - ">="
|
|
58
80
|
- !ruby/object:Gem::Version
|
|
59
|
-
version: 0.
|
|
81
|
+
version: 2.2.0.2
|
|
60
82
|
type: :runtime
|
|
61
83
|
prerelease: false
|
|
62
84
|
version_requirements: !ruby/object:Gem::Requirement
|
|
63
85
|
requirements:
|
|
64
86
|
- - "~>"
|
|
65
87
|
- !ruby/object:Gem::Version
|
|
66
|
-
version:
|
|
88
|
+
version: '2.2'
|
|
67
89
|
- - ">="
|
|
68
90
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 0.
|
|
91
|
+
version: 2.2.0.2
|
|
70
92
|
- !ruby/object:Gem::Dependency
|
|
71
93
|
name: logging
|
|
72
94
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -102,117 +124,115 @@ dependencies:
|
|
|
102
124
|
- !ruby/object:Gem::Version
|
|
103
125
|
version: '2.0'
|
|
104
126
|
- !ruby/object:Gem::Dependency
|
|
105
|
-
name:
|
|
127
|
+
name: pry
|
|
106
128
|
requirement: !ruby/object:Gem::Requirement
|
|
107
129
|
requirements:
|
|
108
|
-
- - "
|
|
130
|
+
- - ">="
|
|
109
131
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
111
|
-
type: :
|
|
132
|
+
version: '0'
|
|
133
|
+
type: :development
|
|
112
134
|
prerelease: false
|
|
113
135
|
version_requirements: !ruby/object:Gem::Requirement
|
|
114
136
|
requirements:
|
|
115
|
-
- - "
|
|
137
|
+
- - ">="
|
|
116
138
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '
|
|
139
|
+
version: '0'
|
|
118
140
|
- !ruby/object:Gem::Dependency
|
|
119
|
-
name:
|
|
141
|
+
name: rake
|
|
120
142
|
requirement: !ruby/object:Gem::Requirement
|
|
121
143
|
requirements:
|
|
122
144
|
- - ">="
|
|
123
145
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
125
|
-
|
|
146
|
+
version: '10.3'
|
|
147
|
+
- - "<"
|
|
148
|
+
- !ruby/object:Gem::Version
|
|
149
|
+
version: '13'
|
|
150
|
+
type: :development
|
|
126
151
|
prerelease: false
|
|
127
152
|
version_requirements: !ruby/object:Gem::Requirement
|
|
128
153
|
requirements:
|
|
129
154
|
- - ">="
|
|
130
155
|
- !ruby/object:Gem::Version
|
|
131
|
-
version:
|
|
156
|
+
version: '10.3'
|
|
157
|
+
- - "<"
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '13'
|
|
132
160
|
- !ruby/object:Gem::Dependency
|
|
133
|
-
name:
|
|
161
|
+
name: rb-readline
|
|
134
162
|
requirement: !ruby/object:Gem::Requirement
|
|
135
163
|
requirements:
|
|
136
|
-
- - "
|
|
164
|
+
- - ">="
|
|
137
165
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
139
|
-
type: :
|
|
166
|
+
version: '0'
|
|
167
|
+
type: :development
|
|
140
168
|
prerelease: false
|
|
141
169
|
version_requirements: !ruby/object:Gem::Requirement
|
|
142
170
|
requirements:
|
|
143
|
-
- - "
|
|
171
|
+
- - ">="
|
|
144
172
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: '
|
|
173
|
+
version: '0'
|
|
146
174
|
- !ruby/object:Gem::Dependency
|
|
147
|
-
name:
|
|
175
|
+
name: rexml
|
|
148
176
|
requirement: !ruby/object:Gem::Requirement
|
|
149
177
|
requirements:
|
|
150
|
-
- - "
|
|
178
|
+
- - ">="
|
|
151
179
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: '
|
|
180
|
+
version: '0'
|
|
153
181
|
type: :development
|
|
154
182
|
prerelease: false
|
|
155
183
|
version_requirements: !ruby/object:Gem::Requirement
|
|
156
184
|
requirements:
|
|
157
|
-
- - "
|
|
185
|
+
- - ">="
|
|
158
186
|
- !ruby/object:Gem::Version
|
|
159
|
-
version: '
|
|
187
|
+
version: '0'
|
|
160
188
|
- !ruby/object:Gem::Dependency
|
|
161
|
-
name:
|
|
189
|
+
name: rspec
|
|
162
190
|
requirement: !ruby/object:Gem::Requirement
|
|
163
191
|
requirements:
|
|
164
192
|
- - "~>"
|
|
165
193
|
- !ruby/object:Gem::Version
|
|
166
|
-
version: '
|
|
194
|
+
version: '3.2'
|
|
167
195
|
type: :development
|
|
168
196
|
prerelease: false
|
|
169
197
|
version_requirements: !ruby/object:Gem::Requirement
|
|
170
198
|
requirements:
|
|
171
199
|
- - "~>"
|
|
172
200
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: '
|
|
201
|
+
version: '3.2'
|
|
174
202
|
- !ruby/object:Gem::Dependency
|
|
175
203
|
name: rubocop
|
|
176
204
|
requirement: !ruby/object:Gem::Requirement
|
|
177
205
|
requirements:
|
|
178
206
|
- - "~>"
|
|
179
207
|
- !ruby/object:Gem::Version
|
|
180
|
-
version: 0.
|
|
208
|
+
version: 0.51.0
|
|
181
209
|
type: :development
|
|
182
210
|
prerelease: false
|
|
183
211
|
version_requirements: !ruby/object:Gem::Requirement
|
|
184
212
|
requirements:
|
|
185
213
|
- - "~>"
|
|
186
214
|
- !ruby/object:Gem::Version
|
|
187
|
-
version: 0.
|
|
215
|
+
version: 0.51.0
|
|
188
216
|
- !ruby/object:Gem::Dependency
|
|
189
|
-
name:
|
|
217
|
+
name: rubyntlm
|
|
190
218
|
requirement: !ruby/object:Gem::Requirement
|
|
191
219
|
requirements:
|
|
192
|
-
- - "
|
|
193
|
-
- !ruby/object:Gem::Version
|
|
194
|
-
version: '0'
|
|
195
|
-
type: :development
|
|
196
|
-
prerelease: false
|
|
197
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
198
|
-
requirements:
|
|
199
|
-
- - ">="
|
|
220
|
+
- - "~>"
|
|
200
221
|
- !ruby/object:Gem::Version
|
|
201
|
-
version:
|
|
202
|
-
- !ruby/object:Gem::Dependency
|
|
203
|
-
name: rb-readline
|
|
204
|
-
requirement: !ruby/object:Gem::Requirement
|
|
205
|
-
requirements:
|
|
222
|
+
version: 0.6.0
|
|
206
223
|
- - ">="
|
|
207
224
|
- !ruby/object:Gem::Version
|
|
208
|
-
version:
|
|
209
|
-
type: :
|
|
225
|
+
version: 0.6.3
|
|
226
|
+
type: :runtime
|
|
210
227
|
prerelease: false
|
|
211
228
|
version_requirements: !ruby/object:Gem::Requirement
|
|
212
229
|
requirements:
|
|
230
|
+
- - "~>"
|
|
231
|
+
- !ruby/object:Gem::Version
|
|
232
|
+
version: 0.6.0
|
|
213
233
|
- - ">="
|
|
214
234
|
- !ruby/object:Gem::Version
|
|
215
|
-
version:
|
|
235
|
+
version: 0.6.3
|
|
216
236
|
description: " Ruby library for Windows Remote Management\n"
|
|
217
237
|
email:
|
|
218
238
|
- dan.wanek@gmail.com
|
|
@@ -226,18 +246,9 @@ extra_rdoc_files:
|
|
|
226
246
|
- README.md
|
|
227
247
|
- LICENSE
|
|
228
248
|
files:
|
|
229
|
-
- ".gitignore"
|
|
230
|
-
- ".rubocop.yml"
|
|
231
|
-
- ".travis.yml"
|
|
232
|
-
- Gemfile
|
|
233
249
|
- LICENSE
|
|
234
250
|
- README.md
|
|
235
|
-
- Rakefile
|
|
236
|
-
- Vagrantfile
|
|
237
|
-
- WinrmAppveyor.psm1
|
|
238
|
-
- appveyor.yml
|
|
239
251
|
- bin/rwinrm
|
|
240
|
-
- changelog.md
|
|
241
252
|
- lib/winrm.rb
|
|
242
253
|
- lib/winrm/connection.rb
|
|
243
254
|
- lib/winrm/connection_opts.rb
|
|
@@ -291,70 +302,6 @@ files:
|
|
|
291
302
|
- lib/winrm/wsmv/wql_pull.rb
|
|
292
303
|
- lib/winrm/wsmv/wql_query.rb
|
|
293
304
|
- lib/winrm/wsmv/write_stdin.rb
|
|
294
|
-
- preamble
|
|
295
|
-
- tests/integration/auth_timeout_spec.rb
|
|
296
|
-
- tests/integration/cmd_spec.rb
|
|
297
|
-
- tests/integration/config-example.yml
|
|
298
|
-
- tests/integration/issue_59_spec.rb
|
|
299
|
-
- tests/integration/powershell_spec.rb
|
|
300
|
-
- tests/integration/spec_helper.rb
|
|
301
|
-
- tests/integration/transport_spec.rb
|
|
302
|
-
- tests/integration/wql_spec.rb
|
|
303
|
-
- tests/matchers.rb
|
|
304
|
-
- tests/spec/configuration_spec.rb
|
|
305
|
-
- tests/spec/connection_spec.rb
|
|
306
|
-
- tests/spec/exception_spec.rb
|
|
307
|
-
- tests/spec/http/transport_factory_spec.rb
|
|
308
|
-
- tests/spec/http/transport_spec.rb
|
|
309
|
-
- tests/spec/output_spec.rb
|
|
310
|
-
- tests/spec/psrp/fragment_spec.rb
|
|
311
|
-
- tests/spec/psrp/message_data/base_spec.rb
|
|
312
|
-
- tests/spec/psrp/message_data/error_record_spec.rb
|
|
313
|
-
- tests/spec/psrp/message_data/pipeline_host_call_spec.rb
|
|
314
|
-
- tests/spec/psrp/message_data/pipeline_output_spec.rb
|
|
315
|
-
- tests/spec/psrp/message_data/pipeline_state_spec.rb
|
|
316
|
-
- tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb
|
|
317
|
-
- tests/spec/psrp/message_data/runspacepool_state_spec.rb
|
|
318
|
-
- tests/spec/psrp/message_data/session_capability_spec.rb
|
|
319
|
-
- tests/spec/psrp/message_data_spec.rb
|
|
320
|
-
- tests/spec/psrp/message_defragmenter_spec.rb
|
|
321
|
-
- tests/spec/psrp/message_fragmenter_spec.rb
|
|
322
|
-
- tests/spec/psrp/powershell_output_decoder_spec.rb
|
|
323
|
-
- tests/spec/psrp/psrp_message_spec.rb
|
|
324
|
-
- tests/spec/psrp/recieve_response_reader_spec.rb
|
|
325
|
-
- tests/spec/psrp/uuid_spec.rb
|
|
326
|
-
- tests/spec/response_handler_spec.rb
|
|
327
|
-
- tests/spec/shells/base_spec.rb
|
|
328
|
-
- tests/spec/shells/cmd_spec.rb
|
|
329
|
-
- tests/spec/shells/powershell_spec.rb
|
|
330
|
-
- tests/spec/spec_helper.rb
|
|
331
|
-
- tests/spec/stubs/clixml/error_record.xml.erb
|
|
332
|
-
- tests/spec/stubs/clixml/pipeline_state.xml.erb
|
|
333
|
-
- tests/spec/stubs/responses/get_command_output_response.xml.erb
|
|
334
|
-
- tests/spec/stubs/responses/get_command_output_response_not_done.xml.erb
|
|
335
|
-
- tests/spec/stubs/responses/get_powershell_keepalive_response.xml.erb
|
|
336
|
-
- tests/spec/stubs/responses/get_powershell_output_response.xml.erb
|
|
337
|
-
- tests/spec/stubs/responses/get_powershell_output_response_not_done.xml.erb
|
|
338
|
-
- tests/spec/stubs/responses/open_shell_v1.xml
|
|
339
|
-
- tests/spec/stubs/responses/open_shell_v2.xml
|
|
340
|
-
- tests/spec/stubs/responses/soap_fault_v1.xml
|
|
341
|
-
- tests/spec/stubs/responses/soap_fault_v2.xml
|
|
342
|
-
- tests/spec/stubs/responses/wmi_error_v2.xml
|
|
343
|
-
- tests/spec/wsmv/cleanup_command_spec.rb
|
|
344
|
-
- tests/spec/wsmv/close_shell_spec.rb
|
|
345
|
-
- tests/spec/wsmv/command_output_decoder_spec.rb
|
|
346
|
-
- tests/spec/wsmv/command_output_spec.rb
|
|
347
|
-
- tests/spec/wsmv/command_spec.rb
|
|
348
|
-
- tests/spec/wsmv/configuration_spec.rb
|
|
349
|
-
- tests/spec/wsmv/create_pipeline_spec.rb
|
|
350
|
-
- tests/spec/wsmv/create_shell_spec.rb
|
|
351
|
-
- tests/spec/wsmv/init_runspace_pool_spec.rb
|
|
352
|
-
- tests/spec/wsmv/keep_alive_spec.rb
|
|
353
|
-
- tests/spec/wsmv/receive_response_reader_spec.rb
|
|
354
|
-
- tests/spec/wsmv/send_data_spec.rb
|
|
355
|
-
- tests/spec/wsmv/wql_query_spec.rb
|
|
356
|
-
- tests/spec/wsmv/write_stdin_spec.rb
|
|
357
|
-
- winrm.gemspec
|
|
358
305
|
homepage: https://github.com/WinRb/WinRM
|
|
359
306
|
licenses:
|
|
360
307
|
- Apache-2.0
|
|
@@ -371,15 +318,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
371
318
|
requirements:
|
|
372
319
|
- - ">="
|
|
373
320
|
- !ruby/object:Gem::Version
|
|
374
|
-
version:
|
|
321
|
+
version: 2.2.0
|
|
375
322
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
376
323
|
requirements:
|
|
377
324
|
- - ">="
|
|
378
325
|
- !ruby/object:Gem::Version
|
|
379
326
|
version: '0'
|
|
380
327
|
requirements: []
|
|
381
|
-
|
|
382
|
-
rubygems_version: 2.6.11
|
|
328
|
+
rubygems_version: 3.1.4
|
|
383
329
|
signing_key:
|
|
384
330
|
specification_version: 4
|
|
385
331
|
summary: Ruby library for Windows Remote Management
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
AllCops:
|
|
2
|
-
Exclude:
|
|
3
|
-
- 'appveyor.yml'
|
|
4
|
-
- 'Vagrantfile'
|
|
5
|
-
- 'scripts/**/*'
|
|
6
|
-
|
|
7
|
-
Style/Encoding:
|
|
8
|
-
Enabled: true
|
|
9
|
-
|
|
10
|
-
Style/NumericLiterals:
|
|
11
|
-
Enabled: false
|
|
12
|
-
|
|
13
|
-
Metrics/LineLength:
|
|
14
|
-
Max: 100
|
|
15
|
-
|
|
16
|
-
Metrics/MethodLength:
|
|
17
|
-
Max: 20
|
|
18
|
-
|
|
19
|
-
ModuleLength:
|
|
20
|
-
Max: 250
|
|
21
|
-
|
|
22
|
-
ClassLength:
|
|
23
|
-
Max: 250
|
|
24
|
-
|
|
25
|
-
Metrics/AbcSize:
|
|
26
|
-
Max: 25
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# encoding: UTF-8
|
|
2
|
-
require 'rubygems'
|
|
3
|
-
require 'bundler/setup'
|
|
4
|
-
require 'rspec/core/rake_task'
|
|
5
|
-
require 'rubocop/rake_task'
|
|
6
|
-
require 'bundler/gem_tasks'
|
|
7
|
-
|
|
8
|
-
# Change to the directory of this file.
|
|
9
|
-
Dir.chdir(File.expand_path('../', __FILE__))
|
|
10
|
-
|
|
11
|
-
desc 'Open a Pry console for this library'
|
|
12
|
-
task :console do
|
|
13
|
-
require 'pry'
|
|
14
|
-
require 'winrm'
|
|
15
|
-
ARGV.clear
|
|
16
|
-
Pry.start
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
RSpec::Core::RakeTask.new(:spec) do |task|
|
|
20
|
-
task.pattern = 'tests/spec/**/*_spec.rb'
|
|
21
|
-
task.rspec_opts = ['--color', '-f documentation', '-r ./tests/spec/spec_helper']
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# Run the integration test suite
|
|
25
|
-
RSpec::Core::RakeTask.new(:integration) do |task|
|
|
26
|
-
task.pattern = 'tests/integration/*_spec.rb'
|
|
27
|
-
task.rspec_opts = ['--color', '-f documentation', '-r ./tests/integration/spec_helper']
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
RuboCop::RakeTask.new
|
|
31
|
-
|
|
32
|
-
task default: [:spec, :rubocop]
|
|
33
|
-
|
|
34
|
-
task all: [:default, :integration]
|
data/Vagrantfile
DELETED
data/WinrmAppveyor.psm1
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
function New-ClientCertificate {
|
|
2
|
-
param([String]$username, [String]$basePath = ((Resolve-Path .).Path))
|
|
3
|
-
|
|
4
|
-
$env:OPENSSL_CONF=[System.IO.Path]::GetTempFileName()
|
|
5
|
-
|
|
6
|
-
Set-Content -Path $env:OPENSSL_CONF -Value @"
|
|
7
|
-
distinguished_name = req_distinguished_name
|
|
8
|
-
[req_distinguished_name]
|
|
9
|
-
[v3_req_client]
|
|
10
|
-
extendedKeyUsage = clientAuth
|
|
11
|
-
subjectAltName = otherName:1.3.6.1.4.1.311.20.2.3;UTF8:$username@localhost
|
|
12
|
-
"@
|
|
13
|
-
|
|
14
|
-
$user_path = Join-Path $basePath user.pem
|
|
15
|
-
$key_path = Join-Path $basePath key.pem
|
|
16
|
-
$pfx_path = Join-Path $basePath user.pfx
|
|
17
|
-
|
|
18
|
-
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out $user_path -outform PEM -keyout $key_path -subj "/CN=$username" -extensions v3_req_client 2>&1
|
|
19
|
-
|
|
20
|
-
openssl pkcs12 -export -in $user_path -inkey $key_path -out $pfx_path -passout pass: 2>&1
|
|
21
|
-
|
|
22
|
-
del $env:OPENSSL_CONF
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function New-WinrmUserCertificateMapping {
|
|
26
|
-
param([String]$issuer)
|
|
27
|
-
$secure_pass = ConvertTo-SecureString $env:winrm_password -AsPlainText -Force
|
|
28
|
-
$cred = New-Object System.Management.Automation.PSCredential ($env:winrm_user, $secure_pass)
|
|
29
|
-
New-Item -Path WSMan:\localhost\ClientCertificate -Subject "$env:winrm_user@localhost" -URI * -Issuer $issuer -Credential $cred -Force
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
Export-ModuleMember New-ClientCertificate, New-WinrmUserCertificateMapping
|
data/appveyor.yml
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
version: "master-{build}"
|
|
2
|
-
|
|
3
|
-
os: Windows Server 2012 R2
|
|
4
|
-
platform:
|
|
5
|
-
- x64
|
|
6
|
-
|
|
7
|
-
environment:
|
|
8
|
-
winrm_user: test_user
|
|
9
|
-
winrm_password: Pass@word1
|
|
10
|
-
user_cert: c:\projects\winrm\user.pem
|
|
11
|
-
user_key: c:\projects\winrm\key.pem
|
|
12
|
-
|
|
13
|
-
matrix:
|
|
14
|
-
- ruby_version: "21"
|
|
15
|
-
winrm_endpoint: http://localhost:5985/wsman
|
|
16
|
-
|
|
17
|
-
clone_folder: c:\projects\winrm
|
|
18
|
-
clone_depth: 1
|
|
19
|
-
branches:
|
|
20
|
-
only:
|
|
21
|
-
- master
|
|
22
|
-
|
|
23
|
-
install:
|
|
24
|
-
- ps: net user /add $env:winrm_user $env:winrm_password
|
|
25
|
-
- ps: net localgroup administrators $env:winrm_user /add
|
|
26
|
-
- ps: $env:PATH="C:\OpenSSL-Win64\bin;$env:PATH"
|
|
27
|
-
- ps: Import-Module c:\projects\winrm\WinrmAppveyor.psm1
|
|
28
|
-
- ps: New-ClientCertificate $env:winrm_user c:\projects\winrm
|
|
29
|
-
- ps: $env:user_cert_thumb = (Import-pfxCertificate -FilePath c:\projects\winrm\user.pfx -CertStoreLocation Cert:\LocalMachine\root).Thumbprint
|
|
30
|
-
- ps: Import-pfxCertificate -FilePath c:\projects\winrm\user.pfx -CertStoreLocation Cert:\LocalMachine\TrustedPeople
|
|
31
|
-
- ps: $env:winrm_cert = (New-SelfSignedCertificate -DnsName localhost -CertStoreLocation cert:\localmachine\my).Thumbprint
|
|
32
|
-
- ps: winrm create winrm/config/Listener?Address=*+Transport=HTTPS "@{Hostname=`"localhost`";CertificateThumbprint=`"$($env:winrm_cert)`"}"
|
|
33
|
-
- ps: winrm set winrm/config/client/auth '@{Basic="true"}'
|
|
34
|
-
- ps: winrm set winrm/config/service/auth '@{Basic="true"}'
|
|
35
|
-
- ps: winrm set winrm/config/service/auth '@{Certificate="true"}'
|
|
36
|
-
- ps: winrm set winrm/config/service/auth '@{CbtHardeningLevel="Strict"}'
|
|
37
|
-
- ps: winrm set winrm/config/service '@{AllowUnencrypted="true"}'
|
|
38
|
-
- ps: New-WinrmUserCertificateMapping $env:user_cert_thumb
|
|
39
|
-
- ps: $env:PATH="C:\Ruby$env:ruby_version\bin;$env:PATH"
|
|
40
|
-
- ps: Write-Host $env:PATH
|
|
41
|
-
- ps: ruby --version
|
|
42
|
-
- ps: gem --version
|
|
43
|
-
- ps: gem install bundler --quiet --no-ri --no-rdoc
|
|
44
|
-
- ps: bundler --version
|
|
45
|
-
|
|
46
|
-
build_script:
|
|
47
|
-
- bundle install || bundle install || bundle install
|
|
48
|
-
|
|
49
|
-
test_script:
|
|
50
|
-
- SET SPEC_OPTS=--format progress
|
|
51
|
-
- bundle exec rake integration
|
data/changelog.md
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# WinRM Gem Changelog
|
|
2
|
-
|
|
3
|
-
# 2.2.3
|
|
4
|
-
- Revert change made in 2.2.2 that retries network errors in Close and cleanup
|
|
5
|
-
|
|
6
|
-
# 2.2.2
|
|
7
|
-
- Update PSRP buffer size
|
|
8
|
-
- Close and cleanup should retry on error and never raise net errors
|
|
9
|
-
|
|
10
|
-
# 2.2.1
|
|
11
|
-
- Ignore error 2150858843 during shell closing
|
|
12
|
-
|
|
13
|
-
# 2.2.0
|
|
14
|
-
- Allow run_wql to accept custom namespace
|
|
15
|
-
- Allow enumeration of WQL result sets
|
|
16
|
-
|
|
17
|
-
# 2.1.3
|
|
18
|
-
- Ignore WSManFault 2150858843 during command cleanup
|
|
19
|
-
- Uns `Integer` in place of `Fixnum` to remove deprecation warnings in ruby 2.4
|
|
20
|
-
|
|
21
|
-
# 2.1.2
|
|
22
|
-
- Fix kerberos transport
|
|
23
|
-
|
|
24
|
-
# 2.1.1
|
|
25
|
-
- Fix rendering of powershell output with non ascii UTF-8 characters emitted from executables
|
|
26
|
-
|
|
27
|
-
# 2.1.0
|
|
28
|
-
- Expose shell options when creating a winrm shell
|
|
29
|
-
|
|
30
|
-
# 2.0.3
|
|
31
|
-
- Do not swallow exit codes from executables
|
|
32
|
-
|
|
33
|
-
# 2.0.2
|
|
34
|
-
- Constrain to rubyntlm `>= 0.6.1` to avoid mutating frozen strings
|
|
35
|
-
- When using certificate authentication, do not validate presense of user and password
|
|
36
|
-
- Handle failed `PIPELINE_STATE` messages so that `throw` errors are not swallowed
|
|
37
|
-
|
|
38
|
-
# 2.0.1
|
|
39
|
-
- Fixed Powershell shell leakage when not explicitly closed
|
|
40
|
-
- Fixed cmd commands with responses that extend beyond one stream
|
|
41
|
-
|
|
42
|
-
# 2.0.0
|
|
43
|
-
- Cleaned up API and implemented Powershell Remoting Protocol (PSRP) for all powershell calls.
|
|
44
|
-
|
|
45
|
-
# 1.8.1
|
|
46
|
-
- Http receive timeout should always be equal to 10 seconds greater than the winrm operation timeout and not default to one hour
|
|
47
|
-
|
|
48
|
-
# 1.8.0
|
|
49
|
-
- Add certificate authentication
|
|
50
|
-
|
|
51
|
-
# 1.7.3
|
|
52
|
-
- Open a new shell if the current shell has been deleted
|
|
53
|
-
|
|
54
|
-
# 1.7.2
|
|
55
|
-
- Fix regression where BOM appears in 2008R2 output and is not stripped
|
|
56
|
-
|
|
57
|
-
# 1.7.1
|
|
58
|
-
- Fix OS version comparisons for Windows 10 using `Gem::Version` instead of strings
|
|
59
|
-
|
|
60
|
-
# 1.7.0
|
|
61
|
-
- Bump rubyntlm gem to 0.6.0 to get channel binding support for HTTPS fixing connections to endoints with `CbtHardeningLevel` set to `Strict`
|
|
62
|
-
- Fix for parsing binary data in command output
|
|
63
|
-
|
|
64
|
-
# 1.6.1
|
|
65
|
-
- Use codepage 437 by default on os versions older than Windows 7 and Windows Server 2008 R2
|
|
66
|
-
|
|
67
|
-
# 1.6.0
|
|
68
|
-
- Adding `:negotiate` transport providing NTLM/Negotiate encryption of WinRM requests and responses
|
|
69
|
-
- Removed dependency on UUIDTools gem
|
|
70
|
-
- Extending accepted error codes for retry behavior to include `Errno::ETIMEDOUT`
|
|
71
|
-
- Correct deprecation warning for WinRMWebService.run_powershell_script
|
|
72
|
-
|
|
73
|
-
# 1.5.0
|
|
74
|
-
- Deprecating `WinRM::WinRMWebService` methods `cmd`, `run_cmd`, `powershell`, and `run_powershell_script` in favor of the `run_cmd` and `run_powershell_script` methods of the `WinRM::CommandExecutor` class. The `CommandExecutor` allows multiple commands to be run from the same WinRM shell providing a significant performance improvement when issuing multiple calls.
|
|
75
|
-
- Added an `:ssl_peer_fingerprint` option to be used instead of `:no_ssl_peer_verification` and allows a specific certificate to be verified.
|
|
76
|
-
- Opening a winrm shell is retriable with configurable delay and retry limit.
|
|
77
|
-
- Logging apends to `stdout` by default and can be replaced with a logger from a consuming application.
|
|
78
|
-
|
|
79
|
-
# 1.4.0
|
|
80
|
-
- Added WinRM::Version so the gem version is available at runtime for consumers.
|
|
81
|
-
|
|
82
|
-
# 1.3.6
|
|
83
|
-
- Remove BOM from response (Issue #159) added by Windows 2008R2
|
|
84
|
-
|
|
85
|
-
# 1.3.5
|
|
86
|
-
- Widen logging version constraints to include 2.0
|
|
87
|
-
- Use codepage 65001 (UTF-8)
|
|
88
|
-
|
|
89
|
-
# 1.3.4
|
|
90
|
-
- Relaxed version pins on dev dependencies
|
|
91
|
-
|
|
92
|
-
# 1.3.3
|
|
93
|
-
- Fixed issue 133, rwinrm allow hostnames with dashes
|
|
94
|
-
- Use duck typing for powershell script read
|
|
95
|
-
|
|
96
|
-
# 1.3.2
|
|
97
|
-
- Add spec.license attribute to gemspec
|
|
98
|
-
- Bump RSpec dependency 3.0 to 3.2
|
|
99
|
-
|
|
100
|
-
# 1.3.1
|
|
101
|
-
- Fixed issue 129, long running commands could cause a stackoverflow exception
|
|
102
|
-
- Fixed use of sub! in run_command results in spurious capture/replacement of \& sequences
|
|
103
|
-
- Fixed issue 124 rwinrm won't take '.' characters in username
|
|
104
|
-
|
|
105
|
-
# 1.3.0
|
|
106
|
-
- Fixed multiple issues with WinRMHTTPTransportError incorrectly being raised
|
|
107
|
-
- Refactored and added more unit and integration tests
|
|
108
|
-
- Added ability to write to stdin
|
|
109
|
-
- Added rwinrm binary to launch remote shell
|
|
110
|
-
- Added WINRM_LOG env var to set log level
|
|
111
|
-
- Retry Kerberos auth once if 401 response is received
|
|
112
|
-
- Remove Savon dependency and use newer versions of underlying dependencies
|
|
113
|
-
- Remove Nokogiri dependency and replace with native Ruby XML
|
|
114
|
-
- Fixed issue 85, ensure WQL response is not nil
|
|
115
|
-
- All WinRM library errors inherit from base class WinRMError
|
|
116
|
-
- Integrations tests should now pass on Windows Server 2008+
|
|
117
|
-
- Bump Ruby NTLM gem version dependency
|
|
118
|
-
- HTTP client receive timeout is now configurable via set_timeout
|
|
119
|
-
- Added backwards compatible Output class to make it easier to collect output
|
|
120
|
-
- Bumped gssapi dependency from 1.0 to 1.2 and fixed issue 54
|
|
121
|
-
- Added Rubocop to build
|
|
122
|
-
- Fixed error when commands contain a newline character
|
|
123
|
-
|
|
124
|
-
# 1.2.0
|
|
125
|
-
- Allow user to disable SSL peer ceritifcate validation #44
|
|
126
|
-
- Allow commands with "'" chars on Ruby 2.x, fixes #69
|
|
127
|
-
- Fixed uninitialized constant Module::Kconv in Ruby 2.x, fixes #65
|
|
128
|
-
- Commands with non-ASCII chars should work, #70
|