Nmap rsync-list-modules NSE Script


This page contains detailed information about how to use the rsync-list-modules 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/rsync-list-modules.nse
Script categories: discovery, safe
Target service / protocol: rsync, tcp
Target network port(s): 873
List of CVEs: -

Script Description


The rsync-list-modules.nse script lists modules available for rsync (remote file sync) synchronization.

Rsync-list-modules NSE Script Arguments


The rsync-list-modules.nse script does not have any arguments.

Rsync-list-modules NSE Script Example Usage


Here's an example of how to use the rsync-list-modules.nse script:

nmap -p 873 --script rsync-list-modules <ip>

Rsync-list-modules NSE Script Example Output


Here's a sample output from the rsync-list-modules.nse script:

PORT    STATE SERVICE
873/tcp open  rsync
| rsync-list-modules:
|   www            	www directory
|   log            	log directory
|_  etc            	etc directory

Rsync-list-modules 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


Related NSE scripts to the rsync-list-modules.nse script:

Visit Nmap NSE Library for more scripts.

The rsync-list-modules.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 create rsync.Helper


Here is a relevant code snippet related to the "Failed to create rsync.Helper" error message:

29:	local function fail (err) return stdnse.format_output(false, err) end
30:	
31:	action = function(host, port)
32:	  local helper = rsync.Helper:new(host, port, { module = "" })
33:	  if ( not(helper) ) then
34:	    return fail("Failed to create rsync.Helper")
35:	  end
36:	
37:	  local status, err = helper:connect()
38:	  if ( not(status) ) then
39:	    return fail("Failed to connect to rsync server")

Failed to connect to rsync server


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

34:	    return fail("Failed to create rsync.Helper")
35:	  end
36:	
37:	  local status, err = helper:connect()
38:	  if ( not(status) ) then
39:	    return fail("Failed to connect to rsync server")
40:	  end
41:	
42:	  local modules = {}
43:	  status, modules = helper:listModules()
44:	  if ( not(status) ) then

Failed to retrieve a list of modules


Here is a relevant code snippet related to the "Failed to retrieve a list of modules" error message:

38:	  if ( not(status) ) then
39:	    return fail("Failed to connect to rsync server")
40:	  end
41:	
42:	  local modules = {}
43:	  status, modules = helper:listModules()
44:	  if ( not(status) ) then
45:	    return fail("Failed to retrieve a list of modules")
46:	  end
47:	  return stdnse.format_output(true, modules)
48:	end

Version


This page has been created based on Nmap version 7.92.

Go back to menu.