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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddd72f55b7cfbe6907e179398762e3ea353e4b4b
4
- data.tar.gz: 565f474fa8140500252ac2f9cada13566d8f3566
3
+ metadata.gz: 2c631886979a7433c911311d4a86e396714d492c
4
+ data.tar.gz: 2239c4167668f032308e16d047b40e0f4c1587cb
5
5
  SHA512:
6
- metadata.gz: 4a49da2c17d8eb6384a64932eed74f64365f45c5400c3291b289ec49de946852f276864ab5f5a3b8fc07bfd5a00c966ab076fd356f61f6b2af096eb871ed42a8
7
- data.tar.gz: cbd0b9a55074976eaa380125d07592c06640b5139d46da8be55eff603a03304f07f8cb87b9b296d13eae88adabc9f80998491781c93fd7a6083c094aa767ccdf
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
- nbss_header = RubySMB::Nbss::SessionHeader.read(@tcp_socket)
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
@@ -1,3 +1,3 @@
1
1
  module RubySMB
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
@@ -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(response_socket).and_return(session_header)
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.2
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-06-28 00:00:00.000000000 Z
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