Wednesday, May 11, 2011
8:05 PM

Copying Binary Files Via Telnet

Telnet really wasn't mean for copying at all, even less copying binary files. But you can do it with a fair amount of effort. You need two open terminals.
On Terminal 1:
1. telnet host > somefile.txt (then log in blind or look at tail -f somefile.txt)
2. cat somefile | busybox uuencode -m -
3. Once you see that you are logged in and the data stream is going just wait for it to finish.
4. Close Telnet (Ctrl-C, Ctrl-D)
Then once telnet is closed and you are back on your system enter:
5. busybox uudecode -o somefile.bin somefile.txt

There is no need to first remove the login protocol and other random shell noise, they are no problem. uudecode automatically detects where the binary data starts and ends if you do one file at a time.
Now you have your precious binary data, rejoice! ;-)

0 comments:

Post a Comment