ruby_smb 3.2.6 → 3.2.7
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 +0 -0
- data/lib/ruby_smb/smb2/create_context.rb +5 -2
- data/lib/ruby_smb/version.rb +1 -1
- data/spec/lib/ruby_smb/smb2/create_context/create_context_request_spec.rb +35 -0
- data.tar.gz.sig +0 -0
- metadata +25 -84
- 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: 3c3642cdede7c8763296f8249419acad490605d06b8dc546411dab0ab25a7250
|
4
|
+
data.tar.gz: ff2403b3cd0e5b633fcee3db672dee4c4f582d13ac7bfbf3cd1dd7b4c9d2e5f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97bd6b1bdf5b205eb8c21f1d5d980e03a616f7f25dba1219b280a199dbeb72fecc7c9dfe2efd2afa847a3e524f3ea167cc364d79e2be8b72e7e8788cdd5c29b9
|
7
|
+
data.tar.gz: 61ea09ea2cd46411ead8e4bef0ce4c9eb194d8e741b1a1b1bfdd582a260d89e04edc57bd4e47ae0603a1ae125846062dde03a47ff1b17095b8b605b725461d44
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -51,8 +51,11 @@ module RubySMB
|
|
51
51
|
def calc_buffer_size
|
52
52
|
align = 8
|
53
53
|
size = 0
|
54
|
-
size += name_length
|
55
|
-
size +=
|
54
|
+
size += name_length
|
55
|
+
size += ((align - size % align) % align) if name_offset < data_offset
|
56
|
+
size += data_length
|
57
|
+
size += ((align - size % align) % align) if data_offset < name_offset
|
58
|
+
size += ((align - size % align) % align) if next_offset != 0
|
56
59
|
size
|
57
60
|
end
|
58
61
|
|
data/lib/ruby_smb/version.rb
CHANGED
@@ -8,6 +8,7 @@ RSpec.describe RubySMB::SMB2::CreateContext::CreateContextRequest do
|
|
8
8
|
it { is_expected.to respond_to :name_length }
|
9
9
|
it { is_expected.to respond_to :data_offset }
|
10
10
|
it { is_expected.to respond_to :data_length }
|
11
|
+
it { is_expected.to respond_to :buffer }
|
11
12
|
it { is_expected.to respond_to :name }
|
12
13
|
it { is_expected.to respond_to :data }
|
13
14
|
|
@@ -39,4 +40,38 @@ RSpec.describe RubySMB::SMB2::CreateContext::CreateContextRequest do
|
|
39
40
|
expect(struct.data_offset).to eq 0
|
40
41
|
end
|
41
42
|
end
|
43
|
+
|
44
|
+
context 'when reading a packet with extra padding' do
|
45
|
+
# :name_offset=>120,
|
46
|
+
# :name_length=>14,
|
47
|
+
# :contexts_offset=>136,
|
48
|
+
# :contexts_length=>60,
|
49
|
+
# :bytes_remaining=>76,
|
50
|
+
# :buffer=> "t\x00e\x00s\x00t\x00.\x00r\x00b\x00\x00\x00\x00\x00\x00[...SNIP...]"
|
51
|
+
let(:raw_data) {
|
52
|
+
"\x00\x00\x00\x00\x10\x00\x04\x00\x00\x00\x18\x00\x24\x00\x00\x00\x44\x48\x32\x43\x00\x00"\
|
53
|
+
"\x00\x00\x04\xfa\xb6\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x43\xe0\x35"\
|
54
|
+
"\x5c\x6e\xee\x11\xb8\xbb\x00\x0c\x29\xc1\x13\xd0\x00\x00\x00\x00".b
|
55
|
+
}
|
56
|
+
|
57
|
+
it 'reads without error' do
|
58
|
+
expect { described_class.read(raw_data) }.to_not raise_error
|
59
|
+
end
|
60
|
+
|
61
|
+
context 'when getting #name and #data' do
|
62
|
+
let(:create_request_packet) { described_class.read(raw_data) }
|
63
|
+
|
64
|
+
it 'gets the expected #name value' do
|
65
|
+
create_request_packet.name.read_now!
|
66
|
+
expect(create_request_packet.name).to eq 'DH2C'
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'gets the expected #data value' do
|
70
|
+
create_request_packet.data.read_now!
|
71
|
+
expected_data = "\x04\xfa\xb6\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x43"\
|
72
|
+
"\xe0\x35\x5c\x6e\xee\x11\xb8\xbb\x00\x0c\x29\xc1\x13\xd0\x00\x00\x00\x00".b
|
73
|
+
expect(create_request_packet.data).to eq expected_data
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
42
77
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
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: 3.2.
|
4
|
+
version: 3.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -14,90 +14,31 @@ bindir: bin
|
|
14
14
|
cert_chain:
|
15
15
|
- |
|
16
16
|
-----BEGIN CERTIFICATE-----
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
+
|
17
|
+
MIIERDCCAqygAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBttc2Zk
|
18
|
+
ZXYvREM9bWV0YXNwbG9pdC9EQz1jb20wHhcNMjMxMDMwMTYwNDI1WhcNMjUxMDI5
|
19
|
+
MTYwNDI1WjAmMSQwIgYDVQQDDBttc2ZkZXYvREM9bWV0YXNwbG9pdC9EQz1jb20w
|
20
|
+
ggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDZN/EKv+yVjwiKWvjAVhjF
|
21
|
+
aWNYI0E9bJ5d1qKd29omRYX9a+OOKBCu5+394fyF5RjwU4mYGr2iopX9ixRJrWXH
|
22
|
+
ojs70tEvV1CmvP9rhz7JKzQQ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WGOQy0m4fBrkyjAyH9Djjn81RbQrqYgPuhd5nD0HjN3VUQLhQbIJrk9TVs0
|
97
|
-
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
98
|
-
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
99
|
-
-----END CERTIFICATE-----
|
100
|
-
date: 2023-10-25 00:00:00.000000000 Z
|
41
|
+
date: 2023-11-13 00:00:00.000000000 Z
|
101
42
|
dependencies:
|
102
43
|
- !ruby/object:Gem::Dependency
|
103
44
|
name: redcarpet
|
metadata.gz.sig
CHANGED
Binary file
|