Piping to telnet 80 failing
We're using a dynamic dns providor's script (referring to the CGI) to update our IP address (by their instructions) like so:
Code:
telnet host.com 80 Code:
export DOMAIN_COMMAND="GET /ip.cgi?host=our.host.com&key=g1c48672b5ba99d49d0a684aaac58b56" |
Using a pipe in this context is simply sending bunk input to telnet. You need to use 'nc' (AKA netcat).
Code:
( sleep 1 ; echo $DOMAIN_COMMAND ; echo exit ) | nc host.com 80 |
Thanks, I never thought of that !
I read a reply to someone asking how to log in automatically over telnet, and he used this method (i.e., my bad method) to enter username, password, etc. I guess it didn't work. |
All times are GMT -5. The time now is 08:31 AM. |