Nmap targets-ipv6-wordlist NSE Script


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

Script Description


The targets-ipv6-wordlist.nse script adds IPv6 addresses to the scan queue using a wordlist of hexadecimal "words" that form addresses in a given subnet.

Targets-ipv6-wordlist NSE Script Arguments


This is a full list of arguments supported by the targets-ipv6-wordlist.nse script:

targets-ipv6-subnet

Table/single IPv6 address with prefix (Ex. 2001:db8:c0ca::/48 or { 2001:db8:c0ca::/48, 2001:db8:FEA::/48 } )

targets-ipv6-wordlist.fillright

With this argument the script will fill remaining zeros to the right instead of left (2001:db8:c0a:dead:: instead of 2001:db8:c0ca::dead)

targets-ipv6-wordlist.nsegments

Number User can indicate exactly how big the word must be on Segments of 16 bits.

targets-ipv6-wordlist.wordlist

File containing hexadecimal words for building addresses, one per line. Default: nselib/data/targets-ipv6-wordlist

max-newtargets

Sets the number of the maximum allowed new targets. If set to 0 or less then there is no limit. The default value is 0.

newtargets

If specified, lets NSE scripts add new targets.

- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..] syntax. For example:

nmap --script=targets-ipv6-wordlist --script-args targets-ipv6-subnet=value,targets-ipv6-wordlist.fillright=value <target>

Targets-ipv6-wordlist NSE Script Example Usage


Here's an example of how to use the targets-ipv6-wordlist.nse script:

nmap -6 -p 80 --script targets-ipv6-wordlist --script-args newtargets,targets-ipv6-subnet={2001:db8:c0ca::/64}

Targets-ipv6-wordlist NSE Script Example Output


Here's a sample output from the targets-ipv6-wordlist.nse script:

Pre-scan script results:
| targets-ipv6-wordlist:
|_  node count: 1254

Targets-ipv6-wordlist 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


  • Ral Fuentes

References


See Also


Related NSE scripts to the targets-ipv6-wordlist.nse script:

Visit Nmap NSE Library for more scripts.

The targets-ipv6-wordlist.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 IPv6 address: %s


Here is a relevant code snippet related to the "Failed to create IPv6 address: %s" error message:

112:	      -- We pass the binaries to valid IPv6
113:	      local Error
114:	      Host, Error = ipOps.bin_to_ip(Host)
115:	      if Host == nil then
116:	        -- Something is very wrong but we don-t stop
117:	        stdnse.debug1("Failed to create IPv6 address: %s", Error)
118:	      else
119:	        if target.ALLOW_NEW_TARGETS then
120:	          local bAux, sAux = target.add(Host)
121:	          if bAux then
122:	            iTotal = iTotal + 1

Had been a error adding the node %s: %s


Here is a relevant code snippet related to the "Had been a error adding the node %s: %s" error message:

119:	        if target.ALLOW_NEW_TARGETS then
120:	          local bAux, sAux = target.add(Host)
121:	          if bAux then
122:	            iTotal = iTotal + 1
123:	          else
124:	            stdnse.debug1("Had been a error adding the node %s: %s", Host, sAux)
125:	          end
126:	        end
127:	      end
128:	    end
129:	  end

There is not IPv6 subnets to try to scan!.


Here is a relevant code snippet related to the "There is not IPv6 subnets to try to scan!." error message:

193:	    return false, tSalida
194:	  end
195:	
196:	  -- We pass all the prefixes to one single table (health for the eyes)
197:	  if IPv6PrefijoUsuario == nil then
198:	    tSalida.Error = "There is not IPv6 subnets to try to scan!." ..
199:	    " You can run a script for discovering or adding your own" ..
200:	    " with the arg: targets-ipv6-subnet."
201:	    return false, tSalida
202:	  end
203:	

There was a error for the prefix %s: %s


Here is a relevant code snippet related to the "There was a error for the prefix %s: %s" error message:

219:	    local Direccion, Prefijo = split_prefix(PrefixAux)
220:	    local bSalida, nodes, sError = CrearRangoHosts(Direccion, Prefijo,
221:	      TablaPalabras, User_Segs, User_Right)
222:	
223:	    if bSalida ~= true then
224:	      stdnse.debug1("There was a error for the prefix %s: %s", PrefixAux, sError)
225:	    end
226:	
227:	    if sError and sError ~= "" then
228:	      -- Not all the error are fatal for the script.
229:	      tSalida.Error = tSalida.Error .. "\n" .. sError

Was unable to add nodes to the scan list due this error: %s


Here is a relevant code snippet related to the "Was unable to add nodes to the scan list due this error: %s" error message:

263:	  local bExito, tSalida = Prescanning()
264:	
265:	  -- Now we adapt the exit to tOutput and add the hosts to the target!
266:	  if tSalida.Error and tSalida.Error ~= "" then
267:	    tOutput.warning = tSalida.Error
268:	    stdnse.debug1("Was unable to add nodes to the scan list due this error: %s",
269:	      tSalida.Error)
270:	  end
271:	
272:	  if bExito then
273:	    if tSalida.Nodos == 0 then

Version


This page has been created based on Nmap version 7.92.

Go back to menu.