ruby_smb 2.0.13 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/examples/anonymous_auth.rb +29 -6
  4. data/examples/auth_capture.rb +28 -0
  5. data/examples/file_server.rb +76 -0
  6. data/examples/read_file.rb +51 -10
  7. data/examples/tree_connect.rb +49 -8
  8. data/lib/ruby_smb/client/authentication.rb +11 -3
  9. data/lib/ruby_smb/client.rb +11 -2
  10. data/lib/ruby_smb/create_actions.rb +21 -0
  11. data/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_request.rb +20 -0
  12. data/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_response.rb +20 -0
  13. data/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_request.rb +21 -0
  14. data/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_response.rb +21 -0
  15. data/lib/ruby_smb/dcerpc/encrypting_file_system.rb +44 -0
  16. data/lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_request.rb +22 -0
  17. data/lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_response.rb +20 -0
  18. data/lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_request.rb +24 -0
  19. data/lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_response.rb +23 -0
  20. data/lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_request.rb +24 -0
  21. data/lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_response.rb +22 -0
  22. data/lib/ruby_smb/dcerpc/print_system.rb +69 -0
  23. data/lib/ruby_smb/dcerpc.rb +2 -2
  24. data/lib/ruby_smb/field/nt_status.rb +20 -1
  25. data/lib/ruby_smb/fscc/file_information/file_ea_information.rb +14 -0
  26. data/lib/ruby_smb/fscc/file_information/file_network_open_information.rb +22 -0
  27. data/lib/ruby_smb/fscc/file_information/file_stream_information.rb +16 -0
  28. data/lib/ruby_smb/fscc/file_information.rb +29 -0
  29. data/lib/ruby_smb/fscc/file_system_information/file_fs_attribute_information.rb +46 -0
  30. data/lib/ruby_smb/fscc/file_system_information/file_fs_volume_information.rb +19 -0
  31. data/lib/ruby_smb/fscc/file_system_information.rb +22 -0
  32. data/lib/ruby_smb/fscc.rb +1 -0
  33. data/lib/ruby_smb/generic_packet.rb +6 -0
  34. data/lib/ruby_smb/gss/provider/authenticator.rb +4 -0
  35. data/lib/ruby_smb/gss/provider/ntlm.rb +13 -3
  36. data/lib/ruby_smb/server/server_client/negotiation.rb +0 -2
  37. data/lib/ruby_smb/server/server_client/session_setup.rb +43 -32
  38. data/lib/ruby_smb/server/server_client/share_io.rb +28 -0
  39. data/lib/ruby_smb/server/server_client/tree_connect.rb +60 -0
  40. data/lib/ruby_smb/server/server_client.rb +214 -24
  41. data/lib/ruby_smb/server/session.rb +71 -0
  42. data/lib/ruby_smb/server/share/provider/disk.rb +437 -0
  43. data/lib/ruby_smb/server/share/provider/pipe.rb +27 -0
  44. data/lib/ruby_smb/server/share/provider/processor.rb +76 -0
  45. data/lib/ruby_smb/server/share/provider.rb +38 -0
  46. data/lib/ruby_smb/server/share.rb +11 -0
  47. data/lib/ruby_smb/server.rb +35 -3
  48. data/lib/ruby_smb/signing.rb +37 -11
  49. data/lib/ruby_smb/smb1/commands.rb +4 -0
  50. data/lib/ruby_smb/smb1/tree.rb +87 -79
  51. data/lib/ruby_smb/smb1.rb +0 -1
  52. data/lib/ruby_smb/smb2/bit_field/smb2_header_flags.rb +2 -1
  53. data/lib/ruby_smb/smb2/commands.rb +4 -0
  54. data/lib/ruby_smb/smb2/create_context/request.rb +64 -0
  55. data/lib/ruby_smb/smb2/create_context/response.rb +62 -0
  56. data/lib/ruby_smb/smb2/create_context.rb +74 -22
  57. data/lib/ruby_smb/smb2/packet/create_request.rb +44 -11
  58. data/lib/ruby_smb/smb2/packet/create_response.rb +17 -3
  59. data/lib/ruby_smb/smb2/packet/query_directory_request.rb +1 -1
  60. data/lib/ruby_smb/smb2/packet/query_directory_response.rb +2 -2
  61. data/lib/ruby_smb/smb2/packet/query_info_request.rb +43 -0
  62. data/lib/ruby_smb/smb2/packet/query_info_response.rb +23 -0
  63. data/lib/ruby_smb/smb2/packet/tree_connect_response.rb +1 -1
  64. data/lib/ruby_smb/smb2/packet/tree_disconnect_response.rb +1 -0
  65. data/lib/ruby_smb/smb2/packet.rb +2 -0
  66. data/lib/ruby_smb/smb2/tree.rb +80 -70
  67. data/lib/ruby_smb/smb2.rb +11 -0
  68. data/lib/ruby_smb/smb_error.rb +110 -0
  69. data/lib/ruby_smb/version.rb +1 -1
  70. data/lib/ruby_smb.rb +2 -0
  71. data/ruby_smb.gemspec +1 -1
  72. data/spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_request_spec.rb +30 -0
  73. data/spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_response_spec.rb +30 -0
  74. data/spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_request_spec.rb +38 -0
  75. data/spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_response_spec.rb +38 -0
  76. data/spec/lib/ruby_smb/dcerpc/print_system/driver_container_spec.rb +41 -0
  77. data/spec/lib/ruby_smb/dcerpc/print_system/driver_info2_spec.rb +64 -0
  78. data/spec/lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_request_spec.rb +59 -0
  79. data/spec/lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_response_spec.rb +30 -0
  80. data/spec/lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_request_spec.rb +62 -0
  81. data/spec/lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_response_spec.rb +54 -0
  82. data/spec/lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_request_spec.rb +62 -0
  83. data/spec/lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_response_spec.rb +46 -0
  84. data/spec/lib/ruby_smb/field/nt_status_spec.rb +6 -2
  85. data/spec/lib/ruby_smb/gss/provider/ntlm/authenticator_spec.rb +4 -0
  86. data/spec/lib/ruby_smb/server/server_client_spec.rb +36 -53
  87. data/spec/lib/ruby_smb/server/session_spec.rb +38 -0
  88. data/spec/lib/ruby_smb/server/share/provider/disk_spec.rb +61 -0
  89. data/spec/lib/ruby_smb/server/share/provider/pipe_spec.rb +31 -0
  90. data/spec/lib/ruby_smb/server/share/provider_spec.rb +13 -0
  91. data/spec/lib/ruby_smb/smb1/tree_spec.rb +3 -3
  92. data/spec/lib/ruby_smb/smb2/bit_field/header_flags_spec.rb +8 -2
  93. data/spec/lib/ruby_smb/smb2/{create_context_spec.rb → create_context/create_context_request_spec.rb} +1 -1
  94. data/spec/lib/ruby_smb/smb2/packet/create_request_spec.rb +5 -5
  95. data/spec/lib/ruby_smb/smb2/packet/create_response_spec.rb +9 -5
  96. data/spec/lib/ruby_smb/smb2/packet/query_directory_response_spec.rb +3 -2
  97. data/spec/lib/ruby_smb/smb2/tree_spec.rb +3 -3
  98. data.tar.gz.sig +3 -2
  99. metadata +71 -7
  100. metadata.gz.sig +0 -0
  101. data/lib/ruby_smb/smb1/create_actions.rb +0 -20
