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

Author:

  • Sebastian Dragomir <velorien@gmail.com>

Copyright © Same as Nmap--See https://nmap.org/book/man-legal.html

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

Script Arguments

amqp.version

Can be used to specify the client version to use (currently, 0-8, 0-9 or 0-9-1)

Functions

connect (self)

Connects the AMQP socket

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

  • The AMQP protocol version
  • The server properties/capabilities

Functions

connect (self)

Connects the AMQP socket

Parameters

self
 
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

  • The AMQP protocol version
  • 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