Nmap bitcoin-info NSE Script


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

Script Description


The bitcoin-info.nse script extracts version and node information from a Bitcoin server

Bitcoin-info NSE Script Arguments


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

Bitcoin-info NSE Script Example Usage


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

nmap -p 8333 --script bitcoin-info <ip>

Bitcoin-info NSE Script Example Output


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

PORT     STATE SERVICE
8333/tcp open  bitcoin
| bitcoin-info:
|   Timestamp: 2018-03-09T06:25:49
|   Network: main
|   Version: 0.7.0
|   Node Id: 26855fa1ac038c12
|   Lastblock: 512702
|_  User Agent: /Satoshi:0.14.2/

Bitcoin-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


Related NSE scripts to the bitcoin-info.nse script:

Visit Nmap NSE Library for more scripts.

The bitcoin-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:

48:	
49:	  local bcoin = bitcoin.Helper:new(host, port, { timeout = 10000 })
50:	  local status = bcoin:connect()
51:	
52:	  if ( not(status) ) then
53:	    return fail("Failed to connect to server")
54:	  end
55:	
56:	  local request_time = os.time()
57:	  local status, ver = bcoin:exchVersion()
58:	  if ( not(status) ) then

Failed to extract version information


Here is a relevant code snippet related to the "Failed to extract version information" error message:

54:	  end
55:	
56:	  local request_time = os.time()
57:	  local status, ver = bcoin:exchVersion()
58:	  if ( not(status) ) then
59:	    return fail("Failed to extract version information")
60:	  end
61:	  bcoin:close()
62:	  datetime.record_skew(host, ver.timestamp, request_time)
63:	
64:	  local result = stdnse.output_table()

Version


This page has been created based on Nmap version 7.92.

Go back to menu.