@@ -0,0 +1,31 @@
1
+ RSpec.describe RubySMB::Server::Share::Provider::Pipe do
2
+ let(:name) { 'share' }
3
+ subject(:share_provider) { described_class.new(name) }
4
+
5
+ it { is_expected.to respond_to :name }
6
+ it { is_expected.to respond_to :type }
7
+
8
+ describe '#TYPE' do
9
+ it 'is TYPE_PIPE' do
10
+ expect(described_class::TYPE).to eq RubySMB::Server::Share::TYPE_PIPE
11
+ end
12
+ end
13
+
14
+ describe '#initialize' do
15
+ it 'sets the name' do
16
+ expect(share_provider.name).to eq name
17
+ end
18
+
19
+ it 'sets the type correctly' do
20
+ expect(share_provider.type).to eq RubySMB::Server::Share::TYPE_PIPE
21
+ end
22
+ end
23
+ end
24
+
25
+ RSpec.describe RubySMB::Server::Share::Provider::Pipe::Processor do
26
+ let(:session) { RubySMB::Server::Session.new(rand(0xffffffff)) }
27
+ let(:share_provider) { RubySMB::Server::Share::Provider::Pipe.new('share') }
28
+ subject(:share_processor) { described_class.new(share_provider, nil, session) }
29
+
30
+ it { is_expected.to respond_to :provider }
31
+ end
@@ -0,0 +1,13 @@
1
+ RSpec.describe RubySMB::Server::Share::Provider::Base do
2
+ let(:name) { 'share' }
3
+ subject(:share_provider) { described_class.new(name) }
4
+
5
+ it { is_expected.to respond_to :name }
6
+ it { is_expected.to respond_to :type }
7
+
8
+ describe '#initialize' do
9
+ it 'sets the name' do
10
+ expect(share_provider.name).to eq name
11
+ end
12
+ end
13
+ end
@@ -495,17 +495,17 @@ RSpec.describe RubySMB::SMB1::Tree do
495
495
  describe '#open_pipe' do
