ruby_smb 1.1.0 → 2.0.0
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -4
- data/.travis.yml +3 -5
- data/Gemfile +6 -2
- data/examples/negotiate.rb +51 -8
- data/examples/read_file_encryption.rb +56 -0
- data/lib/ruby_smb.rb +4 -0
- data/lib/ruby_smb/client.rb +172 -16
- data/lib/ruby_smb/client/authentication.rb +27 -8
- data/lib/ruby_smb/client/encryption.rb +62 -0
- data/lib/ruby_smb/client/negotiation.rb +133 -12
- data/lib/ruby_smb/client/signing.rb +19 -0
- data/lib/ruby_smb/client/tree_connect.rb +4 -4
- data/lib/ruby_smb/client/utils.rb +8 -7
- data/lib/ruby_smb/crypto.rb +30 -0
- data/lib/ruby_smb/dispatcher/socket.rb +2 -2
- data/lib/ruby_smb/error.rb +28 -1
- data/lib/ruby_smb/smb1/commands.rb +1 -1
- data/lib/ruby_smb/smb1/file.rb +4 -4
- data/lib/ruby_smb/smb1/packet/session_setup_legacy_request.rb +1 -1
- data/lib/ruby_smb/smb1/packet/session_setup_legacy_response.rb +2 -2
- data/lib/ruby_smb/smb1/packet/session_setup_request.rb +1 -1
- data/lib/ruby_smb/smb1/packet/session_setup_response.rb +2 -2
- data/lib/ruby_smb/smb1/packet/write_andx_request.rb +1 -1
- data/lib/ruby_smb/smb1/pipe.rb +2 -2
- data/lib/ruby_smb/smb1/tree.rb +3 -3
- data/lib/ruby_smb/smb2/bit_field/session_flags.rb +2 -1
- data/lib/ruby_smb/smb2/bit_field/share_flags.rb +6 -4
- data/lib/ruby_smb/smb2/file.rb +25 -43
- data/lib/ruby_smb/smb2/negotiate_context.rb +108 -0
- data/lib/ruby_smb/smb2/packet.rb +2 -0
- data/lib/ruby_smb/smb2/packet/compression_transform_header.rb +41 -0
- data/lib/ruby_smb/smb2/packet/negotiate_request.rb +51 -14
- data/lib/ruby_smb/smb2/packet/negotiate_response.rb +49 -3
- data/lib/ruby_smb/smb2/packet/transform_header.rb +84 -0
- data/lib/ruby_smb/smb2/packet/tree_connect_request.rb +92 -6
- data/lib/ruby_smb/smb2/packet/tree_connect_response.rb +8 -26
- data/lib/ruby_smb/smb2/pipe.rb +3 -16
- data/lib/ruby_smb/smb2/smb2_header.rb +1 -1
- data/lib/ruby_smb/smb2/tree.rb +23 -17
- data/lib/ruby_smb/version.rb +1 -1
- data/ruby_smb.gemspec +3 -1
- data/spec/lib/ruby_smb/client_spec.rb +1256 -57
- data/spec/lib/ruby_smb/crypto_spec.rb +25 -0
- data/spec/lib/ruby_smb/error_spec.rb +59 -0
- data/spec/lib/ruby_smb/smb1/packet/session_setup_legacy_request_spec.rb +2 -2
- data/spec/lib/ruby_smb/smb1/packet/session_setup_legacy_response_spec.rb +2 -2
- data/spec/lib/ruby_smb/smb1/packet/session_setup_request_spec.rb +2 -2
- data/spec/lib/ruby_smb/smb1/packet/session_setup_response_spec.rb +1 -1
- data/spec/lib/ruby_smb/smb2/bit_field/session_flags_spec.rb +9 -0
- data/spec/lib/ruby_smb/smb2/bit_field/share_flags_spec.rb +27 -0
- data/spec/lib/ruby_smb/smb2/file_spec.rb +86 -62
- data/spec/lib/ruby_smb/smb2/negotiate_context_spec.rb +332 -0
- data/spec/lib/ruby_smb/smb2/packet/compression_transform_header_spec.rb +108 -0
- data/spec/lib/ruby_smb/smb2/packet/negotiate_request_spec.rb +138 -3
- data/spec/lib/ruby_smb/smb2/packet/negotiate_response_spec.rb +120 -2
- data/spec/lib/ruby_smb/smb2/packet/transform_header_spec.rb +220 -0
- data/spec/lib/ruby_smb/smb2/packet/tree_connect_request_spec.rb +339 -9
- data/spec/lib/ruby_smb/smb2/packet/tree_connect_response_spec.rb +3 -30
- data/spec/lib/ruby_smb/smb2/pipe_spec.rb +0 -40
- data/spec/lib/ruby_smb/smb2/smb2_header_spec.rb +2 -2
- data/spec/lib/ruby_smb/smb2/tree_spec.rb +53 -8
- metadata +124 -75
- metadata.gz.sig +0 -0
@@ -30,35 +30,8 @@ RSpec.describe RubySMB::SMB2::Packet::TreeConnectResponse do
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
expect(packet.is_directory?).to be true
|
37
|
-
end
|
38
|
-
|
39
|
-
it 'returns false if #share_type is not 0x01' do
|
40
|
-
packet.share_type = 0x02
|
41
|
-
expect(packet.is_directory?).to be false
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe '#access_rights' do
|
46
|
-
it 'is a DirectoryAccessMask if the Tree is a directory' do
|
47
|
-
allow(packet).to receive(:is_directory?).and_return(true)
|
48
|
-
expect(packet.access_rights).to be_a RubySMB::SMB2::BitField::DirectoryAccessMask
|
49
|
-
end
|
50
|
-
|
51
|
-
it 'is a FileAccessMask if the Tree is not a directory' do
|
52
|
-
allow(packet).to receive(:is_directory?).and_return(false)
|
53
|
-
expect(packet.access_rights).to be_a RubySMB::SMB2::BitField::FileAccessMask
|
54
|
-
end
|
55
|
-
|
56
|
-
context 'when it is not a valid FileAccessMask' do
|
57
|
-
it 'raises an InvalidBitField exception' do
|
58
|
-
allow(packet).to receive(:is_directory?).and_return(false)
|
59
|
-
allow(RubySMB::SMB2::BitField::FileAccessMask).to receive(:read).and_raise(IOError)
|
60
|
-
expect { packet.access_rights }.to raise_error(RubySMB::Error::InvalidBitField)
|
61
|
-
end
|
62
|
-
end
|
33
|
+
it 'reads binary data as expected' do
|
34
|
+
data = described_class.new
|
35
|
+
expect(described_class.read(data.to_binary_s)).to eq(data)
|
63
36
|
end
|
64
37
|
end
|
@@ -261,46 +261,6 @@ RSpec.describe RubySMB::SMB2::Pipe do
|
|
261
261
|
end
|
262
262
|
end
|
263
263
|
|
264
|
-
context 'when the response status code is STATUS_PENDING' do
|
265
|
-
let(:ioctl_raw_response2) { double('IOCTL raw response #2') }
|
266
|
-
let(:ioctl_response2) { double('IOCTL response #2') }
|
267
|
-
before :example do
|
268
|
-
allow(ioctl_response).to receive(:status_code).and_return(WindowsError::NTStatus::STATUS_PENDING)
|
269
|
-
allow(pipe).to receive(:sleep)
|
270
|
-
allow(dispatcher).to receive(:recv_packet).and_return(ioctl_raw_response2)
|
271
|
-
allow(RubySMB::SMB2::Packet::IoctlResponse).to receive(:read).with(ioctl_raw_response2).and_return(ioctl_response2)
|
272
|
-
allow(ioctl_response2).to receive_messages(
|
273
|
-
:valid? => true,
|
274
|
-
:output_data => raw_data,
|
275
|
-
:status_code => WindowsError::NTStatus::STATUS_SUCCESS
|
276
|
-
)
|
277
|
-
end
|
278
|
-
|
279
|
-
it 'waits 1 second' do
|
280
|
-
pipe.ioctl_send_recv(dcerpc_request, options)
|
281
|
-
expect(pipe).to have_received(:sleep).with(1)
|
282
|
-
end
|
283
|
-
|
284
|
-
it 'calls dispatcher #recv_packet' do
|
285
|
-
pipe.ioctl_send_recv(dcerpc_request, options)
|
286
|
-
expect(dispatcher).to have_received(:recv_packet)
|
287
|
-
end
|
288
|
-
|
289
|
-
it 'creates an IoctlResponse packet from the response' do
|
290
|
-
pipe.ioctl_send_recv(dcerpc_request, options)
|
291
|
-
expect(RubySMB::SMB2::Packet::IoctlResponse).to have_received(:read).with(ioctl_raw_response2)
|
292
|
-
end
|
293
|
-
|
294
|
-
context 'when the response is not an IoctlResponse packet' do
|
295
|
-
it 'raises an InvalidPacket exception' do
|
296
|
-
allow(ioctl_response2).to receive_message_chain(:smb2_header, :protocol)
|
297
|
-
allow(ioctl_response2).to receive_message_chain(:smb2_header, :command)
|
298
|
-
allow(ioctl_response2).to receive(:valid?).and_return(false)
|
299
|
-
expect { pipe.ioctl_send_recv(dcerpc_request, options) }.to raise_error(RubySMB::Error::InvalidPacket)
|
300
|
-
end
|
301
|
-
end
|
302
|
-
end
|
303
|
-
|
304
264
|
context 'when the response status code is not STATUS_SUCCESS or STATUS_BUFFER_OVERFLOW' do
|
305
265
|
it 'raises an UnexpectedStatusCode exception' do
|
306
266
|
allow(ioctl_response).to receive(:status_code).and_return(WindowsError::NTStatus::STATUS_INVALID_HANDLE)
|
@@ -44,8 +44,8 @@ RSpec.describe RubySMB::SMB2::SMB2Header do
|
|
44
44
|
expect(header.credit_charge).to be_a BinData::Uint16le
|
45
45
|
end
|
46
46
|
|
47
|
-
it 'has a default value of
|
48
|
-
expect(header.credit_charge).to eq
|
47
|
+
it 'has a default value of 1' do
|
48
|
+
expect(header.credit_charge).to eq 1
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -26,6 +26,7 @@ RSpec.describe RubySMB::SMB2::Tree do
|
|
26
26
|
it { is_expected.to respond_to :permissions }
|
27
27
|
it { is_expected.to respond_to :share }
|
28
28
|
it { is_expected.to respond_to :id }
|
29
|
+
it { is_expected.to respond_to :encryption_required }
|
29
30
|
|
30
31
|
it 'inherits the client that spawned it' do
|
31
32
|
expect(tree.client).to eq client
|
@@ -44,7 +45,14 @@ RSpec.describe RubySMB::SMB2::Tree do
|
|
44
45
|
allow(RubySMB::SMB2::Packet::TreeDisconnectRequest).to receive(:new).and_return(disco_req)
|
45
46
|
modified_req = disco_req
|
46
47
|
modified_req.smb2_header.tree_id = tree.id
|
47
|
-
expect(client).to receive(:send_recv).with(modified_req).and_return(disco_resp.to_binary_s)
|
48
|
+
expect(client).to receive(:send_recv).with(modified_req, encrypt: false).and_return(disco_resp.to_binary_s)
|
49
|
+
tree.disconnect!
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'calls Client #send_recv with encryption set if required' do
|
53
|
+
allow(tree).to receive(:set_header_fields).and_return(disco_req)
|
54
|
+
tree.encryption_required = true
|
55
|
+
expect(client).to receive(:send_recv).with(disco_req, encrypt: true).and_return(disco_resp.to_binary_s)
|
48
56
|
tree.disconnect!
|
49
57
|
end
|
50
58
|
|
@@ -133,7 +141,14 @@ RSpec.describe RubySMB::SMB2::Tree do
|
|
133
141
|
|
134
142
|
it 'sends the create request packet and gets a response back' do
|
135
143
|
allow(tree).to receive(:open_directory_packet).and_return(create_req)
|
136
|
-
expect(client).to receive(:send_recv).with(create_req).and_return(create_response.to_binary_s)
|
144
|
+
expect(client).to receive(:send_recv).with(create_req, encrypt: false).and_return(create_response.to_binary_s)
|
145
|
+
tree.open_directory
|
146
|
+
end
|
147
|
+
|
148
|
+
it 'calls Client #send_recv with encryption set if required' do
|
149
|
+
allow(tree).to receive(:open_directory_packet).and_return(create_req)
|
150
|
+
tree.encryption_required = true
|
151
|
+
expect(client).to receive(:send_recv).with(create_req, encrypt: true).and_return(create_response.to_binary_s)
|
137
152
|
tree.open_directory
|
138
153
|
end
|
139
154
|
|
@@ -206,6 +221,19 @@ RSpec.describe RubySMB::SMB2::Tree do
|
|
206
221
|
tree.list
|
207
222
|
end
|
208
223
|
|
224
|
+
it 'sends the expected packet and reads the response' do
|
225
|
+
allow(tree).to receive(:set_header_fields).and_return(query_dir_req)
|
226
|
+
expect(client).to receive(:send_recv).with(query_dir_req, encrypt: false)
|
227
|
+
tree.list
|
228
|
+
end
|
229
|
+
|
230
|
+
it 'calls Client #send_recv with encryption set if required' do
|
231
|
+
allow(tree).to receive(:set_header_fields).and_return(query_dir_req)
|
232
|
+
tree.encryption_required = true
|
233
|
+
expect(client).to receive(:send_recv).with(query_dir_req, encrypt: true)
|
234
|
+
tree.list
|
235
|
+
end
|
236
|
+
|
209
237
|
let(:file1) { double('file information') }
|
210
238
|
let(:file2) { double('file information') }
|
211
239
|
|
@@ -404,20 +432,37 @@ RSpec.describe RubySMB::SMB2::Tree do
|
|
404
432
|
end
|
405
433
|
|
406
434
|
it 'sends the CreateRequest request packet and gets the expected CreateResponse response back' do
|
407
|
-
expect(client).to receive(:send_recv).with(create_request).and_return(create_response.to_binary_s)
|
435
|
+
expect(client).to receive(:send_recv).with(create_request, encrypt: false).and_return(create_response.to_binary_s)
|
436
|
+
tree.open_file(filename: filename)
|
437
|
+
end
|
438
|
+
|
439
|
+
it 'calls Client #send_recv with encryption set if required' do
|
440
|
+
tree.encryption_required = true
|
441
|
+
expect(client).to receive(:send_recv).with(create_request, encrypt: true).and_return(create_response.to_binary_s)
|
408
442
|
tree.open_file(filename: filename)
|
409
443
|
end
|
410
444
|
|
411
445
|
context 'when sending the request packet and gets a response back' do
|
412
446
|
before :example do
|
413
|
-
allow(client).to receive(:send_recv).
|
447
|
+
allow(client).to receive(:send_recv).and_return(create_response.to_binary_s)
|
414
448
|
end
|
415
449
|
|
416
450
|
context 'when it is a file' do
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
451
|
+
context 'when encryption is not required' do
|
452
|
+
it 'returns the expected RubySMB::SMB2::File object' do
|
453
|
+
file_obj = RubySMB::SMB2::File.new(name: filename, tree: tree, response: create_response, encrypt: false)
|
454
|
+
expect(RubySMB::SMB2::File).to receive(:new).with(name: filename, tree: tree, response: create_response, encrypt: false).and_return(file_obj)
|
455
|
+
expect(tree.open_file(filename: filename)).to eq(file_obj)
|
456
|
+
end
|
457
|
+
end
|
458
|
+
|
459
|
+
context 'when encryption is required' do
|
460
|
+
it 'returns the expected RubySMB::SMB2::File object' do
|
461
|
+
file_obj = RubySMB::SMB2::File.new(name: filename, tree: tree, response: create_response, encrypt: true)
|
462
|
+
tree.encryption_required = true
|
463
|
+
expect(RubySMB::SMB2::File).to receive(:new).with(name: filename, tree: tree, response: create_response, encrypt: true).and_return(file_obj)
|
464
|
+
expect(tree.open_file(filename: filename)).to eq(file_obj)
|
465
|
+
end
|
421
466
|
end
|
422
467
|
end
|
423
468
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_smb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -14,85 +14,90 @@ bindir: bin
|
|
14
14
|
cert_chain:
|
15
15
|
- |
|
16
16
|
-----BEGIN CERTIFICATE-----
|
17
|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HR0cDov
|
86
|
+
L2NybDMuZGlnaWNlcnQuY29tL3NoYTItYXNzdXJlZC1jcy1nMS5jcmwwNaAzoDGG
|
87
|
+
L2h0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9zaGEyLWFzc3VyZWQtY3MtZzEuY3Js
|
88
|
+
MEwGA1UdIARFMEMwNwYJYIZIAYb9bAMBMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8v
|
89
|
+
d3d3LmRpZ2ljZXJ0LmNvbS9DUFMwCAYGZ4EMAQQBMIGEBggrBgEFBQcBAQR4MHYw
|
90
|
+
JAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBOBggrBgEFBQcw
|
91
|
+
AoZCaHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0U0hBMkFzc3Vy
|
92
|
+
ZWRJRENvZGVTaWduaW5nQ0EuY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEL
|
93
|
+
BQADggEBAFpzR9s7lcYKDzSJucOHztEPj+iSIeCzxEw34NTE9M2AfkYIu82c4r2a
|
94
|
+
bzIGmzZWiCGufjOp0gF5xW6sSSJ9n0TqH0nhHhvjtZQkmkGtOBbN1zeYDFS2ozAp
|
95
|
+
sljF/g68Y1eYs3NaFf7kQUa6vb6RdjW3J8M9AQ8gthBt7gr/guVxd/gJUYbdDdBX
|
96
|
+
cWfJJi/X7GVBOBmmvA43qoKideuhOBrVGBHvIF/yO9p23dIiUrGmW9kxXCSxgute
|
97
|
+
JI/W23RbIRksG2pioMhd4dCXq3FLLlkOV1YfCwWixNB+iIhQPPZVaPNfgPhCn4Dt
|
98
|
+
DeGjje/qA4fkLtRmOtb9PUBq3ToRDE4=
|
94
99
|
-----END CERTIFICATE-----
|
95
|
-
date:
|
100
|
+
date: 2020-06-09 00:00:00.000000000 Z
|
96
101
|
dependencies:
|
97
102
|
- !ruby/object:Gem::Dependency
|
98
103
|
name: redcarpet
|
@@ -206,6 +211,34 @@ dependencies:
|
|
206
211
|
- - ">="
|
207
212
|
- !ruby/object:Gem::Version
|
208
213
|
version: '0'
|
214
|
+
- !ruby/object:Gem::Dependency
|
215
|
+
name: openssl-ccm
|
216
|
+
requirement: !ruby/object:Gem::Requirement
|
217
|
+
requirements:
|
218
|
+
- - ">="
|
219
|
+
- !ruby/object:Gem::Version
|
220
|
+
version: '0'
|
221
|
+
type: :runtime
|
222
|
+
prerelease: false
|
223
|
+
version_requirements: !ruby/object:Gem::Requirement
|
224
|
+
requirements:
|
225
|
+
- - ">="
|
226
|
+
- !ruby/object:Gem::Version
|
227
|
+
version: '0'
|
228
|
+
- !ruby/object:Gem::Dependency
|
229
|
+
name: openssl-cmac
|
230
|
+
requirement: !ruby/object:Gem::Requirement
|
231
|
+
requirements:
|
232
|
+
- - ">="
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: '0'
|
235
|
+
type: :runtime
|
236
|
+
prerelease: false
|
237
|
+
version_requirements: !ruby/object:Gem::Requirement
|
238
|
+
requirements:
|
239
|
+
- - ">="
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
version: '0'
|
209
242
|
description: ''
|
210
243
|
email:
|
211
244
|
- msfdev@metasploit.com
|
@@ -235,6 +268,7 @@ files:
|
|
235
268
|
- examples/net_share_enum_all.rb
|
236
269
|
- examples/pipes.rb
|
237
270
|
- examples/read_file.rb
|
271
|
+
- examples/read_file_encryption.rb
|
238
272
|
- examples/read_registry_key_value.rb
|
239
273
|
- examples/rename_file.rb
|
240
274
|
- examples/tree_connect.rb
|
@@ -243,11 +277,13 @@ files:
|
|
243
277
|
- lib/ruby_smb/client.rb
|
244
278
|
- lib/ruby_smb/client/authentication.rb
|
245
279
|
- lib/ruby_smb/client/echo.rb
|
280
|
+
- lib/ruby_smb/client/encryption.rb
|
246
281
|
- lib/ruby_smb/client/negotiation.rb
|
247
282
|
- lib/ruby_smb/client/signing.rb
|
248
283
|
- lib/ruby_smb/client/tree_connect.rb
|
249
284
|
- lib/ruby_smb/client/utils.rb
|
250
285
|
- lib/ruby_smb/client/winreg.rb
|
286
|
+
- lib/ruby_smb/crypto.rb
|
251
287
|
- lib/ruby_smb/dcerpc.rb
|
252
288
|
- lib/ruby_smb/dcerpc/bind.rb
|
253
289
|
- lib/ruby_smb/dcerpc/bind_ack.rb
|
@@ -422,9 +458,11 @@ files:
|
|
422
458
|
- lib/ruby_smb/smb2/create_context.rb
|
423
459
|
- lib/ruby_smb/smb2/file.rb
|
424
460
|
- lib/ruby_smb/smb2/info_type.rb
|
461
|
+
- lib/ruby_smb/smb2/negotiate_context.rb
|
425
462
|
- lib/ruby_smb/smb2/packet.rb
|
426
463
|
- lib/ruby_smb/smb2/packet/close_request.rb
|
427
464
|
- lib/ruby_smb/smb2/packet/close_response.rb
|
465
|
+
- lib/ruby_smb/smb2/packet/compression_transform_header.rb
|
428
466
|
- lib/ruby_smb/smb2/packet/create_request.rb
|
429
467
|
- lib/ruby_smb/smb2/packet/create_response.rb
|
430
468
|
- lib/ruby_smb/smb2/packet/echo_request.rb
|
@@ -444,6 +482,7 @@ files:
|
|
444
482
|
- lib/ruby_smb/smb2/packet/session_setup_response.rb
|
445
483
|
- lib/ruby_smb/smb2/packet/set_info_request.rb
|
446
484
|
- lib/ruby_smb/smb2/packet/set_info_response.rb
|
485
|
+
- lib/ruby_smb/smb2/packet/transform_header.rb
|
447
486
|
- lib/ruby_smb/smb2/packet/tree_connect_request.rb
|
448
487
|
- lib/ruby_smb/smb2/packet/tree_connect_response.rb
|
449
488
|
- lib/ruby_smb/smb2/packet/tree_disconnect_request.rb
|
@@ -456,6 +495,7 @@ files:
|
|
456
495
|
- lib/ruby_smb/version.rb
|
457
496
|
- ruby_smb.gemspec
|
458
497
|
- spec/lib/ruby_smb/client_spec.rb
|
498
|
+
- spec/lib/ruby_smb/crypto_spec.rb
|
459
499
|
- spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb
|
460
500
|
- spec/lib/ruby_smb/dcerpc/bind_spec.rb
|
461
501
|
- spec/lib/ruby_smb/dcerpc/ndr_spec.rb
|
@@ -486,6 +526,7 @@ files:
|
|
486
526
|
- spec/lib/ruby_smb/dcerpc_spec.rb
|
487
527
|
- spec/lib/ruby_smb/dispatcher/base_spec.rb
|
488
528
|
- spec/lib/ruby_smb/dispatcher/socket_spec.rb
|
529
|
+
- spec/lib/ruby_smb/error_spec.rb
|
489
530
|
- spec/lib/ruby_smb/field/extended_attribute_flag_spec.rb
|
490
531
|
- spec/lib/ruby_smb/field/file_time_spec.rb
|
491
532
|
- spec/lib/ruby_smb/field/nt_status_spec.rb
|
@@ -597,8 +638,10 @@ files:
|
|
597
638
|
- spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
|
598
639
|
- spec/lib/ruby_smb/smb2/create_context_spec.rb
|
599
640
|
- spec/lib/ruby_smb/smb2/file_spec.rb
|
641
|
+
- spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
|
600
642
|
- spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
|
601
643
|
- spec/lib/ruby_smb/smb2/packet/close_response_spec.rb
|
644
|
+
- spec/lib/ruby_smb/smb2/packet/compression_transform_header_spec.rb
|
602
645
|
- spec/lib/ruby_smb/smb2/packet/create_request_spec.rb
|
603
646
|
- spec/lib/ruby_smb/smb2/packet/create_response_spec.rb
|
604
647
|
- spec/lib/ruby_smb/smb2/packet/echo_request_spec.rb
|
@@ -617,6 +660,7 @@ files:
|
|
617
660
|
- spec/lib/ruby_smb/smb2/packet/session_setup_response_spec.rb
|
618
661
|
- spec/lib/ruby_smb/smb2/packet/set_info_request_spec.rb
|
619
662
|
- spec/lib/ruby_smb/smb2/packet/set_info_response_spec.rb
|
663
|
+
- spec/lib/ruby_smb/smb2/packet/transform_header_spec.rb
|
620
664
|
- spec/lib/ruby_smb/smb2/packet/tree_connect_request_spec.rb
|
621
665
|
- spec/lib/ruby_smb/smb2/packet/tree_connect_response_spec.rb
|
622
666
|
- spec/lib/ruby_smb/smb2/packet/tree_disconnect_request_spec.rb
|
@@ -642,7 +686,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
642
686
|
requirements:
|
643
687
|
- - ">="
|
644
688
|
- !ruby/object:Gem::Version
|
645
|
-
version: 2.
|
689
|
+
version: '2.5'
|
646
690
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
647
691
|
requirements:
|
648
692
|
- - ">="
|
@@ -650,12 +694,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
650
694
|
version: '0'
|
651
695
|
requirements: []
|
652
696
|
rubyforge_project:
|
653
|
-
rubygems_version: 2.
|
697
|
+
rubygems_version: 2.7.10
|
654
698
|
signing_key:
|
655
699
|
specification_version: 4
|
656
700
|
summary: A pure Ruby implementation of the SMB Protocol Family
|
657
701
|
test_files:
|
658
702
|
- spec/lib/ruby_smb/client_spec.rb
|
703
|
+
- spec/lib/ruby_smb/crypto_spec.rb
|
659
704
|
- spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb
|
660
705
|
- spec/lib/ruby_smb/dcerpc/bind_spec.rb
|
661
706
|
- spec/lib/ruby_smb/dcerpc/ndr_spec.rb
|
@@ -686,6 +731,7 @@ test_files:
|
|
686
731
|
- spec/lib/ruby_smb/dcerpc_spec.rb
|
687
732
|
- spec/lib/ruby_smb/dispatcher/base_spec.rb
|
688
733
|
- spec/lib/ruby_smb/dispatcher/socket_spec.rb
|
734
|
+
- spec/lib/ruby_smb/error_spec.rb
|
689
735
|
- spec/lib/ruby_smb/field/extended_attribute_flag_spec.rb
|
690
736
|
- spec/lib/ruby_smb/field/file_time_spec.rb
|
691
737
|
- spec/lib/ruby_smb/field/nt_status_spec.rb
|
@@ -797,8 +843,10 @@ test_files:
|
|
797
843
|
- spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
|
798
844
|
- spec/lib/ruby_smb/smb2/create_context_spec.rb
|
799
845
|
- spec/lib/ruby_smb/smb2/file_spec.rb
|
846
|
+
- spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
|
800
847
|
- spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
|
801
848
|
- spec/lib/ruby_smb/smb2/packet/close_response_spec.rb
|
849
|
+
- spec/lib/ruby_smb/smb2/packet/compression_transform_header_spec.rb
|
802
850
|
- spec/lib/ruby_smb/smb2/packet/create_request_spec.rb
|
803
851
|
- spec/lib/ruby_smb/smb2/packet/create_response_spec.rb
|
804
852
|
- spec/lib/ruby_smb/smb2/packet/echo_request_spec.rb
|
@@ -817,6 +865,7 @@ test_files:
|
|
817
865
|
- spec/lib/ruby_smb/smb2/packet/session_setup_response_spec.rb
|
818
866
|
- spec/lib/ruby_smb/smb2/packet/set_info_request_spec.rb
|
819
867
|
- spec/lib/ruby_smb/smb2/packet/set_info_response_spec.rb
|
868
|
+
- spec/lib/ruby_smb/smb2/packet/transform_header_spec.rb
|
820
869
|
- spec/lib/ruby_smb/smb2/packet/tree_connect_request_spec.rb
|
821
870
|
- spec/lib/ruby_smb/smb2/packet/tree_connect_response_spec.rb
|
822
871
|
- spec/lib/ruby_smb/smb2/packet/tree_disconnect_request_spec.rb
|