Hi guys, Im having trouble finding the way to:
1. Create the connection
2. Check if it has been established
3. If yes, then do something
4. If no, for timeout = 5 seconds, exit with error code.
Netcat sounds like a perfect tools for this task:
But the timeout switch takes no effect. I googled and many others reported the same symptom
Please see the attachment, I cant post here, for some reasons the forum complained the code with the "bad request" error
A similar script I wrote before was working, but unfortunately I forgot to keep copy of it. This time, it doesnt work. I must have syntax errors somewhere.
Check the connection if it has been established with timeout:
1. Create the connection
2. Check if it has been established
3. If yes, then do something
4. If no, for timeout = 5 seconds, exit with error code.
Netcat sounds like a perfect tools for this task:
nc -w 5 domain.com port
But the timeout switch takes no effect. I googled and many others reported the same symptom
Script to telnet web server
Please see the attachment, I cant post here, for some reasons the forum complained the code with the "bad request" error
A similar script I wrote before was working, but unfortunately I forgot to keep copy of it. This time, it doesnt work. I must have syntax errors somewhere.