Hello,
I've written a short app that (in theory) connects to a remote box on port 23, and simply reads what is returned. The ultimate goal is to log on to the box automatically in order to automate some of my less interesting tasks. I get the socket set up, and it connects without error, but when I read out what should be the version banner and prompt text from the server and display it, it's all complete gibberish:
ÿ_%ÿy↑ èI" Em at ÿÿÿÿ<"►a'O?|IkYwH àÉ" èE" ♀ ìE" ☺ ♦ É" ☻
X ♥ $ ►☺♣ ♣§ (P§VÑ6D]<-à$⌂e☺ ↑ ►☺☻ ♣ ☻ ¶ ►☺☺ ♣
↕ dÉ" ☻ 2"◄a0E" ,É" W_a0E" 2"◄a♥☺ 'O?|IkYwL àÉ" "É" tlYw¬♦ O
E" 8§`|-§`|ë♠`| ►¶a↑♦ ☺ àÉ" 0E" ♥☺ 2"◄adÉ" 0E" ♥☺
a.exe @E" $ 2`|♥ ↑$ $ E$ ↑E" \I" ↑î?|8`|ÿÿÿÿ2`|«♠`|ë♠`|x
S▬a 6^|☺ U-
a x☺5
5 x☺5 ^♠5 ä+YwªE" x☺5 ∟ "
5 O>`|
5 ►E" F `|X☺fA▬a
(E" å9☺A▬a1g↕a
I initialized the buffer to null, and confirmed that with output, so that really is what read() is kicking back to me, and not just the remnants of whatever memory was grabbed to allocate the buffer. Any ideas?