Nmap gpsd-info NSE Script
This page contains detailed information about how to use the gpsd-info NSE script. For list of all NSE scripts, visit the Nmap NSE Library.
Select: |
---|
Script Overview
Script source code: https://github.com/nmap/nmap/tree/master/scripts/gpsd-info.nse
Script categories: discovery, safe
Target service / protocol: gpsd-ng, tcp
Target network port(s): 2947
List of CVEs: -
Script Description
The gpsd-info.nse script retrieves GPS time, coordinates and speed from the GPSD network daemon.
Gpsd-info NSE Script Arguments
This is a full list of arguments supported by the gpsd-info.nse script:
gpsd-info.timeoutTimespec defining how long to wait for data (default 10s)
- - -
To use this script argument, add it to Nmap command line like in this example:
nmap --script=gpsd-info --script-args gpsd-info.timeout=value <target>
Gpsd-info NSE Script Example Usage
Here's an example of how to use the gpsd-info.nse script:
nmap -p 2947 <ip> --script gpsd-info
Gpsd-info NSE Script Example Output
Here's a sample output from the gpsd-info.nse script:
PORT STATE SERVICE REASON
2947/tcp open gpsd-ng syn-ack
| gpsd-info:
| Time of fix: Sat Apr 14 15:54:23 2012
| Coordinates: 59.321685,17.886493
|_ Speed: - knots
Gpsd-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
- https://nmap.org/nsedoc/scripts/gpsd-info.html
- https://github.com/nmap/nmap/tree/master/scripts/gpsd-info.nse
See Also
Visit Nmap NSE Library for more scripts.
The gpsd-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:
68: socket:set_timeout(1000)
69:
70: local status = socket:connect(host, port)
71:
72: if ( not(status) ) then
73: return fail("Failed to connect to server")
74: end
75:
76: -- get the banner
77: local status, line = socket:receive_lines(1)
78: socket:send('?WATCH={"enable":true,"nmea":true}\r\n')
Version
This page has been created based on Nmap version 7.92.
Go back to menu.