Nmap openflow-info NSE Script


This page contains detailed information about how to use the openflow-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/openflow-info.nse
Script categories: default, safe
Target service / protocol: openflow, tcp
Target network port(s): 6633, 6653
List of CVEs: -

Script Description


The openflow-info.nse script queries OpenFlow controllers for information. Newer versions of the OpenFlow protocol (1.3 and greater) will return a list of all protocol versions supported by the controller. Versions prior to 1.3 only return their own version number.

For additional information:

Openflow-info NSE Script Arguments


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

Openflow-info NSE Script Example Usage


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

nmap -p 6633,6653 --script openflow-info <target>

Openflow-info NSE Script Example Output


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

PORT     STATE SERVICE REASON
6653/tcp open  openflow
| openflow-info:
|   OpenFlow Running Version: 1.5.X
|   OpenFlow Versions Supported:
|     1.0
|     1.1
|     1.2
|     1.3.X
|     1.4.X
|_    1.5.X

Openflow-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.

Authors


References


See Also


Visit Nmap NSE Library for more scripts.

The openflow-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 service: %s


Here is a relevant code snippet related to the "Failed to connect to service: %s" error message:

72:	  -- Earlier versions either say hello without the bitmap.
73:	  -- Some implementations are shy and don't make the first move, so we'll say
74:	  -- hello first. We'll pretend to be a switch using version 1.0 of the protocol
75:	  local socket, response = comm.tryssl(host, port, hello, {bytes = OPENFLOW_HEADER_SIZE})
76:	  if not socket then
77:	    stdnse.debug1("Failed to connect to service: %s", response)
78:	    return
79:	  end
80:	
81:	  if #response < OPENFLOW_HEADER_SIZE then
82:	    socket:close()

Failed to receive missing %d bytes of response: %s


Here is a relevant code snippet related to the "Failed to receive missing %d bytes of response: %s" error message:

129:	  -- remainder of the packet.
130:	  local missing_bytes = message_length - #response
131:	  local status, body = socket:receive_buf(match.numbytes(missing_bytes), true)
132:	  if not status then
133:	    socket:close()
134:	    stdnse.debug1("Failed to receive missing %d bytes of response: %s", missing_bytes, body)
135:	    return
136:	  end
137:	  message.body = (response .. body):sub(pos, message_length)
138:	
139:	  return message

Version


This page has been created based on Nmap version 7.92.

Go back to menu.