I am extremely new to ruby and just trying to use it to do some basic scripting. Namely telnet into a machine and use the dos ftp client to pull some files over.
The problem that I have is when I try to telnet into the machine manually (from command prompt) I get the following message:
Welcome to Microsoft Telnet Client Escape Character is 'CTRL+]' You are about to send your password information to a remote computer in Internet zone. This might not be safe. Do you want to send anyway(y/n):
When I use ruby's telnet class (net/telnet) login() it hangs on the password prompt. This leads me to think that it is not taking the message into account, sending the username to the message and the password to the username prompt. How do I handle this situation?
Edit: The login process does seem to be hanging during the password prompt. It is merely my suspicion that this is caused by the above message, any other ideas are appreciated. I tried to echo everything and I get the following:
irb(main):030:0> tn = Net::Telnet::new("Host"=>"xxx.xxx.xxx.xxx", "Timeout"=>10) => #<TCPSocket:0x2d8aafc>
irb(main):031:0> tn.login("administrator", "password") {|c| print c}
Welcome to Microsoft Telnet Service
login: administrator
password: Timeout::Error: timed out while waiting for more data
from C:/Ruby/lib/ruby/1.8/net/telnet.rb:551:in `waitfor'
from C:/Ruby/lib/ruby/1.8/net/telnet.rb:685:in `cmd'
from C:/Ruby/lib/ruby/1.8/net/telnet.rb:730:in `login'