ruby_smb 1.0.5 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.travis.yml +3 -2
- data/Gemfile +6 -2
- data/README.md +35 -47
- data/examples/anonymous_auth.rb +3 -3
- data/examples/append_file.rb +10 -8
- data/examples/authenticate.rb +9 -5
- data/examples/delete_file.rb +8 -6
- data/examples/enum_registry_key.rb +29 -0
- data/examples/enum_registry_values.rb +31 -0
- data/examples/list_directory.rb +8 -6
- data/examples/negotiate.rb +51 -8
- data/examples/negotiate_with_netbios_service.rb +9 -5
- data/examples/net_share_enum_all.rb +6 -4
- data/examples/pipes.rb +13 -13
- data/examples/query_service_status.rb +64 -0
- data/examples/read_file.rb +8 -6
- data/examples/read_file_encryption.rb +56 -0
- data/examples/read_registry_key_value.rb +33 -0
- data/examples/rename_file.rb +9 -7
- data/examples/tree_connect.rb +7 -5
- data/examples/write_file.rb +9 -7
- data/lib/ruby_smb.rb +4 -1
- data/lib/ruby_smb/client.rb +239 -21
- 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 +154 -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/client/winreg.rb +46 -0
- data/lib/ruby_smb/crypto.rb +30 -0
- data/lib/ruby_smb/dcerpc.rb +40 -0
- data/lib/ruby_smb/dcerpc/bind.rb +2 -2
- data/lib/ruby_smb/dcerpc/bind_ack.rb +2 -2
- data/lib/ruby_smb/dcerpc/error.rb +6 -0
- data/lib/ruby_smb/dcerpc/ndr.rb +260 -16
- data/lib/ruby_smb/dcerpc/pdu_header.rb +1 -1
- data/lib/ruby_smb/dcerpc/request.rb +41 -9
- data/lib/ruby_smb/dcerpc/rpc_security_attributes.rb +34 -0
- data/lib/ruby_smb/dcerpc/rrp_unicode_string.rb +38 -0
- data/lib/ruby_smb/dcerpc/srvsvc.rb +10 -0
- data/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all.rb +9 -0
- data/lib/ruby_smb/dcerpc/svcctl.rb +479 -0
- data/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request.rb +48 -0
- data/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_response.rb +26 -0
- data/lib/ruby_smb/dcerpc/svcctl/close_service_handle_request.rb +25 -0
- data/lib/ruby_smb/dcerpc/svcctl/close_service_handle_response.rb +26 -0
- data/lib/ruby_smb/dcerpc/svcctl/control_service_request.rb +26 -0
- data/lib/ruby_smb/dcerpc/svcctl/control_service_response.rb +26 -0
- data/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request.rb +35 -0
- data/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_response.rb +23 -0
- data/lib/ruby_smb/dcerpc/svcctl/open_service_w_request.rb +31 -0
- data/lib/ruby_smb/dcerpc/svcctl/open_service_w_response.rb +23 -0
- data/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_request.rb +25 -0
- data/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_response.rb +44 -0
- data/lib/ruby_smb/dcerpc/svcctl/query_service_status_request.rb +23 -0
- data/lib/ruby_smb/dcerpc/svcctl/query_service_status_response.rb +27 -0
- data/lib/ruby_smb/dcerpc/svcctl/service_status.rb +25 -0
- data/lib/ruby_smb/dcerpc/svcctl/start_service_w_request.rb +27 -0
- data/lib/ruby_smb/dcerpc/svcctl/start_service_w_response.rb +25 -0
- data/lib/ruby_smb/dcerpc/winreg.rb +421 -0
- data/lib/ruby_smb/dcerpc/winreg/close_key_request.rb +24 -0
- data/lib/ruby_smb/dcerpc/winreg/close_key_response.rb +27 -0
- data/lib/ruby_smb/dcerpc/winreg/create_key_request.rb +73 -0
- data/lib/ruby_smb/dcerpc/winreg/create_key_response.rb +36 -0
- data/lib/ruby_smb/dcerpc/winreg/enum_key_request.rb +45 -0
- data/lib/ruby_smb/dcerpc/winreg/enum_key_response.rb +42 -0
- data/lib/ruby_smb/dcerpc/winreg/enum_value_request.rb +39 -0
- data/lib/ruby_smb/dcerpc/winreg/enum_value_response.rb +36 -0
- data/lib/ruby_smb/dcerpc/winreg/open_key_request.rb +34 -0
- data/lib/ruby_smb/dcerpc/winreg/open_key_response.rb +25 -0
- data/lib/ruby_smb/dcerpc/winreg/open_root_key_request.rb +43 -0
- data/lib/ruby_smb/dcerpc/winreg/open_root_key_response.rb +35 -0
- data/lib/ruby_smb/dcerpc/winreg/query_info_key_request.rb +27 -0
- data/lib/ruby_smb/dcerpc/winreg/query_info_key_response.rb +40 -0
- data/lib/ruby_smb/dcerpc/winreg/query_value_request.rb +40 -0
- data/lib/ruby_smb/dcerpc/winreg/query_value_response.rb +57 -0
- data/lib/ruby_smb/dcerpc/winreg/regsam.rb +40 -0
- data/lib/ruby_smb/dcerpc/winreg/save_key_request.rb +37 -0
- data/lib/ruby_smb/dcerpc/winreg/save_key_response.rb +23 -0
- data/lib/ruby_smb/dispatcher/base.rb +1 -1
- data/lib/ruby_smb/dispatcher/socket.rb +5 -4
- data/lib/ruby_smb/error.rb +28 -1
- data/lib/ruby_smb/field/stringz16.rb +17 -1
- data/lib/ruby_smb/nbss/session_header.rb +4 -4
- data/lib/ruby_smb/smb1/commands.rb +1 -1
- data/lib/ruby_smb/smb1/file.rb +8 -14
- 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 +81 -3
- data/lib/ruby_smb/smb1/tree.rb +12 -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 +51 -61
- 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/error_packet.rb +2 -4
- data/lib/ruby_smb/smb2/packet/negotiate_request.rb +51 -14
- data/lib/ruby_smb/smb2/packet/negotiate_response.rb +50 -4
- 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 +80 -3
- data/lib/ruby_smb/smb2/smb2_header.rb +1 -1
- data/lib/ruby_smb/smb2/tree.rb +32 -20
- data/lib/ruby_smb/version.rb +1 -1
- data/ruby_smb.gemspec +5 -3
- data/spec/lib/ruby_smb/client_spec.rb +1583 -102
- data/spec/lib/ruby_smb/crypto_spec.rb +25 -0
- data/spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/bind_spec.rb +2 -2
- data/spec/lib/ruby_smb/dcerpc/ndr_spec.rb +1729 -0
- data/spec/lib/ruby_smb/dcerpc/request_spec.rb +50 -7
- data/spec/lib/ruby_smb/dcerpc/rpc_security_attributes_spec.rb +161 -0
- data/spec/lib/ruby_smb/dcerpc/rrp_unicode_string_spec.rb +135 -0
- data/spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb +13 -0
- data/spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb +60 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request_spec.rb +191 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_response_spec.rb +38 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/close_service_handle_request_spec.rb +30 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/close_service_handle_response_spec.rb +38 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/control_service_request_spec.rb +39 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/control_service_response_spec.rb +38 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request_spec.rb +78 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_response_spec.rb +38 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/open_service_w_request_spec.rb +59 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/open_service_w_response_spec.rb +38 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_request_spec.rb +38 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_response_spec.rb +152 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/query_service_status_request_spec.rb +30 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/query_service_status_response_spec.rb +38 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/service_status_spec.rb +72 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/start_service_w_request_spec.rb +46 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl/start_service_w_response_spec.rb +30 -0
- data/spec/lib/ruby_smb/dcerpc/svcctl_spec.rb +512 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/close_key_request_spec.rb +28 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/close_key_response_spec.rb +36 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/create_key_request_spec.rb +110 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/create_key_response_spec.rb +44 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/enum_key_request_spec.rb +104 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/enum_key_response_spec.rb +97 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/enum_value_request_spec.rb +94 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/enum_value_response_spec.rb +82 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/open_key_request_spec.rb +74 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/open_key_response_spec.rb +35 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/open_root_key_request_spec.rb +95 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/open_root_key_response_spec.rb +38 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/query_info_key_request_spec.rb +35 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/query_info_key_response_spec.rb +113 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/query_value_request_spec.rb +88 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/query_value_response_spec.rb +138 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/regsam_spec.rb +32 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/save_key_request_spec.rb +57 -0
- data/spec/lib/ruby_smb/dcerpc/winreg/save_key_response_spec.rb +22 -0
- data/spec/lib/ruby_smb/dcerpc/winreg_spec.rb +884 -0
- data/spec/lib/ruby_smb/dcerpc_spec.rb +81 -0
- data/spec/lib/ruby_smb/dispatcher/socket_spec.rb +12 -12
- data/spec/lib/ruby_smb/error_spec.rb +59 -0
- data/spec/lib/ruby_smb/field/stringz16_spec.rb +12 -0
- data/spec/lib/ruby_smb/nbss/session_header_spec.rb +4 -11
- data/spec/lib/ruby_smb/smb1/file_spec.rb +9 -1
- 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/smb1/pipe_spec.rb +216 -147
- 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 +146 -68
- 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/error_packet_spec.rb +3 -24
- 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 +226 -148
- data/spec/lib/ruby_smb/smb2/smb2_header_spec.rb +2 -2
- data/spec/lib/ruby_smb/smb2/tree_spec.rb +88 -9
- metadata +257 -81
- metadata.gz.sig +0 -0
- data/lib/ruby_smb/smb1/dcerpc.rb +0 -72
- data/lib/ruby_smb/smb2/dcerpc.rb +0 -75
@@ -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 :tree_connect_encrypt_data }
|
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.tree_connect_encrypt_data = 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.tree_connect_encrypt_data = 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
|
|
@@ -180,7 +195,7 @@ RSpec.describe RubySMB::SMB2::Tree do
|
|
180
195
|
allow(client).to receive(:send_recv) do |packet|
|
181
196
|
expect(packet.file_information_class).to eq RubySMB::Fscc::FileInformation::FileIdFullDirectoryInformation::CLASS_LEVEL
|
182
197
|
expect(packet.name).to eq '*'.encode('UTF-16LE')
|
183
|
-
expect(packet.output_length).to eq
|
198
|
+
expect(packet.output_length).to eq 65_536
|
184
199
|
end
|
185
200
|
tree.list
|
186
201
|
end
|
@@ -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.tree_connect_encrypt_data = 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
|
|
@@ -260,6 +288,40 @@ RSpec.describe RubySMB::SMB2::Tree do
|
|
260
288
|
end
|
261
289
|
end
|
262
290
|
|
291
|
+
context 'when the dialect is 0x0202' do
|
292
|
+
it 'sets the packet output_length to 65536 and credit_charge header to 0' do
|
293
|
+
client.dialect = '0x0202'
|
294
|
+
allow(client).to receive(:send_recv) do |packet|
|
295
|
+
expect(packet.output_length).to eq(65536)
|
296
|
+
expect(packet.smb2_header.credit_charge).to eq(0)
|
297
|
+
end
|
298
|
+
tree.list
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
context 'when the server does not support multi credits' do
|
303
|
+
it 'sets the packet output_length to 65536 and credit_charge header to 0' do
|
304
|
+
client.server_supports_multi_credit = false
|
305
|
+
allow(client).to receive(:send_recv) do |packet|
|
306
|
+
expect(packet.output_length).to eq(65536)
|
307
|
+
expect(packet.smb2_header.credit_charge).to eq(0)
|
308
|
+
end
|
309
|
+
tree.list
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
context 'when the dialect is not 0x0202 and the server supports multi credits' do
|
314
|
+
it 'sets the packet output_length to server_max_read_size and credit_charge header to the expected value' do
|
315
|
+
client.server_supports_multi_credit = true
|
316
|
+
credit_charge = (90000 - 1) / 65536 + 1
|
317
|
+
client.server_max_read_size = 90000
|
318
|
+
allow(client).to receive(:send_recv) do |packet|
|
319
|
+
expect(packet.output_length).to eq(90000)
|
320
|
+
expect(packet.smb2_header.credit_charge).to eq(credit_charge)
|
321
|
+
end
|
322
|
+
tree.list
|
323
|
+
end
|
324
|
+
end
|
263
325
|
end
|
264
326
|
|
265
327
|
describe '#open_file' do
|
@@ -404,20 +466,37 @@ RSpec.describe RubySMB::SMB2::Tree do
|
|
404
466
|
end
|
405
467
|
|
406
468
|
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)
|
469
|
+
expect(client).to receive(:send_recv).with(create_request, encrypt: false).and_return(create_response.to_binary_s)
|
470
|
+
tree.open_file(filename: filename)
|
471
|
+
end
|
472
|
+
|
473
|
+
it 'calls Client #send_recv with encryption set if required' do
|
474
|
+
tree.tree_connect_encrypt_data = true
|
475
|
+
expect(client).to receive(:send_recv).with(create_request, encrypt: true).and_return(create_response.to_binary_s)
|
408
476
|
tree.open_file(filename: filename)
|
409
477
|
end
|
410
478
|
|
411
479
|
context 'when sending the request packet and gets a response back' do
|
412
480
|
before :example do
|
413
|
-
allow(client).to receive(:send_recv).
|
481
|
+
allow(client).to receive(:send_recv).and_return(create_response.to_binary_s)
|
414
482
|
end
|
415
483
|
|
416
484
|
context 'when it is a file' do
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
485
|
+
context 'when encryption is not required' do
|
486
|
+
it 'returns the expected RubySMB::SMB2::File object' do
|
487
|
+
file_obj = RubySMB::SMB2::File.new(name: filename, tree: tree, response: create_response, encrypt: false)
|
488
|
+
expect(RubySMB::SMB2::File).to receive(:new).with(name: filename, tree: tree, response: create_response, encrypt: false).and_return(file_obj)
|
489
|
+
expect(tree.open_file(filename: filename)).to eq(file_obj)
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
493
|
+
context 'when encryption is required' do
|
494
|
+
it 'returns the expected RubySMB::SMB2::File object' do
|
495
|
+
file_obj = RubySMB::SMB2::File.new(name: filename, tree: tree, response: create_response, encrypt: true)
|
496
|
+
tree.tree_connect_encrypt_data = true
|
497
|
+
expect(RubySMB::SMB2::File).to receive(:new).with(name: filename, tree: tree, response: create_response, encrypt: true).and_return(file_obj)
|
498
|
+
expect(tree.open_file(filename: filename)).to eq(file_obj)
|
499
|
+
end
|
421
500
|
end
|
422
501
|
end
|
423
502
|
|
metadata
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_smb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- Metasploit Hackers
|
7
8
|
- David Maloney
|
8
9
|
- James Lee
|
9
10
|
- Dev Mohanty
|
@@ -13,85 +14,90 @@ bindir: bin
|
|
13
14
|
cert_chain:
|
14
15
|
- |
|
15
16
|
-----BEGIN CERTIFICATE-----
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
17
|
+
MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
|
18
|
+
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
19
|
+
d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
|
20
|
+
b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExM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uZGlnaWNlcnQuY29tL0RpZ2lDZXJ0U0hBMkFzc3Vy
|
92
|
+
ZWRJRENvZGVTaWduaW5nQ0EuY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEL
|
93
|
+
BQADggEBAFpzR9s7lcYKDzSJucOHztEPj+iSIeCzxEw34NTE9M2AfkYIu82c4r2a
|
94
|
+
bzIGmzZWiCGufjOp0gF5xW6sSSJ9n0TqH0nhHhvjtZQkmkGtOBbN1zeYDFS2ozAp
|
95
|
+
sljF/g68Y1eYs3NaFf7kQUa6vb6RdjW3J8M9AQ8gthBt7gr/guVxd/gJUYbdDdBX
|
96
|
+
cWfJJi/X7GVBOBmmvA43qoKideuhOBrVGBHvIF/yO9p23dIiUrGmW9kxXCSxgute
|
97
|
+
JI/W23RbIRksG2pioMhd4dCXq3FLLlkOV1YfCwWixNB+iIhQPPZVaPNfgPhCn4Dt
|
98
|
+
DeGjje/qA4fkLtRmOtb9PUBq3ToRDE4=
|
93
99
|
-----END CERTIFICATE-----
|
94
|
-
date:
|
100
|
+
date: 2020-08-17 00:00:00.000000000 Z
|
95
101
|
dependencies:
|
96
102
|
- !ruby/object:Gem::Dependency
|
97
103
|
name: redcarpet
|
@@ -205,12 +211,37 @@ dependencies:
|
|
205
211
|
- - ">="
|
206
212
|
- !ruby/object:Gem::Version
|
207
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'
|
208
242
|
description: ''
|
209
243
|
email:
|
210
|
-
-
|
211
|
-
- egypt@metasploit.com
|
212
|
-
- dev_mohanty@rapid7.com
|
213
|
-
- paristvinternet-github@yahoo.com
|
244
|
+
- msfdev@metasploit.com
|
214
245
|
executables: []
|
215
246
|
extensions: []
|
216
247
|
extra_rdoc_files: []
|
@@ -229,12 +260,17 @@ files:
|
|
229
260
|
- examples/append_file.rb
|
230
261
|
- examples/authenticate.rb
|
231
262
|
- examples/delete_file.rb
|
263
|
+
- examples/enum_registry_key.rb
|
264
|
+
- examples/enum_registry_values.rb
|
232
265
|
- examples/list_directory.rb
|
233
266
|
- examples/negotiate.rb
|
234
267
|
- examples/negotiate_with_netbios_service.rb
|
235
268
|
- examples/net_share_enum_all.rb
|
236
269
|
- examples/pipes.rb
|
270
|
+
- examples/query_service_status.rb
|
237
271
|
- examples/read_file.rb
|
272
|
+
- examples/read_file_encryption.rb
|
273
|
+
- examples/read_registry_key_value.rb
|
238
274
|
- examples/rename_file.rb
|
239
275
|
- examples/tree_connect.rb
|
240
276
|
- examples/write_file.rb
|
@@ -242,10 +278,13 @@ files:
|
|
242
278
|
- lib/ruby_smb/client.rb
|
243
279
|
- lib/ruby_smb/client/authentication.rb
|
244
280
|
- lib/ruby_smb/client/echo.rb
|
281
|
+
- lib/ruby_smb/client/encryption.rb
|
245
282
|
- lib/ruby_smb/client/negotiation.rb
|
246
283
|
- lib/ruby_smb/client/signing.rb
|
247
284
|
- lib/ruby_smb/client/tree_connect.rb
|
248
285
|
- lib/ruby_smb/client/utils.rb
|
286
|
+
- lib/ruby_smb/client/winreg.rb
|
287
|
+
- lib/ruby_smb/crypto.rb
|
249
288
|
- lib/ruby_smb/dcerpc.rb
|
250
289
|
- lib/ruby_smb/dcerpc/bind.rb
|
251
290
|
- lib/ruby_smb/dcerpc/bind_ack.rb
|
@@ -256,9 +295,49 @@ files:
|
|
256
295
|
- lib/ruby_smb/dcerpc/ptypes.rb
|
257
296
|
- lib/ruby_smb/dcerpc/request.rb
|
258
297
|
- lib/ruby_smb/dcerpc/response.rb
|
298
|
+
- lib/ruby_smb/dcerpc/rpc_security_attributes.rb
|
299
|
+
- lib/ruby_smb/dcerpc/rrp_unicode_string.rb
|
259
300
|
- lib/ruby_smb/dcerpc/srvsvc.rb
|
260
301
|
- lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all.rb
|
302
|
+
- lib/ruby_smb/dcerpc/svcctl.rb
|
303
|
+
- lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request.rb
|
304
|
+
- lib/ruby_smb/dcerpc/svcctl/change_service_config_w_response.rb
|
305
|
+
- lib/ruby_smb/dcerpc/svcctl/close_service_handle_request.rb
|
306
|
+
- lib/ruby_smb/dcerpc/svcctl/close_service_handle_response.rb
|
307
|
+
- lib/ruby_smb/dcerpc/svcctl/control_service_request.rb
|
308
|
+
- lib/ruby_smb/dcerpc/svcctl/control_service_response.rb
|
309
|
+
- lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request.rb
|
310
|
+
- lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_response.rb
|
311
|
+
- lib/ruby_smb/dcerpc/svcctl/open_service_w_request.rb
|
312
|
+
- lib/ruby_smb/dcerpc/svcctl/open_service_w_response.rb
|
313
|
+
- lib/ruby_smb/dcerpc/svcctl/query_service_config_w_request.rb
|
314
|
+
- lib/ruby_smb/dcerpc/svcctl/query_service_config_w_response.rb
|
315
|
+
- lib/ruby_smb/dcerpc/svcctl/query_service_status_request.rb
|
316
|
+
- lib/ruby_smb/dcerpc/svcctl/query_service_status_response.rb
|
317
|
+
- lib/ruby_smb/dcerpc/svcctl/service_status.rb
|
318
|
+
- lib/ruby_smb/dcerpc/svcctl/start_service_w_request.rb
|
319
|
+
- lib/ruby_smb/dcerpc/svcctl/start_service_w_response.rb
|
261
320
|
- lib/ruby_smb/dcerpc/uuid.rb
|
321
|
+
- lib/ruby_smb/dcerpc/winreg.rb
|
322
|
+
- lib/ruby_smb/dcerpc/winreg/close_key_request.rb
|
323
|
+
- lib/ruby_smb/dcerpc/winreg/close_key_response.rb
|
324
|
+
- lib/ruby_smb/dcerpc/winreg/create_key_request.rb
|
325
|
+
- lib/ruby_smb/dcerpc/winreg/create_key_response.rb
|
326
|
+
- lib/ruby_smb/dcerpc/winreg/enum_key_request.rb
|
327
|
+
- lib/ruby_smb/dcerpc/winreg/enum_key_response.rb
|
328
|
+
- lib/ruby_smb/dcerpc/winreg/enum_value_request.rb
|
329
|
+
- lib/ruby_smb/dcerpc/winreg/enum_value_response.rb
|
330
|
+
- lib/ruby_smb/dcerpc/winreg/open_key_request.rb
|
331
|
+
- lib/ruby_smb/dcerpc/winreg/open_key_response.rb
|
332
|
+
- lib/ruby_smb/dcerpc/winreg/open_root_key_request.rb
|
333
|
+
- lib/ruby_smb/dcerpc/winreg/open_root_key_response.rb
|
334
|
+
- lib/ruby_smb/dcerpc/winreg/query_info_key_request.rb
|
335
|
+
- lib/ruby_smb/dcerpc/winreg/query_info_key_response.rb
|
336
|
+
- lib/ruby_smb/dcerpc/winreg/query_value_request.rb
|
337
|
+
- lib/ruby_smb/dcerpc/winreg/query_value_response.rb
|
338
|
+
- lib/ruby_smb/dcerpc/winreg/regsam.rb
|
339
|
+
- lib/ruby_smb/dcerpc/winreg/save_key_request.rb
|
340
|
+
- lib/ruby_smb/dcerpc/winreg/save_key_response.rb
|
262
341
|
- lib/ruby_smb/dispatcher.rb
|
263
342
|
- lib/ruby_smb/dispatcher/base.rb
|
264
343
|
- lib/ruby_smb/dispatcher/socket.rb
|
@@ -324,7 +403,6 @@ files:
|
|
324
403
|
- lib/ruby_smb/smb1/commands.rb
|
325
404
|
- lib/ruby_smb/smb1/create_actions.rb
|
326
405
|
- lib/ruby_smb/smb1/data_block.rb
|
327
|
-
- lib/ruby_smb/smb1/dcerpc.rb
|
328
406
|
- lib/ruby_smb/smb1/dialect.rb
|
329
407
|
- lib/ruby_smb/smb1/file.rb
|
330
408
|
- lib/ruby_smb/smb1/oplock_levels.rb
|
@@ -402,12 +480,13 @@ files:
|
|
402
480
|
- lib/ruby_smb/smb2/bit_field/smb2_security_mode_single.rb
|
403
481
|
- lib/ruby_smb/smb2/commands.rb
|
404
482
|
- lib/ruby_smb/smb2/create_context.rb
|
405
|
-
- lib/ruby_smb/smb2/dcerpc.rb
|
406
483
|
- lib/ruby_smb/smb2/file.rb
|
407
484
|
- lib/ruby_smb/smb2/info_type.rb
|
485
|
+
- lib/ruby_smb/smb2/negotiate_context.rb
|
408
486
|
- lib/ruby_smb/smb2/packet.rb
|
409
487
|
- lib/ruby_smb/smb2/packet/close_request.rb
|
410
488
|
- lib/ruby_smb/smb2/packet/close_response.rb
|
489
|
+
- lib/ruby_smb/smb2/packet/compression_transform_header.rb
|
411
490
|
- lib/ruby_smb/smb2/packet/create_request.rb
|
412
491
|
- lib/ruby_smb/smb2/packet/create_response.rb
|
413
492
|
- lib/ruby_smb/smb2/packet/echo_request.rb
|
@@ -427,6 +506,7 @@ files:
|
|
427
506
|
- lib/ruby_smb/smb2/packet/session_setup_response.rb
|
428
507
|
- lib/ruby_smb/smb2/packet/set_info_request.rb
|
429
508
|
- lib/ruby_smb/smb2/packet/set_info_response.rb
|
509
|
+
- lib/ruby_smb/smb2/packet/transform_header.rb
|
430
510
|
- lib/ruby_smb/smb2/packet/tree_connect_request.rb
|
431
511
|
- lib/ruby_smb/smb2/packet/tree_connect_response.rb
|
432
512
|
- lib/ruby_smb/smb2/packet/tree_disconnect_request.rb
|
@@ -439,16 +519,61 @@ files:
|
|
439
519
|
- lib/ruby_smb/version.rb
|
440
520
|
- ruby_smb.gemspec
|
441
521
|
- spec/lib/ruby_smb/client_spec.rb
|
522
|
+
- spec/lib/ruby_smb/crypto_spec.rb
|
442
523
|
- spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb
|
443
524
|
- spec/lib/ruby_smb/dcerpc/bind_spec.rb
|
525
|
+
- spec/lib/ruby_smb/dcerpc/ndr_spec.rb
|
444
526
|
- spec/lib/ruby_smb/dcerpc/p_syntax_id_t_spec.rb
|
445
527
|
- spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb
|
446
528
|
- spec/lib/ruby_smb/dcerpc/request_spec.rb
|
447
529
|
- spec/lib/ruby_smb/dcerpc/response_spec.rb
|
530
|
+
- spec/lib/ruby_smb/dcerpc/rpc_security_attributes_spec.rb
|
531
|
+
- spec/lib/ruby_smb/dcerpc/rrp_unicode_string_spec.rb
|
448
532
|
- spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb
|
533
|
+
- spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb
|
534
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request_spec.rb
|
535
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_response_spec.rb
|
536
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/close_service_handle_request_spec.rb
|
537
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/close_service_handle_response_spec.rb
|
538
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/control_service_request_spec.rb
|
539
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/control_service_response_spec.rb
|
540
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request_spec.rb
|
541
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_response_spec.rb
|
542
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/open_service_w_request_spec.rb
|
543
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/open_service_w_response_spec.rb
|
544
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_request_spec.rb
|
545
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_response_spec.rb
|
546
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/query_service_status_request_spec.rb
|
547
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/query_service_status_response_spec.rb
|
548
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/service_status_spec.rb
|
549
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/start_service_w_request_spec.rb
|
550
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/start_service_w_response_spec.rb
|
551
|
+
- spec/lib/ruby_smb/dcerpc/svcctl_spec.rb
|
449
552
|
- spec/lib/ruby_smb/dcerpc/uuid_spec.rb
|
553
|
+
- spec/lib/ruby_smb/dcerpc/winreg/close_key_request_spec.rb
|
554
|
+
- spec/lib/ruby_smb/dcerpc/winreg/close_key_response_spec.rb
|
555
|
+
- spec/lib/ruby_smb/dcerpc/winreg/create_key_request_spec.rb
|
556
|
+
- spec/lib/ruby_smb/dcerpc/winreg/create_key_response_spec.rb
|
557
|
+
- spec/lib/ruby_smb/dcerpc/winreg/enum_key_request_spec.rb
|
558
|
+
- spec/lib/ruby_smb/dcerpc/winreg/enum_key_response_spec.rb
|
559
|
+
- spec/lib/ruby_smb/dcerpc/winreg/enum_value_request_spec.rb
|
560
|
+
- spec/lib/ruby_smb/dcerpc/winreg/enum_value_response_spec.rb
|
561
|
+
- spec/lib/ruby_smb/dcerpc/winreg/open_key_request_spec.rb
|
562
|
+
- spec/lib/ruby_smb/dcerpc/winreg/open_key_response_spec.rb
|
563
|
+
- spec/lib/ruby_smb/dcerpc/winreg/open_root_key_request_spec.rb
|
564
|
+
- spec/lib/ruby_smb/dcerpc/winreg/open_root_key_response_spec.rb
|
565
|
+
- spec/lib/ruby_smb/dcerpc/winreg/query_info_key_request_spec.rb
|
566
|
+
- spec/lib/ruby_smb/dcerpc/winreg/query_info_key_response_spec.rb
|
567
|
+
- spec/lib/ruby_smb/dcerpc/winreg/query_value_request_spec.rb
|
568
|
+
- spec/lib/ruby_smb/dcerpc/winreg/query_value_response_spec.rb
|
569
|
+
- spec/lib/ruby_smb/dcerpc/winreg/regsam_spec.rb
|
570
|
+
- spec/lib/ruby_smb/dcerpc/winreg/save_key_request_spec.rb
|
571
|
+
- spec/lib/ruby_smb/dcerpc/winreg/save_key_response_spec.rb
|
572
|
+
- spec/lib/ruby_smb/dcerpc/winreg_spec.rb
|
573
|
+
- spec/lib/ruby_smb/dcerpc_spec.rb
|
450
574
|
- spec/lib/ruby_smb/dispatcher/base_spec.rb
|
451
575
|
- spec/lib/ruby_smb/dispatcher/socket_spec.rb
|
576
|
+
- spec/lib/ruby_smb/error_spec.rb
|
452
577
|
- spec/lib/ruby_smb/field/extended_attribute_flag_spec.rb
|
453
578
|
- spec/lib/ruby_smb/field/file_time_spec.rb
|
454
579
|
- spec/lib/ruby_smb/field/nt_status_spec.rb
|
@@ -560,8 +685,10 @@ files:
|
|
560
685
|
- spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
|
561
686
|
- spec/lib/ruby_smb/smb2/create_context_spec.rb
|
562
687
|
- spec/lib/ruby_smb/smb2/file_spec.rb
|
688
|
+
- spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
|
563
689
|
- spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
|
564
690
|
- spec/lib/ruby_smb/smb2/packet/close_response_spec.rb
|
691
|
+
- spec/lib/ruby_smb/smb2/packet/compression_transform_header_spec.rb
|
565
692
|
- spec/lib/ruby_smb/smb2/packet/create_request_spec.rb
|
566
693
|
- spec/lib/ruby_smb/smb2/packet/create_response_spec.rb
|
567
694
|
- spec/lib/ruby_smb/smb2/packet/echo_request_spec.rb
|
@@ -580,6 +707,7 @@ files:
|
|
580
707
|
- spec/lib/ruby_smb/smb2/packet/session_setup_response_spec.rb
|
581
708
|
- spec/lib/ruby_smb/smb2/packet/set_info_request_spec.rb
|
582
709
|
- spec/lib/ruby_smb/smb2/packet/set_info_response_spec.rb
|
710
|
+
- spec/lib/ruby_smb/smb2/packet/transform_header_spec.rb
|
583
711
|
- spec/lib/ruby_smb/smb2/packet/tree_connect_request_spec.rb
|
584
712
|
- spec/lib/ruby_smb/smb2/packet/tree_connect_response_spec.rb
|
585
713
|
- spec/lib/ruby_smb/smb2/packet/tree_disconnect_request_spec.rb
|
@@ -605,7 +733,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
605
733
|
requirements:
|
606
734
|
- - ">="
|
607
735
|
- !ruby/object:Gem::Version
|
608
|
-
version: 2.
|
736
|
+
version: '2.5'
|
609
737
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
610
738
|
requirements:
|
611
739
|
- - ">="
|
@@ -613,22 +741,67 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
613
741
|
version: '0'
|
614
742
|
requirements: []
|
615
743
|
rubyforge_project:
|
616
|
-
rubygems_version: 2.
|
744
|
+
rubygems_version: 2.7.10
|
617
745
|
signing_key:
|
618
746
|
specification_version: 4
|
619
747
|
summary: A pure Ruby implementation of the SMB Protocol Family
|
620
748
|
test_files:
|
621
749
|
- spec/lib/ruby_smb/client_spec.rb
|
750
|
+
- spec/lib/ruby_smb/crypto_spec.rb
|
622
751
|
- spec/lib/ruby_smb/dcerpc/bind_ack_spec.rb
|
623
752
|
- spec/lib/ruby_smb/dcerpc/bind_spec.rb
|
753
|
+
- spec/lib/ruby_smb/dcerpc/ndr_spec.rb
|
624
754
|
- spec/lib/ruby_smb/dcerpc/p_syntax_id_t_spec.rb
|
625
755
|
- spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb
|
626
756
|
- spec/lib/ruby_smb/dcerpc/request_spec.rb
|
627
757
|
- spec/lib/ruby_smb/dcerpc/response_spec.rb
|
758
|
+
- spec/lib/ruby_smb/dcerpc/rpc_security_attributes_spec.rb
|
759
|
+
- spec/lib/ruby_smb/dcerpc/rrp_unicode_string_spec.rb
|
628
760
|
- spec/lib/ruby_smb/dcerpc/srvsvc/net_share_enum_all_spec.rb
|
761
|
+
- spec/lib/ruby_smb/dcerpc/srvsvc_spec.rb
|
762
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_request_spec.rb
|
763
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/change_service_config_w_response_spec.rb
|
764
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/close_service_handle_request_spec.rb
|
765
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/close_service_handle_response_spec.rb
|
766
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/control_service_request_spec.rb
|
767
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/control_service_response_spec.rb
|
768
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request_spec.rb
|
769
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_response_spec.rb
|
770
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/open_service_w_request_spec.rb
|
771
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/open_service_w_response_spec.rb
|
772
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_request_spec.rb
|
773
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/query_service_config_w_response_spec.rb
|
774
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/query_service_status_request_spec.rb
|
775
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/query_service_status_response_spec.rb
|
776
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/service_status_spec.rb
|
777
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/start_service_w_request_spec.rb
|
778
|
+
- spec/lib/ruby_smb/dcerpc/svcctl/start_service_w_response_spec.rb
|
779
|
+
- spec/lib/ruby_smb/dcerpc/svcctl_spec.rb
|
629
780
|
- spec/lib/ruby_smb/dcerpc/uuid_spec.rb
|
781
|
+
- spec/lib/ruby_smb/dcerpc/winreg/close_key_request_spec.rb
|
782
|
+
- spec/lib/ruby_smb/dcerpc/winreg/close_key_response_spec.rb
|
783
|
+
- spec/lib/ruby_smb/dcerpc/winreg/create_key_request_spec.rb
|
784
|
+
- spec/lib/ruby_smb/dcerpc/winreg/create_key_response_spec.rb
|
785
|
+
- spec/lib/ruby_smb/dcerpc/winreg/enum_key_request_spec.rb
|
786
|
+
- spec/lib/ruby_smb/dcerpc/winreg/enum_key_response_spec.rb
|
787
|
+
- spec/lib/ruby_smb/dcerpc/winreg/enum_value_request_spec.rb
|
788
|
+
- spec/lib/ruby_smb/dcerpc/winreg/enum_value_response_spec.rb
|
789
|
+
- spec/lib/ruby_smb/dcerpc/winreg/open_key_request_spec.rb
|
790
|
+
- spec/lib/ruby_smb/dcerpc/winreg/open_key_response_spec.rb
|
791
|
+
- spec/lib/ruby_smb/dcerpc/winreg/open_root_key_request_spec.rb
|
792
|
+
- spec/lib/ruby_smb/dcerpc/winreg/open_root_key_response_spec.rb
|
793
|
+
- spec/lib/ruby_smb/dcerpc/winreg/query_info_key_request_spec.rb
|
794
|
+
- spec/lib/ruby_smb/dcerpc/winreg/query_info_key_response_spec.rb
|
795
|
+
- spec/lib/ruby_smb/dcerpc/winreg/query_value_request_spec.rb
|
796
|
+
- spec/lib/ruby_smb/dcerpc/winreg/query_value_response_spec.rb
|
797
|
+
- spec/lib/ruby_smb/dcerpc/winreg/regsam_spec.rb
|
798
|
+
- spec/lib/ruby_smb/dcerpc/winreg/save_key_request_spec.rb
|
799
|
+
- spec/lib/ruby_smb/dcerpc/winreg/save_key_response_spec.rb
|
800
|
+
- spec/lib/ruby_smb/dcerpc/winreg_spec.rb
|
801
|
+
- spec/lib/ruby_smb/dcerpc_spec.rb
|
630
802
|
- spec/lib/ruby_smb/dispatcher/base_spec.rb
|
631
803
|
- spec/lib/ruby_smb/dispatcher/socket_spec.rb
|
804
|
+
- spec/lib/ruby_smb/error_spec.rb
|
632
805
|
- spec/lib/ruby_smb/field/extended_attribute_flag_spec.rb
|
633
806
|
- spec/lib/ruby_smb/field/file_time_spec.rb
|
634
807
|
- spec/lib/ruby_smb/field/nt_status_spec.rb
|
@@ -740,8 +913,10 @@ test_files:
|
|
740
913
|
- spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
|
741
914
|
- spec/lib/ruby_smb/smb2/create_context_spec.rb
|
742
915
|
- spec/lib/ruby_smb/smb2/file_spec.rb
|
916
|
+
- spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
|
743
917
|
- spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
|
744
918
|
- spec/lib/ruby_smb/smb2/packet/close_response_spec.rb
|
919
|
+
- spec/lib/ruby_smb/smb2/packet/compression_transform_header_spec.rb
|
745
920
|
- spec/lib/ruby_smb/smb2/packet/create_request_spec.rb
|
746
921
|
- spec/lib/ruby_smb/smb2/packet/create_response_spec.rb
|
747
922
|
- spec/lib/ruby_smb/smb2/packet/echo_request_spec.rb
|
@@ -760,6 +935,7 @@ test_files:
|
|
760
935
|
- spec/lib/ruby_smb/smb2/packet/session_setup_response_spec.rb
|
761
936
|
- spec/lib/ruby_smb/smb2/packet/set_info_request_spec.rb
|
762
937
|
- spec/lib/ruby_smb/smb2/packet/set_info_response_spec.rb
|
938
|
+
- spec/lib/ruby_smb/smb2/packet/transform_header_spec.rb
|
763
939
|
- spec/lib/ruby_smb/smb2/packet/tree_connect_request_spec.rb
|
764
940
|
- spec/lib/ruby_smb/smb2/packet/tree_connect_response_spec.rb
|
765
941
|
- spec/lib/ruby_smb/smb2/packet/tree_disconnect_request_spec.rb
|