496
496
  let(:opts) { { filename: 'test', write: true } }
497
497
  before :example do
498
- allow(tree).to receive(:open_file)
498
+ allow(tree).to receive(:_open)
499
499
  end
500
500
 
501
501
  it 'calls #open_file with the provided options' do
502
502
  opts[:filename] ='\\test'
503
- expect(tree).to receive(:open_file).with(opts)
503
+ expect(tree).to receive(:_open).with(opts)
504
504
  tree.open_pipe(**opts)
505
505
  end
506
506
 
507
507
  it 'prepends the filename with \\ if needed' do
508
- expect(tree).to receive(:open_file).with(filename: '\\test', write: true)
508
+ expect(tree).to receive(:_open).with(filename: '\\test', write: true)
509
509
  tree.open_pipe(**opts)
510
510
  end
511
511
 
@@ -44,8 +44,14 @@ RSpec.describe RubySMB::SMB2::BitField::Smb2HeaderFlags do
44
44
  end
45
45
 
46
46
  describe '#reserved3' do
47
- it 'should be a 4-bit field per the SMB spec' do
48
- expect(flags.reserved3).to be_a BinData::Bit4
47
+ it 'should be a 1-bit field per the SMB spec' do
48
+ expect(flags.reserved3).to be_a BinData::Bit1
49
+ end
50
+ end
51
+
52
+ describe '#priority' do
53
+ it 'should be a 3-bit field per the SMB spec' do
54
+ expect(flags.priority).to be_a BinData::Bit3
49
55
  end
50
56
  end
51
57
 
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- RSpec.describe RubySMB::SMB2::CreateContext do
3
+ RSpec.describe RubySMB::SMB2::CreateContext::CreateContextRequest do
4
4
  subject(:struct) { described_class.new }
5
5
 
6
6
  it { is_expected.to respond_to :next_offset }
@@ -80,22 +80,22 @@ RSpec.describe RubySMB::SMB2::Packet::CreateRequest do
80
80
  expect(packet.name_offset).to eq packet.name.abs_offset
81
81
  end
82
82
 
83
- it 'tracks the offset to #context in #context_offset' do
84
- expect(packet.context_offset).to eq packet.context.abs_offset
83
+ it 'tracks the offset to #context in #contexts_offset' do
84
+ expect(packet.contexts_offset).to eq packet.contexts.abs_offset
85
85
  end
86
86
 
87
87
  it 'tracks the length of #name in #name_length' do
88
88
  expect(packet.name_length).to eq packet.name.length
89
89
  end
90
90
 
