exec 3<>/dev/tcp/${HOST}/${PORT}; echo -e "Will you crash?\n" >&3; exec 3>&-
Thursday, July 11, 2013
Fastest way to open and close a socket
I had to replicate an issue in a proprietary application server which was reporting socket fail errors. Basically any connection to a specific port open from monit for example would cause the issue. The command below can be used to open the socket, write something and close it. It helped me recreate the issue:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment