PT0-002 Exam QuestionsBrowse all questions from this exam

PT0-002 Exam - Question 262


During a vulnerability scanning phase, a penetration tester wants to execute an Nmap scan using custom NSE scripts stored in the following folder:

/home/user/scripts

Which of the following commands should the penetration tester use to perform this scan?

Show Answer
Correct Answer: C

To execute an Nmap scan using custom NSE scripts stored in a specified folder, the correct command is nmap --script followed by the path to the folder. This option directs Nmap to use all the scripts located in the given directory. Therefore, nmap --script /home/user/scripts is the appropriate command to use for this scenario.

Discussion

5 comments
Sign in to comment
hqle26Option: C
Oct 27, 2023

https://nmap.org/book/man-nse.html

mazingyOption: C
Oct 25, 2023

nmap has no "--load" option. nmap --script /path/to/directory is correct

ACMaverickOption: D
Oct 22, 2023

To execute an Nmap scan using custom NSE scripts stored in the folder /home/user/scripts, the penetration tester should use the command D. nmap --load /home/user/scripts 1. Option A is not a valid command for executing an Nmap scan with custom NSE scripts 1. Option B is not a valid command for executing an Nmap scan with custom NSE scripts 1. Option C is not a valid command for executing an Nmap scan with custom NSE scripts. The --script option is used to specify the name of a script or category of scripts to run, not the path to a directory containing scripts 1. Therefore, option D is the correct command for executing an Nmap scan with custom NSE scripts.

LiveLaughToasterBathOption: C
Jan 29, 2024

--script <filename>|<category>|<directory>/|<expression>[,...]

CCSXoraboveOption: C
Jul 19, 2024

nmap --script default,banner,/home/user/customscripts Loads the script in the default category, the banner script, and all .nse files in the directory /home/user/customscripts. https://nmap.org/book/nse-usage.html