Class/Module Index [+]

Quicksearch

Rex::Proto::NTLM::Base::String

Public Class Methods

new(opts) click to toggle source
# File lib/rex/proto/ntlm/base.rb, line 72
def initialize(opts)
        super(opts)
        @size = opts[:size]
end

Public Instance Methods

parse(str, offset=0) click to toggle source
# File lib/rex/proto/ntlm/base.rb, line 77
def parse(str, offset=0)
        if @active and str.size >= offset + @size
                @value = str[offset, @size]
                @size
        else
                0
        end
end
serialize() click to toggle source
# File lib/rex/proto/ntlm/base.rb, line 86
def serialize
        if @active
                @value
        else
                ""
        end
end
value=(val) click to toggle source
# File lib/rex/proto/ntlm/base.rb, line 94
def value=(val)
        @value = val
        @size = @value.nil? ? 0 : @value.size
        @active = (@size > 0)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.