syspy 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/tds_package_stream.rb +4 -4
  2. metadata +1 -1
@@ -62,7 +62,7 @@ module Syspy
62
62
  end
63
63
 
64
64
  def handle_package(io)
65
- token = io.readbyte()
65
+ token = Bytes.uint(io)
66
66
  token_class = TdsTokens.token_class(token)
67
67
  if(token_class)
68
68
  length = TdsTokens.fixed_length(token)
@@ -88,7 +88,7 @@ module Syspy
88
88
  }
89
89
 
90
90
  # read IP version and header length
91
- ver_len = io.readbyte()
91
+ ver_len = Bytes.uint(io)
92
92
  version = ver_len >> 4
93
93
 
94
94
  raise "Invalid IP version: #{version}" unless version == 4 || version == 6
@@ -96,7 +96,7 @@ module Syspy
96
96
  header_length = (ver_len & 0x0F) * 4
97
97
 
98
98
  # skip TOS
99
- io.readbyte()
99
+ Bytes.uint(io)
100
100
 
101
101
  # get package length
102
102
  content_length = Bytes.uint16be(io)
@@ -111,7 +111,7 @@ module Syspy
111
111
  io.read(12)
112
112
 
113
113
  # get header length
114
- tcp_offset = (io.readbyte() >> 4) * 4
114
+ tcp_offset = (Bytes.uint(io) >> 4) * 4
115
115
 
116
116
  # consume remaining tcp header
117
117
  io.read(tcp_offset - 13)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syspy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: