nmap command help required

@khalmxj said:

Thanks for a very clear direction and help.

Welcome.

Really, I’d suggest using nmap as a single line rather than sending it to the $ports variable and calling it a second time, but it depends on what automation you have in place.

Personally, I’d use:

nmap -Pn -sC -sV -oA all_tcp -T4 --min-rate=1000 -vvvvvvv --reason -p- IPADDRESSGOESHERE on HTB