Home page logo
/
Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News

Sponsors


Library amqp

The AMQP library provides some basic functionality for retrieving information about an AMQP server's properties.

Summary ------- The library currently supports the AMQP 0-9 and 0-8 protocol specifications.

Overview -------- The library contains the following classes:

o AMQP - This class contains the core functions needed to communicate with AMQP

o AMQPSocket - This is a copy of the VNCSocket class.

Source: http://nmap.org/svn/nselib/amqp.lua

Functions

close (self)

Closes an open connection.

connect (self, hostid, port, protocol)

Establishes a connection.

connect (self, hostid, port, protocol)

Establishes a connection.

decodeBoolean (self, key, read)

Decodes a boolean value in the server properties field.

decodeString (self, key, read)

Decodes a string value in the server properties field.

decodeTable (self, tbl, tsize)

Decodes a table value in the server properties field.

disconnect (self)

Disconnects the AMQP socket

getProtocolVersion (self)

Returns the protocol version reported by the server

getServerProduct (self)

Returns the product name reported by the server

getServerProperties (self)

Returns the properties reported by the server

getServerVersion (self)

Returns the product version reported by the server

handshake (self)

Performs the AMQP handshake and determines o The AMQP protocol version o The server properties/capabilities

recv (self, count)

Opposed to the socket:receive_bytes function, that returns at least x bytes, this function returns the amount of bytes requested.

send (self, data)

Sends data over the socket



Functions

close (self)

Closes an open connection.

Parameters

  • self:

Return values:

  1. Status (true or false).
  2. Error code (if status is false).
connect (self, hostid, port, protocol)

Establishes a connection.

Parameters

  • self:
  • hostid: Hostname or IP address.
  • port: Port number.
  • protocol: "tcp", "udp", or

Return values:

  1. Status (true or false).
  2. Error code (if status is false).
connect (self, hostid, port, protocol)

Establishes a connection.

Parameters

  • self:
  • hostid: Hostname or IP address.
  • port: Port number.
  • protocol: "tcp", "udp", or

Return values:

  1. Status (true or false).
  2. Error code (if status is false).
decodeBoolean (self, key, read)

Decodes a boolean value in the server properties field.

Parameters

  • self:
  • key: string, the key being read
  • read: number, number of bytes already read

Return values:

  1. status, true on success, false on failure
  2. error string containing error message if status is false
  3. decoded value
  4. number of bytes read after decoding this value
decodeString (self, key, read)

Decodes a string value in the server properties field.

Parameters

  • self:
  • key: string, the key being read
  • read: number, number of bytes already read

Return values:

  1. status, true on success, false on failure
  2. error string containing error message if status is false
  3. decoded value
  4. number of bytes read after decoding this value
decodeTable (self, tbl, tsize)

Decodes a table value in the server properties field.

Parameters

  • self:
  • tbl: the decoded table
  • tsize: number, the table size in bytes

Return values:

  1. status, true on success, false on failure
  2. error string containing error message if status is false
  3. decoded value
disconnect (self)

Disconnects the AMQP socket

Parameters

  • self:
getProtocolVersion (self)

Returns the protocol version reported by the server

Parameters

  • self:

Return value:

string containing the version number
getServerProduct (self)

Returns the product name reported by the server

Parameters

  • self:

Return value:

string containing the product name
getServerProperties (self)

Returns the properties reported by the server

Parameters

  • self:

Return value:

table containing server properties
getServerVersion (self)

Returns the product version reported by the server

Parameters

  • self:

Return value:

string containing the version number
handshake (self)

Performs the AMQP handshake and determines o The AMQP protocol version o The server properties/capabilities

Parameters

  • self:

Return values:

  1. status, true on success, false on failure
  2. error string containing error message if status is false
recv (self, count)

Opposed to the socket:receive_bytes function, that returns at least x bytes, this function returns the amount of bytes requested.

Parameters

  • self:
  • count: of bytes to read

Return values:

  1. true on success, false on failure
  2. data containing bytes read from the socket err containing error message if status is false
send (self, data)

Sends data over the socket

Parameters

  • self:
  • data:

Return values:

  1. Status (true or false).
  2. Error code (if status is false).

Nmap Site Navigation

Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]