Class: Msf::Exploit::Remote::NDMPSocket::NDMP::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/msf/core/exploit/remote/ndmp_socket.rb

Overview

This class represents a NDMP message, including its header and body.

Defined Under Namespace

Classes: Header

Constant Summary collapse

CONFIG_GET_HOST_INFO =
0x100
CONFIG_GET_BUTYPE_ATTR =
0x101
CONFIG_GET_SERVER_INFO =
0x108
NOTIFY_CONNECTED =
0x502
CONNECT_OPEN =
0x900
CONNECT_CLIENT_AUTH =
0x901

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(header, body) ⇒ Message

Returns a new instance of Message.



49
50
51
52
# File 'lib/msf/core/exploit/remote/ndmp_socket.rb', line 49

def initialize(header, body)
  @header = header
  @body = body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



47
48
49
# File 'lib/msf/core/exploit/remote/ndmp_socket.rb', line 47

def body
  @body
end

#headerObject

Returns the value of attribute header.



47
48
49
# File 'lib/msf/core/exploit/remote/ndmp_socket.rb', line 47

def header
  @header
end

Class Method Details

.new_request(type, body = '') ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/msf/core/exploit/remote/ndmp_socket.rb', line 35

def self.new_request(type, body='')
  header = Header.new(
    :sequence_num       => nil,
    :timestamp          => nil,
    :is_response        => false,
    :type               => type,
    :reply_sequence_num => 0,
    :error              => 0
  )
  new(header, body)
end