91
- it 'tracks the length of #context in #context_length' do
92
- expect(packet.context_length).to eq packet.context.do_num_bytes
91
+ it 'tracks the length of #context in #contexts_length' do
92
+ expect(packet.contexts_length).to eq packet.contexts.do_num_bytes
93
93
  end
94
94
 
95
95
  describe '#name' do
96
96
  it 'encodes any input into UTF-16LE' do
97
97
  packet.name = 'Hello'
98
- expect(packet.name.to_binary_s).to eq "H\x00e\x00l\x00l\x00o\x00"
98
+ expect(packet.name.to_binary_s { |name| name.abs_offset = 0; name.write_now! }).to eq "H\x00e\x00l\x00l\x00o\x00"
99
99
  end
100
100
  end
101
101
  end
@@ -54,11 +54,15 @@ RSpec.describe RubySMB::SMB2::Packet::CreateResponse do
54
54
  expect(packet.file_id).to be_a RubySMB::Field::Smb2Fileid
55
55
  end
56
56
 
57
- it 'tracks the offset to #context in #context_offset' do
58
- expect(packet.context_offset).to eq packet.context.abs_offset
59
- end
57
+ describe '#contexts' do
58
+ # with no context, the offset and length should be 0
59
+ # see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/d166aa9e-0b53-410e-b35e-3933d8131927
60
+ it 'should have the contexts_offset set to 0' do
61
+ expect(packet.contexts_offset).to eq 0
62
+ end
60
63
 
61
- it 'tracks the length of #context in #context_length' do
62
- expect(packet.context_length).to eq packet.context.do_num_bytes
64
+ it 'should have the contexts_length set to ' do
65
+ expect(packet.contexts_length).to eq 0
66
+ end
63
67
  end
64
68
  end
@@ -30,8 +30,9 @@ RSpec.describe RubySMB::SMB2::Packet::QueryDirectoryResponse do
30
30
  expect(packet.structure_size).to eq 9
31
31
  end
32
32
 
33
- it 'has an offset pointer to the buffer field' do
34
- expect(packet.buffer_offset).to eq packet.buffer.abs_offset
33
+ it 'has an offset pointer of 0 for an empty buffer field' do
34
+ expect(packet.buffer).to be_empty
35
+ expect(packet.buffer_offset).to eq 0
35
36
  end
36
37
 
37
38
  it 'has a length value for the buffer field' do
@@ -535,17 +535,17 @@ RSpec.describe RubySMB::SMB2::Tree do
535
535
  describe '#open_pipe' do
536
536
  let(:opts) { { filename: '\\test', write: true } }
537
537
  before :example do
538
- allow(tree).to receive(:open_file)
538
+ allow(tree).to receive(:_open)
539
539
  end
540
540
 
541
541
  it 'calls #open_file with the provided options' do
542
542
  opts[:filename] ='test'
543
- expect(tree).to receive(:open_file).with(**opts)
543
+ expect(tree).to receive(:_open).with(**opts)
544
544
  tree.open_pipe(**opts)
545
545
  end
546
546
 
547
547
  it 'remove the leading \\ from the filename if needed' do
548
- expect(tree).to receive(:open_file).with(filename: 'test', write: true)
548
+ expect(tree).to receive(:_open).with(filename: 'test', write: true)
549
549
  tree.open_pipe(**opts)
550
550
  end
551
551
 
