ruby_smb 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -3
- data.tar.gz.sig +2 -5
- data/examples/delete_file.rb +0 -0
- data/examples/net_share_enum_all.rb +0 -0
- data/examples/pipes.rb +0 -0
- data/examples/rename_file.rb +0 -0
- data/lib/ruby_smb/smb1/file.rb +1 -1
- data/lib/ruby_smb/smb1/packet/trans2/find_first2_response.rb +0 -1
- data/lib/ruby_smb/smb1/packet/trans2/find_next2_response.rb +0 -1
- data/lib/ruby_smb/smb1/packet/trans2/open2_response.rb +1 -2
- data/lib/ruby_smb/smb1/packet/trans2/set_file_information_response.rb +1 -13
- data/lib/ruby_smb/version.rb +1 -1
- data/spec/lib/ruby_smb/smb1/file_spec.rb +1 -1
- data/spec/lib/ruby_smb/smb1/packet/trans2/find_first2_response_spec.rb +0 -1
- data/spec/lib/ruby_smb/smb1/packet/trans2/find_next2_response_spec.rb +0 -1
- data/spec/lib/ruby_smb/smb1/packet/trans2/open2_response_spec.rb +0 -5
- data/spec/lib/ruby_smb/smb1/packet/trans2/set_file_information_response_spec.rb +0 -6
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a4c28388e187c7ed38ec2227cbab2d5eea535dc63992b77c08ecea2134d3d8a
|
4
|
+
data.tar.gz: 3b4216b478fade93c8ee98aaef9728c76bbf86f959770feda7a02e59df748df4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11810d649bd5457d70bff31eeb416f3c38ceb56b59758b4c7c52ba27787fda892cf03aaecf3170d71881d0fd5077a8f022b63cc8afde8ba8a1d60007d080a4a0
|
7
|
+
data.tar.gz: 29a4954fc1f8680b3d4984d45f4f04f42ba19db9dcc6f57ccbc07595fe6001b12412acd48862fbec0e7f63744ddf91e8a4279933865d983632113ae84ba6df31
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
�
|
2
|
-
|
3
|
-
��>]�G2���|����s�lw�I�M
|
1
|
+
GX�9G9�n�dO�ӵ*���������_R�l7\��$� ��Sg�<t~�V%�ݛ�:c�"Q~�Q<u�F��/Y�{�>����[��d\m��Z,Lص�C����[UX
|
2
|
+
TV�M}7�'�ֱ��C���d�G����ʰrE�;���}���Rɞ�����w��Q�ۢe
|
data.tar.gz.sig
CHANGED
@@ -1,5 +1,2 @@
|
|
1
|
-
��
|
2
|
-
�D
|
3
|
-
�y�sA�C����VZ�5�@�'Њ��c�����"���`
|
4
|
-
��!K�W��*�B�E�6�1�
|
5
|
-
fn�{>$
|
1
|
+
\;c�yúB�а�H��3H��4�V̑�5���Ӥk�R~
|
2
|
+
`�.Umŀ>�E�b�Y�w;!�w`ΐD���%z�J#�E*2�IX;��8䉖�H���5��u�e݇��i��E�*J�
|
data/examples/delete_file.rb
CHANGED
File without changes
|
File without changes
|
data/examples/pipes.rb
CHANGED
File without changes
|
data/examples/rename_file.rb
CHANGED
File without changes
|
data/lib/ruby_smb/smb1/file.rb
CHANGED
@@ -301,7 +301,7 @@ module RubySMB
|
|
301
301
|
passthrough_info_level = RubySMB::Fscc::FileInformation::FILE_RENAME_INFORMATION +
|
302
302
|
RubySMB::Fscc::FileInformation::SMB_INFO_PASSTHROUGH
|
303
303
|
rename_request.data_block.trans2_parameters.information_level = passthrough_info_level
|
304
|
-
rename_request.data_block.trans2_data.info_level_struct.file_name = new_file_name
|
304
|
+
rename_request.data_block.trans2_data.info_level_struct.file_name = new_file_name
|
305
305
|
set_trans2_params(rename_request)
|
306
306
|
end
|
307
307
|
|
@@ -40,7 +40,6 @@ module RubySMB
|
|
40
40
|
|
41
41
|
# The {RubySMB::SMB1::DataBlock} specific to this packet type.
|
42
42
|
class DataBlock < RubySMB::SMB1::Packet::Trans2::DataBlock
|
43
|
-
uint8 :name, label: 'Name', initial_value: 0x00
|
44
43
|
string :pad1, length: -> { pad1_length }
|
45
44
|
trans2_parameters :trans2_parameters, label: 'Trans2 Parameters'
|
46
45
|
string :pad2, length: -> { pad2_length }
|
@@ -39,7 +39,6 @@ module RubySMB
|
|
39
39
|
|
40
40
|
# The {RubySMB::SMB1::DataBlock} specific to this packet type.
|
41
41
|
class DataBlock < RubySMB::SMB1::Packet::Trans2::DataBlock
|
42
|
-
uint8 :name, label: 'Name', initial_value: 0x00
|
43
42
|
string :pad1, length: -> { pad1_length }
|
44
43
|
trans2_parameters :trans2_parameters, label: 'Trans2 Parameters'
|
45
44
|
string :pad2, length: -> { pad2_length }
|
@@ -44,8 +44,7 @@ module RubySMB
|
|
44
44
|
class DataBlock < RubySMB::SMB1::Packet::Trans2::DataBlock
|
45
45
|
string :pad1, length: -> { pad1_length }
|
46
46
|
trans2_parameters :trans2_parameters, label: 'Trans2 Parameters'
|
47
|
-
|
48
|
-
string :trans2_data, label: 'Trans2 Data', length: 0
|
47
|
+
# trans2_data: No data is sent by this message.
|
49
48
|
end
|
50
49
|
|
51
50
|
smb_header :smb_header
|
@@ -23,23 +23,11 @@ module RubySMB
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
# The Trans2 Data Block for this particular Subcommand
|
27
|
-
class Trans2Data < BinData::Record
|
28
|
-
|
29
|
-
# Returns the length of the Trans2Data struct
|
30
|
-
# in number of bytes
|
31
|
-
def length
|
32
|
-
do_num_bytes
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
26
|
# The {RubySMB::SMB1::DataBlock} specific to this packet type.
|
37
27
|
class DataBlock < RubySMB::SMB1::Packet::Trans2::DataBlock
|
38
|
-
uint8 :name, label: 'Name', initial_value: 0x00
|
39
28
|
string :pad1, length: -> { pad1_length }
|
40
29
|
trans2_parameters :trans2_parameters, label: 'Trans2 Parameters'
|
41
|
-
|
42
|
-
trans2_data :trans2_data, label: 'Trans2 Data'
|
30
|
+
# trans2_data: No data is sent by this message.
|
43
31
|
end
|
44
32
|
|
45
33
|
smb_header :smb_header
|
data/lib/ruby_smb/version.rb
CHANGED
@@ -473,7 +473,7 @@ RSpec.describe RubySMB::SMB1::File do
|
|
473
473
|
end
|
474
474
|
|
475
475
|
it 'sets the File Information #rename_pending field of the packet' do
|
476
|
-
expect(file.rename_packet(filename).data_block.trans2_data.info_level_struct.file_name).to eq filename
|
476
|
+
expect(file.rename_packet(filename).data_block.trans2_data.info_level_struct.file_name).to eq filename
|
477
477
|
end
|
478
478
|
|
479
479
|
it 'sets the Trans2 ParameterBlock fields' do
|
@@ -32,7 +32,6 @@ RSpec.describe RubySMB::SMB1::Packet::Trans2::FindFirst2Response do
|
|
32
32
|
describe '#data_block' do
|
33
33
|
subject(:data_block) { packet.data_block }
|
34
34
|
|
35
|
-
it { is_expected.to respond_to :name }
|
36
35
|
it { is_expected.to respond_to :trans2_parameters }
|
37
36
|
it { is_expected.to respond_to :trans2_data }
|
38
37
|
|
@@ -32,7 +32,6 @@ RSpec.describe RubySMB::SMB1::Packet::Trans2::FindNext2Response do
|
|
32
32
|
describe '#data_block' do
|
33
33
|
subject(:data_block) { packet.data_block }
|
34
34
|
|
35
|
-
it { is_expected.to respond_to :name }
|
36
35
|
it { is_expected.to respond_to :trans2_parameters }
|
37
36
|
it { is_expected.to respond_to :trans2_data }
|
38
37
|
|
@@ -35,16 +35,11 @@ RSpec.describe RubySMB::SMB1::Packet::Trans2::Open2Response do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
it { is_expected.to respond_to :trans2_parameters }
|
38
|
-
it { is_expected.to respond_to :trans2_data }
|
39
38
|
|
40
39
|
it 'should keep #trans2_parameters 4-byte aligned' do
|
41
40
|
expect(data_block.trans2_parameters.abs_offset % 4).to eq 0
|
42
41
|
end
|
43
42
|
|
44
|
-
it 'should keep #trans2_data 4-byte aligned' do
|
45
|
-
expect(data_block.trans2_data.abs_offset % 4).to eq 0
|
46
|
-
end
|
47
|
-
|
48
43
|
describe '#trans2_parameters' do
|
49
44
|
subject(:parameters) { data_block.trans2_parameters }
|
50
45
|
|
@@ -28,18 +28,12 @@ RSpec.describe RubySMB::SMB1::Packet::Trans2::SetFileInformationResponse do
|
|
28
28
|
describe '#data_block' do
|
29
29
|
subject(:data_block) { packet.data_block }
|
30
30
|
|
31
|
-
it { is_expected.to respond_to :name }
|
32
31
|
it { is_expected.to respond_to :trans2_parameters }
|
33
|
-
it { is_expected.to respond_to :trans2_data }
|
34
32
|
|
35
33
|
it 'should keep #trans2_parameters 4-byte aligned' do
|
36
34
|
expect(data_block.trans2_parameters.abs_offset % 4).to eq 0
|
37
35
|
end
|
38
36
|
|
39
|
-
it 'should keep #trans2_data 4-byte aligned' do
|
40
|
-
expect(data_block.trans2_data.abs_offset % 4).to eq 0
|
41
|
-
end
|
42
|
-
|
43
37
|
describe '#trans2_parameters' do
|
44
38
|
subject(:parameters) { data_block.trans2_parameters }
|
45
39
|
|
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.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -97,7 +97,7 @@ cert_chain:
|
|
97
97
|
JI/W23RbIRksG2pioMhd4dCXq3FLLlkOV1YfCwWixNB+iIhQPPZVaPNfgPhCn4Dt
|
98
98
|
DeGjje/qA4fkLtRmOtb9PUBq3ToRDE4=
|
99
99
|
-----END CERTIFICATE-----
|
100
|
-
date: 2020-09-
|
100
|
+
date: 2020-09-23 00:00:00.000000000 Z
|
101
101
|
dependencies:
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: redcarpet
|
metadata.gz.sig
CHANGED
Binary file
|