ruby_smb 1.0.2 → 1.0.3
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.tar.gz.sig +0 -0
- data/lib/ruby_smb/dispatcher/socket.rb +3 -1
- data/lib/ruby_smb/version.rb +1 -1
- data/spec/lib/ruby_smb/dispatcher/socket_spec.rb +3 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c631886979a7433c911311d4a86e396714d492c
|
4
|
+
data.tar.gz: 2239c4167668f032308e16d047b40e0f4c1587cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fcc1eacddf7c95375b966772d580357ba321d31c157d277e4c4306e448696f0f1f1aa210f06b127db7f2ffad83b5086f30608e8cbeb0ad370339dd3e1630731
|
7
|
+
data.tar.gz: 9cb22ee1ce93621365fba1f3bb67f0855a92331e28fc388b42d10e7b32716e587bfb29dda783d8c5bf617b388735f02abdc805a84b438aa1bdad70317f93d4f5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -66,7 +66,9 @@ module RubySMB
|
|
66
66
|
end
|
67
67
|
|
68
68
|
begin
|
69
|
-
|
69
|
+
nbss_data = @tcp_socket.read(4)
|
70
|
+
raise IOError if nbss_data.nil?
|
71
|
+
nbss_header = RubySMB::Nbss::SessionHeader.read(nbss_data)
|
70
72
|
rescue IOError
|
71
73
|
raise ::RubySMB::Error::NetBiosSessionService, 'NBSS Header is missing'
|
72
74
|
end
|
data/lib/ruby_smb/version.rb
CHANGED
@@ -85,7 +85,7 @@ RSpec.describe RubySMB::Dispatcher::Socket do
|
|
85
85
|
end
|
86
86
|
|
87
87
|
it 'reads the nbss header using Nbss::SessionHeader structure' do
|
88
|
-
expect(RubySMB::Nbss::SessionHeader).to receive(:read).with(
|
88
|
+
expect(RubySMB::Nbss::SessionHeader).to receive(:read).with(nbss).and_return(session_header)
|
89
89
|
smb_socket.recv_packet
|
90
90
|
end
|
91
91
|
|
@@ -105,6 +105,7 @@ RSpec.describe RubySMB::Dispatcher::Socket do
|
|
105
105
|
packet_length = 10
|
106
106
|
session_header.packet_length = packet_length
|
107
107
|
allow(RubySMB::Nbss::SessionHeader).to receive(:read).and_return(session_header)
|
108
|
+
expect(response_socket).to receive(:read).with(4).and_return(session_header)
|
108
109
|
expect(response_socket).to receive(:read).with(packet_length).and_return('A' * packet_length)
|
109
110
|
smb_socket.recv_packet
|
110
111
|
end
|
@@ -116,6 +117,7 @@ RSpec.describe RubySMB::Dispatcher::Socket do
|
|
116
117
|
session_header.packet_length = packet_length
|
117
118
|
allow(RubySMB::Nbss::SessionHeader).to receive(:read).and_return(session_header)
|
118
119
|
|
120
|
+
expect(response_socket).to receive(:read).with(4).and_return(session_header)
|
119
121
|
loop do
|
120
122
|
expect(response_socket).to receive(:read).with(packet_length).and_return('A' * returned_length).once
|
121
123
|
packet_length -= returned_length
|
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: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Maloney
|
@@ -91,7 +91,7 @@ cert_chain:
|
|
91
91
|
G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
|
92
92
|
8mVuTXnyJOKRJA==
|
93
93
|
-----END CERTIFICATE-----
|
94
|
-
date: 2018-
|
94
|
+
date: 2018-07-03 00:00:00.000000000 Z
|
95
95
|
dependencies:
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: redcarpet
|
metadata.gz.sig
CHANGED
Binary file
|