Syntax

The following are the arguments which are required in an nmap command in order to execute the script:

  • --script <filename>|<category>|<directory>|<expression>: This argument allows the user to specify the script to be executed, where the filename, category, directory, and expression follow in order to help the user select the scripts. In order for the user to execute these scripts, they need to be present in the scripts folder of the Nmap installation directory:

The generic syntax used here is as follows:

nmap  --script afp-ls.nse <host>
  • --script-args: This allows the user to pass inputs to the nmap command if required. The generic syntax used here is as follows:
nmap  --script afp-ls.nse --script-args <arguments> <host>
  • --script-args-file: This allows the user to upload file inputs to the nmap command. The generic syntax used here is as follows:
nmap  --script afp-ls.nse --script-args-file <filename/path> <host>
  • --script-help <filename>|<category>|<directory>|<expression>: This argument will allow the user to obtain more information about the scripts which can be used. The generic syntax used here is as follows:
nmap  --script-help <filename>

As the output was huge, we saved it to a file called output.txt in the D drive. Open the output file in a text editor to see the help message:

  • --script-trace: If used, this argument will allow the user to view the network communication being performed by the script:
nmap  --script afp-ls.nse –script-trace <hostname>
  • --script-updatedb: This is used to update the script's database, which is used by Nmap. The generic syntax used here is as follows:
nmap  --script-updatedb
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.59.163