It's my understanding that with http/https related assets a port number isn't necessary to add when running the scan (ex: nuclei -t /path/file -u http://x.x.x.x) however if an asset has a different port then during scan it needs to be included (ex: nuclei -t /path/template-file -u x.x.x.x:port-number) in order for it to work.
Now if I want to run a scan on let's say 100 IPs with different ports do all the port numbers need to be added in the list along with the IP address (ex: x.x.x.x:port-number) or is there a nuclei scanning command I can use that will automatically detect the port number for that IP address.
I only run into this issue with HTTP-related scripts that are accessible through the browser and not network-related ones such as application-based (MongoDB, Redis, etc...). I understand that application based network related scripts use {{hostname}} parameter compare to URL related scripts that uses {{baseurl}}.
Please let me know if there's a nuclei command that will detect the port number automatically or if something can be added on the script itself