└──╼ $nmap -sC -sV -p$ports 10.10.10.27
Starting Nmap 7.80 ( https://nmap.org ) at 2020-04-27 01:56 BST
Error #487: Your port specifications are illegal. Example of proper form: “-100,200-1024,T:3000-4000,U:60000-”
QUITTING!
why doesn’t the command given at the starting point work?
What are you trying to accomplish? The $ports option doesn’t belong in there (I’m not even sure it exists). If you’re trying to scan specific ports it would look something like “nmap -sC -sV -p 10.10.10.27”.
Oops, it removed the part after -p. “nmap -sC -sV -p (port to scan) 10.10.10.27”
@syspentarc said:
why doesn’t the command given at the starting point work?
There could be a couple of reasons for this but it would be worth looking at what else you’ve used.
At a very high level, it is saying that whatever has gone into $ports isn’t being recognised as a sequence of ports. It could be that you are missing commas between the port numbers.