Class: Rex::Proto::MsDnsp::MsDnspAddr6

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/rex/proto/ms_dnsp.rb

Instance Method Summary collapse

Instance Method Details

#getObject

[View source]

71
72
73
# File 'lib/rex/proto/ms_dnsp.rb', line 71

def get
  Rex::Socket.addr_ntoa(self.data)
end

#set(v) ⇒ Object

Raises:

  • (TypeError)
[View source]

75
76
77
78
79
# File 'lib/rex/proto/ms_dnsp.rb', line 75

def set(v)
  raise TypeError, 'must be an IPv6 address' unless Rex::Socket.is_ipv6?(v)

  self.data = Rex::Socket.addr_aton(v)
end