Nmap voldemort-info NSE Script


This page contains detailed information about how to use the voldemort-info NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Select:
Overview
Error Messages

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/voldemort-info.nse
Script categories: discovery, safe
Target service / protocol: vp3, tcp
Target network port(s): 6666
List of CVEs: -

Script Description


The voldemort-info.nse script retrieves cluster and store information from the Voldemort distributed key-value store using the Voldemort Native Protocol.

Voldemort-info NSE Script Arguments


The voldemort-info.nse script does not have any arguments.

Voldemort-info NSE Script Example Usage


Here's an example of how to use the voldemort-info.nse script:

nmap -p 6666 --script voldemort-info <ip>

Voldemort-info NSE Script Example Output


Here's a sample output from the voldemort-info.nse script:

PORT     STATE SERVICE
6666/tcp open  irc
| voldemort-info:
|   Cluster
|     Name: mycluster
|     Id: 0
|     Host: localhost
|     HTTP Port: 8081
|     TCP Port: 6666
|     Admin Port: 6667
|     Partitions: 0, 1
|   Stores
|     test
|       Persistence: bdb
|       Description: Test store
|       Owners: [email protected], [email protected]
|       Routing strategy: consistent-routing
|       Routing: client
|     wordcounts
|       Persistence: read-only
|       Routing strategy: consistent-routing
|_      Routing: client

Voldemort-info NSE Script Example XML Output


There is no sample XML output for this module. However, by providing the -oX <file> option, Nmap will produce a XML output and save it in the file.xml file.

Author


  • Patrik Karlsson

References


See Also


Visit Nmap NSE Library for more scripts.

The voldemort-info.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.

Failed to connect to server


Here is a relevant code snippet related to the "Failed to connect to server" error message:

55:	  local socket = nmap.new_socket()
56:	  socket:set_timeout(5000)
57:	
58:	  local status, err = socket:connect(host, port)
59:	  if ( not(status) ) then
60:	    return false, "Failed to connect to server"
61:	  end
62:	
63:	  status, err = socket:send("vp3")
64:	  if ( not(status) ) then
65:	    return false, "Failed to send request to server"

Failed to send request to server


Here is a relevant code snippet related to the "Failed to send request to server" error message:

60:	    return false, "Failed to connect to server"
61:	  end
62:	
63:	  status, err = socket:send("vp3")
64:	  if ( not(status) ) then
65:	    return false, "Failed to send request to server"
66:	  end
67:	
68:	  local response
69:	  status, response = socket:receive_bytes(2)
70:	  if ( not(status) ) then

Failed to receive response from server


Here is a relevant code snippet related to the "Failed to receive response from server" error message:

66:	  end
67:	
68:	  local response
69:	  status, response = socket:receive_bytes(2)
70:	  if ( not(status) ) then
71:	    return false, "Failed to receive response from server"
72:	  elseif( response ~= "ok" ) then
73:	    return false, "Unsupported protocol"
74:	  end
75:	  return true, socket
76:	end

Unsupported protocol


Here is a relevant code snippet related to the "Unsupported protocol" error message:

68:	  local response
69:	  status, response = socket:receive_bytes(2)
70:	  if ( not(status) ) then
71:	    return false, "Failed to receive response from server"
72:	  elseif( response ~= "ok" ) then
73:	    return false, "Unsupported protocol"
74:	  end
75:	  return true, socket
76:	end
77:	
78:	-- Get Voldemort metadata

Failed to send request to server


Here is a relevant code snippet related to the "Failed to send request to server" error message:

83:	local function getMetadata(socket, file)
84:	
85:	  local req = "\x01\x00" .. string.pack(">s1x I4 s1x", "metadata", 0, file)
86:	  local status, err = socket:send(req)
87:	  if ( not(status) ) then
88:	    return false, "Failed to send request to server"
89:	  end
90:	  local status, data = socket:receive_bytes(10)
91:	  if ( not(status) ) then
92:	    return false, "Failed to receive response from server"
93:	  end

Failed to receive response from server


Here is a relevant code snippet related to the "Failed to receive response from server" error message:

87:	  if ( not(status) ) then
88:	    return false, "Failed to send request to server"
89:	  end
90:	  local status, data = socket:receive_bytes(10)
91:	  if ( not(status) ) then
92:	    return false, "Failed to receive response from server"
93:	  end
94:	  local len = string.unpack(">I2", data, 9)
95:	  while( #data < len - 2 ) do
96:	    local status, tmp = socket:receive_bytes(len - 2 - #data)
97:	    if ( not(status) ) then

Failed to receive response from server


Here is a relevant code snippet related to the "Failed to receive response from server" error message:

93:	  end
94:	  local len = string.unpack(">I2", data, 9)
95:	  while( #data < len - 2 ) do
96:	    local status, tmp = socket:receive_bytes(len - 2 - #data)
97:	    if ( not(status) ) then
98:	      return false, "Failed to receive response from server"
99:	    end
100:	    data = data .. tmp
101:	  end
102:	  return true, data
103:	end

Version


This page has been created based on Nmap version 7.92.

Go back to menu.