Sha256: a07e3c0cac9d05f610aabf3c7bd868071b1de443afe72df5370763c052149abd

Contents?: true

Size: 845 Bytes

Versions: 11

Compression:

Stored size: 845 Bytes

Contents

module Net
  module NTLM

    BLOB_SIGN = 0x00000101

    class Blob < FieldSet
      int32LE    :blob_signature, {:value => BLOB_SIGN}
      int32LE    :reserved,       {:value => 0}
      int64LE    :timestamp,      {:value => 0}
      string     :challenge,      {:value => "", :size => 8}
      int32LE    :unknown1,       {:value => 0}
      string     :target_info,    {:value => "", :size => 0}
      int32LE    :unknown2,       {:value => 0}

      def parse(str, offset=0)
        # 28 is the length of all fields before the variable-length
        # target_info field.
        if str.size > 28
          enable(:target_info)
          # Grab everything except the last 4 bytes (which will be :unknown2)
          self[:target_info].value = str[28..-5]
        end
        super
      end
    end

  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.1/lib/net/ntlm/blob.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/lib/net/ntlm/blob.rb
rubyntlm-0.6.1 lib/net/ntlm/blob.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/lib/net/ntlm/blob.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/lib/net/ntlm/blob.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/lib/net/ntlm/blob.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/lib/net/ntlm/blob.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/lib/net/ntlm/blob.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/lib/net/ntlm/blob.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/lib/net/ntlm/blob.rb
rubyntlm-0.6.0 lib/net/ntlm/blob.rb