data.tar.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- ��B����:��8i��Jis��\���x:�����1��~vk4ܧ�8Hj(�S��M �����O��iísF�.�i����9qhK-��|.k*�����HdP���W?z��v���M_qk-Ic�����(w�<J����K �|��ۺ� M�v�<�1�o�ZSR_(���R�������0�n��5‰� �E�l,:\�9�{���6����5�����*sa%U�D�\S7hōu�nx���歒ӛ�6
2
- :�q�k
1
+ 8zn:�"bѠnyLv04���MF�����D3��'�H@����� f��W}��~x�Y0||�H��f�:�����m�n�� ���+�hӷ��f�����~
2
+ h
3
+ 2ئbJj�����$�]dxGy���]E�^F���0!��#�!��6�UdP�gG�d+od��X;BVš���� �FU���]����r��7�J^�+r���.�x/:�?�ǒ+9,k�3�&��Bl�����H�w3Lx+;,�<�
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: 2.0.13
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -97,7 +97,7 @@ cert_chain:
97
97
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
98
98
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
99
99
  -----END CERTIFICATE-----
100
- date: 2021-12-28 00:00:00.000000000 Z
100
+ date: 2022-02-11 00:00:00.000000000 Z
101
101
  dependencies:
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: redcarpet
@@ -189,14 +189,14 @@ dependencies:
189
189
  requirements:
190
190
  - - ">="
191
191
  - !ruby/object:Gem::Version
192
- version: '0'
192
+ version: 0.1.3
193
193
  type: :runtime
194
194
  prerelease: false
195
195
  version_requirements: !ruby/object:Gem::Requirement
196
196
  requirements:
197
197
  - - ">="
198
198
  - !ruby/object:Gem::Version
199
- version: '0'
199
+ version: 0.1.3
200
200
  - !ruby/object:Gem::Dependency
201
201
  name: bindata
202
202
  requirement: !ruby/object:Gem::Requirement
@@ -265,6 +265,7 @@ files:
265
265
  - examples/enum_domain_users.rb
266
266
  - examples/enum_registry_key.rb
267
267
  - examples/enum_registry_values.rb
268
+ - examples/file_server.rb
268
269
  - examples/get_computer_info.rb
269
270
  - examples/list_directory.rb
270
271
  - examples/negotiate.rb
@@ -289,6 +290,7 @@ files:
289
290
  - lib/ruby_smb/client/winreg.rb
290
291
  - lib/ruby_smb/compression.rb
291
292
  - lib/ruby_smb/compression/lznt1.rb
293
+ - lib/ruby_smb/create_actions.rb
292
294
  - lib/ruby_smb/crypto.rb
293
295
  - lib/ruby_smb/dcerpc.rb
294
296
  - lib/ruby_smb/dcerpc/bind.rb
@@ -306,6 +308,11 @@ files:
306
308
  - lib/ruby_smb/dcerpc/drsr/drs_get_nc_changes_response.rb
307
309
  - lib/ruby_smb/dcerpc/drsr/drs_unbind_request.rb
308
310
  - lib/ruby_smb/dcerpc/drsr/drs_unbind_response.rb
311
+ - lib/ruby_smb/dcerpc/encrypting_file_system.rb
312
+ - lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_request.rb
313
+ - lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_response.rb
314
+ - lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_request.rb
315
+ - lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_response.rb
309
316
  - lib/ruby_smb/dcerpc/epm.rb
310
317
  - lib/ruby_smb/dcerpc/epm/epm_ept_map_request.rb
311
318
  - lib/ruby_smb/dcerpc/epm/epm_ept_map_response.rb
@@ -321,6 +328,13 @@ files:
321
328
  - lib/ruby_smb/dcerpc/netlogon/netr_server_req_challenge_response.rb
322
329
  - lib/ruby_smb/dcerpc/p_syntax_id_t.rb
323
330
  - lib/ruby_smb/dcerpc/pdu_header.rb
331
+ - lib/ruby_smb/dcerpc/print_system.rb
332
+ - lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_request.rb
333
+ - lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_response.rb
334
+ - lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_request.rb
335
+ - lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_response.rb
336
+ - lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_request.rb
337
+ - lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_response.rb
324
338
  - lib/ruby_smb/dcerpc/ptypes.rb
325
339
  - lib/ruby_smb/dcerpc/request.rb
326
340
  - lib/ruby_smb/dcerpc/response.rb
@@ -420,11 +434,17 @@ files:
420
434
  - lib/ruby_smb/fscc/file_information/file_both_directory_information.rb
421
435
  - lib/ruby_smb/fscc/file_information/file_directory_information.rb
422
436
  - lib/ruby_smb/fscc/file_information/file_disposition_information.rb
437
+ - lib/ruby_smb/fscc/file_information/file_ea_information.rb
423
438
  - lib/ruby_smb/fscc/file_information/file_full_directory_information.rb
424
439
  - lib/ruby_smb/fscc/file_information/file_id_both_directory_information.rb
425
440
  - lib/ruby_smb/fscc/file_information/file_id_full_directory_information.rb
426
441
  - lib/ruby_smb/fscc/file_information/file_names_information.rb
442
+ - lib/ruby_smb/fscc/file_information/file_network_open_information.rb
427
443
  - lib/ruby_smb/fscc/file_information/file_rename_information.rb
444
+ - lib/ruby_smb/fscc/file_information/file_stream_information.rb
445
+ - lib/ruby_smb/fscc/file_system_information.rb
446
+ - lib/ruby_smb/fscc/file_system_information/file_fs_attribute_information.rb
447
+ - lib/ruby_smb/fscc/file_system_information/file_fs_volume_information.rb
428
448
  - lib/ruby_smb/generic_packet.rb
429
449
  - lib/ruby_smb/gss.rb
430
450
  - lib/ruby_smb/gss/provider.rb
@@ -441,6 +461,14 @@ files:
441
461
  - lib/ruby_smb/server/server_client.rb
442
462
  - lib/ruby_smb/server/server_client/negotiation.rb
443
463
  - lib/ruby_smb/server/server_client/session_setup.rb
464
+ - lib/ruby_smb/server/server_client/share_io.rb
465
+ - lib/ruby_smb/server/server_client/tree_connect.rb
466
+ - lib/ruby_smb/server/session.rb
467
+ - lib/ruby_smb/server/share.rb
468
+ - lib/ruby_smb/server/share/provider.rb
469
+ - lib/ruby_smb/server/share/provider/disk.rb
470
+ - lib/ruby_smb/server/share/provider/pipe.rb
471
+ - lib/ruby_smb/server/share/provider/processor.rb
444
472
  - lib/ruby_smb/signing.rb
445
473
  - lib/ruby_smb/smb1.rb
446
474
  - lib/ruby_smb/smb1/andx_block.rb
@@ -465,7 +493,6 @@ files:
465
493
  - lib/ruby_smb/smb1/bit_field/trans_flags.rb
466
494
  - lib/ruby_smb/smb1/bit_field/tree_connect_flags.rb
467
495
  - lib/ruby_smb/smb1/commands.rb
468
- - lib/ruby_smb/smb1/create_actions.rb
469
496
  - lib/ruby_smb/smb1/data_block.rb
470
497
  - lib/ruby_smb/smb1/dialect.rb
471
498
  - lib/ruby_smb/smb1/file.rb
@@ -544,6 +571,8 @@ files:
544
571
  - lib/ruby_smb/smb2/bit_field/smb2_security_mode_single.rb
545
572
  - lib/ruby_smb/smb2/commands.rb
546
573
  - lib/ruby_smb/smb2/create_context.rb
574
+ - lib/ruby_smb/smb2/create_context/request.rb
575
+ - lib/ruby_smb/smb2/create_context/response.rb
547
576
  - lib/ruby_smb/smb2/file.rb
548
577
  - lib/ruby_smb/smb2/info_type.rb
549
578
  - lib/ruby_smb/smb2/negotiate_context.rb
@@ -564,6 +593,8 @@ files:
564
593
  - lib/ruby_smb/smb2/packet/negotiate_response.rb
565
594
  - lib/ruby_smb/smb2/packet/query_directory_request.rb
566
595
  - lib/ruby_smb/smb2/packet/query_directory_response.rb
596
+ - lib/ruby_smb/smb2/packet/query_info_request.rb
597
+ - lib/ruby_smb/smb2/packet/query_info_response.rb
567
598
  - lib/ruby_smb/smb2/packet/read_request.rb
568
599
  - lib/ruby_smb/smb2/packet/read_response.rb
569
600
  - lib/ruby_smb/smb2/packet/session_setup_request.rb
@@ -580,6 +611,7 @@ files:
580
611
  - lib/ruby_smb/smb2/pipe.rb
581
612
  - lib/ruby_smb/smb2/smb2_header.rb
582
613
  - lib/ruby_smb/smb2/tree.rb
614
+ - lib/ruby_smb/smb_error.rb
583
615
  - lib/ruby_smb/version.rb
584
616
  - ruby_smb.gemspec
585
617
  - spec/lib/ruby_smb/client_spec.rb
@@ -589,6 +621,10 @@ files:
589
621
  - spec/lib/ruby_smb/dcerpc/bind_spec.rb
590
622
  - spec/lib/ruby_smb/dcerpc/client_spec.rb
591
623
  - spec/lib/ruby_smb/dcerpc/drsr_spec.rb
624
+ - spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_request_spec.rb
625
+ - spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_response_spec.rb
626
+ - spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_request_spec.rb
627
+ - spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_response_spec.rb
592
628
  - spec/lib/ruby_smb/dcerpc/ndr_spec.rb
593
629
  - spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_request_spec.rb
594
630
  - spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_response_spec.rb
@@ -598,6 +634,14 @@ files:
598
634
  - spec/lib/ruby_smb/dcerpc/netlogon/netr_server_req_challenge_response_spec.rb
599
635
  - spec/lib/ruby_smb/dcerpc/p_syntax_id_t_spec.rb
600
636
  - spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb
637
+ - spec/lib/ruby_smb/dcerpc/print_system/driver_container_spec.rb
638
+ - spec/lib/ruby_smb/dcerpc/print_system/driver_info2_spec.rb
639
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_request_spec.rb
640
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_response_spec.rb
641
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_request_spec.rb
642
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_response_spec.rb
643
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_request_spec.rb
644
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_response_spec.rb
601
645
  - spec/lib/ruby_smb/dcerpc/request_spec.rb
602
646
  - spec/lib/ruby_smb/dcerpc/response_spec.rb
603
647
  - spec/lib/ruby_smb/dcerpc/rpc_auth3_spec.rb
@@ -699,6 +743,10 @@ files:
699
743
  - spec/lib/ruby_smb/nbss/session_header_spec.rb
700
744
  - spec/lib/ruby_smb/nbss/session_request_spec.rb
701
745
  - spec/lib/ruby_smb/server/server_client_spec.rb
746
+ - spec/lib/ruby_smb/server/session_spec.rb
747
+ - spec/lib/ruby_smb/server/share/provider/disk_spec.rb
748
+ - spec/lib/ruby_smb/server/share/provider/pipe_spec.rb
749
+ - spec/lib/ruby_smb/server/share/provider_spec.rb
702
750
  - spec/lib/ruby_smb/server_spec.rb
703
751
  - spec/lib/ruby_smb/smb1/andx_block_spec.rb
704
752
  - spec/lib/ruby_smb/smb1/bit_field/capabilities_spec.rb
@@ -782,7 +830,7 @@ files:
782
830
  - spec/lib/ruby_smb/smb2/bit_field/share_flags_spec.rb
783
831
  - spec/lib/ruby_smb/smb2/bit_field/smb2_capabilities_spec.rb
784
832
  - spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
785
- - spec/lib/ruby_smb/smb2/create_context_spec.rb
833
+ - spec/lib/ruby_smb/smb2/create_context/create_context_request_spec.rb
786
834
  - spec/lib/ruby_smb/smb2/file_spec.rb
787
835
  - spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
788
836
  - spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
@@ -853,6 +901,10 @@ test_files:
853
901
  - spec/lib/ruby_smb/dcerpc/bind_spec.rb
854
902
  - spec/lib/ruby_smb/dcerpc/client_spec.rb
855
903
  - spec/lib/ruby_smb/dcerpc/drsr_spec.rb
904
+ - spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_request_spec.rb
905
+ - spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_encrypt_file_srv_response_spec.rb
906
+ - spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_request_spec.rb
907
+ - spec/lib/ruby_smb/dcerpc/encrypting_file_system/efs_rpc_open_file_raw_response_spec.rb
856
908
  - spec/lib/ruby_smb/dcerpc/ndr_spec.rb
857
909
  - spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_request_spec.rb
858
910
  - spec/lib/ruby_smb/dcerpc/netlogon/netr_server_authenticate3_response_spec.rb
@@ -862,6 +914,14 @@ test_files:
862
914
  - spec/lib/ruby_smb/dcerpc/netlogon/netr_server_req_challenge_response_spec.rb
863
915
  - spec/lib/ruby_smb/dcerpc/p_syntax_id_t_spec.rb
864
916
  - spec/lib/ruby_smb/dcerpc/pdu_header_spec.rb
917
+ - spec/lib/ruby_smb/dcerpc/print_system/driver_container_spec.rb
918
+ - spec/lib/ruby_smb/dcerpc/print_system/driver_info2_spec.rb
919
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_request_spec.rb
920
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_add_printer_driver_ex_response_spec.rb
921
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_request_spec.rb
922
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_enum_printer_drivers_response_spec.rb
923
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_request_spec.rb
924
+ - spec/lib/ruby_smb/dcerpc/print_system/rpc_get_printer_driver_directory_response_spec.rb
865
925
  - spec/lib/ruby_smb/dcerpc/request_spec.rb
866
926
  - spec/lib/ruby_smb/dcerpc/response_spec.rb
867
927
  - spec/lib/ruby_smb/dcerpc/rpc_auth3_spec.rb
@@ -963,6 +1023,10 @@ test_files:
963
1023
  - spec/lib/ruby_smb/nbss/session_header_spec.rb
964
1024
  - spec/lib/ruby_smb/nbss/session_request_spec.rb
965
1025
  - spec/lib/ruby_smb/server/server_client_spec.rb
1026
+ - spec/lib/ruby_smb/server/session_spec.rb
1027
+ - spec/lib/ruby_smb/server/share/provider/disk_spec.rb
1028
+ - spec/lib/ruby_smb/server/share/provider/pipe_spec.rb
1029
+ - spec/lib/ruby_smb/server/share/provider_spec.rb
966
1030
  - spec/lib/ruby_smb/server_spec.rb
967
1031
  - spec/lib/ruby_smb/smb1/andx_block_spec.rb
968
1032
  - spec/lib/ruby_smb/smb1/bit_field/capabilities_spec.rb
@@ -1046,7 +1110,7 @@ test_files:
1046
1110
  - spec/lib/ruby_smb/smb2/bit_field/share_flags_spec.rb
1047
1111
  - spec/lib/ruby_smb/smb2/bit_field/smb2_capabilities_spec.rb
1048
1112
  - spec/lib/ruby_smb/smb2/bit_field/smb_secruity_mode_spec.rb
1049
- - spec/lib/ruby_smb/smb2/create_context_spec.rb
1113
+ - spec/lib/ruby_smb/smb2/create_context/create_context_request_spec.rb
1050
1114
  - spec/lib/ruby_smb/smb2/file_spec.rb
1051
1115
  - spec/lib/ruby_smb/smb2/negotiate_context_spec.rb
1052
1116
  - spec/lib/ruby_smb/smb2/packet/close_request_spec.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,20 +0,0 @@
1
- module RubySMB
2
- module SMB1
3
- # This module holds the Create Actions used in NT_TRANSACT_CREATE and
4
- # SMB_COM_NT_CREATE_ANDX responses. The definitions for these values can be found at
5
- # [2.2.7.1.2 Response](https://msdn.microsoft.com/en-us/library/ee441961.aspx)
6
- module CreateActions
7
- # An existing file was deleted and a new file was created in its place.
8
- FILE_SUPERSEDED = 0x00000000
9
-
10
- # An existing file was opened.
11
- FILE_OPENED = 0x00000001
12
-
13
- # A new file was created.
14
- FILE_CREATED = 0x00000002
15
-
16
- # An existing file was overwritten.
17
- FILE_OVERWRITEN = 0x00000003
18
- end
19
- end
20
- end