Class: Rex::Proto::NTLM::Base::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/proto/ntlm/base.rb

Overview

base classes for primitives

Direct Known Subclasses

Int16LE, Int32LE, Int64LE, String

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Field

Returns a new instance of Field.



62
63
64
65
# File 'lib/rex/proto/ntlm/base.rb', line 62

def initialize(opts)
	@value  = opts[:value]
	@active = opts[:active].nil? ? true : opts[:active]
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



60
61
62
# File 'lib/rex/proto/ntlm/base.rb', line 60

def active
  @active
end

#valueObject

Returns the value of attribute value.



60
61
62
# File 'lib/rex/proto/ntlm/base.rb', line 60

def value
  @value
end

Instance Method Details

#sizeObject



67
68
69
# File 'lib/rex/proto/ntlm/base.rb', line 67

def size
	@active ? @size : 0
end