To telnet or to netcat... that's the question
NOSpaze
nospaze at gmail.com
Fri Aug 31 12:41:58 UTC 2012
Hi. If I do:
# telnet 127.0.0.1 5038
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Asterisk Call Manager/1.0
Action: Login
ActionID: 1
Username: youwanna
Secret: uwanna
... And asterisk responds:
== Manager 'youwanna' logged on from 127.0.0.1
But if I use nc and do...
# nc 127.0.0.1 5038 << EOF
> Action: Login
> ActionID: 1
> Username: youwanna
> Secret: uwanna
>
> EOF
Asterisk Call Manager/1.0
... Asterisk responds:
== Connect attempt from '127.0.0.1' unable to authenticate
Notice the TEXT is EXACTLY THE SAME (pasted in both cases) tried 762753 times or something less. Tcp port.
Why is that difference? Is nc sending a different string sequence or what?
TIA...
--
NOSpaze <nospaze at gmail.com>
More information about the users
mailing list