How to write response of a telnet command to a file

September 28, 2015 at 09:12:38
Specs: Windows Server 2008 R2 Enterprise
Hi,

I am trying to save response of a telnet command to a file, but it generates an empty file everytime.

telnet host port >> d:\result.txt

I have also tried

telnet -f "d:\abc.txt" host port

but still the same empty file is created.

can someone identify what is it that I am doing wrong here?


See More: How to write response of a telnet command to a file

Report •


#1
September 28, 2015 at 14:54:13
The only thing I can think of is using the command and parameters in this order
telnet “host port” -f “D:\File.txt"

Obviously "host" and "port" needs to be replaced with and actual host adress and port.

99 little bugs in the code,
99 little bugs.
Take one down, patch it around,
129 little bugs in the code.

message edited by RainBawZ


Report •

#2
September 28, 2015 at 19:57:02
Make sure the results-file size is indeed very small (less than 4 or 5 bytes). If it's larger, then there may be content that is hidden by an EOF or other embedded control char.s I've used telnet with recorded logfiles (long ago, and far away), and had no problems getting output. If your telnet client refuses to cooperate, you might look for another version of telnet, or try using NETCAT.

Report •

Related Solutions


Ask Question