class Rex::Proto::NTLM::Base::SecurityBuffer
Attributes
active[RW]
Public Class Methods
new(opts)
click to toggle source
Calls superclass method
# File lib/rex/proto/ntlm/base.rb, line 289 def initialize(opts) super() @value = opts[:value] @active = opts[:active].nil? ? true : opts[:active] @size = 8 end
Public Instance Methods
data_size()
click to toggle source
# File lib/rex/proto/ntlm/base.rb, line 319 def data_size @active ? @value.size : 0 end
parse(str, offset=0)
click to toggle source
Calls superclass method
# File lib/rex/proto/ntlm/base.rb, line 296 def parse(str, offset=0) if @active and str.size >= offset + @size super(str, offset) @value = str[self.offset, self.length] @size else 0 end end
serialize()
click to toggle source
Calls superclass method
# File lib/rex/proto/ntlm/base.rb, line 306 def serialize super if @active end
value()
click to toggle source
# File lib/rex/proto/ntlm/base.rb, line 310 def value @value end
value=(val)
click to toggle source
# File lib/rex/proto/ntlm/base.rb, line 314 def value=(val) @value = val self.length = self.allocated = val.size end