How can I quickly find out whether a port 445 is open/listening on a server from a bash script.
I have tried a couple of options, but I want something quick:
1. lsof -i :445 (Takes seconds)
2. netstat -an |grep 445 |grep LISTEN (Takes seconds)
3. telnet (it doesn't return)
4. nmap, netcat are not available on the server
Is there another way that doesn't enumerate first and greps after that.