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

Inherits:
Object
  • Object
show all
Defined in:
lib/msf/core/exploit/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.


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

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

Instance Attribute Details

#bodyObject

Returns the value of attribute body


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

def body
  @body
end

#headerObject

Returns the value of attribute header


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

def header
  @header
end

Class Method Details

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


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

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