--693760-744810025-11205414312406
Content-Type: MULTIPART/MIXED; BOUNDARY="693760-744810025-1120541431=:22406"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--693760-744810025-11205414312406
Content-Type: TEXT/PLAIN; charset=iso-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Tue, 5 Jul 2005, "Pe, Botp" wrote:

> Wybo Dekker [mailto:wybo / servalys.nl] wrote:
> 
> #I'm trying to run a telnet session with my adsl modem with
> #
> ##!/usr/bin/env ruby
> #
> #require 'net/telnet'
> #
> #tn = Net::Telnet.new("Host" => "10.0.0.138",
> #                  "Timeout" => 5,
> #                  "Prompt"  => /[$%#>] \z/n
> #)
> #tn.login("wybo", "my_password") { |c| print c }
> #tn.cmd("help") { |c| print c }
> #tn.close
> #
> #But it just times out:
> #
> #$ tn
> #/usr/local/lib/ruby/1.8/net/telnet.rb:551:in `waitfor': timed 
> #out while 
> #waiting for more data (Timeout::Error)
> #        from /usr/local/lib/ruby/1.8/net/telnet.rb:719:in `login'
> #        from ./tn:9
> #$
> #
> #What can be wrong with my script? 
> 
> can you give us the screenshot if you telnet to 10.0.0.138 manually?

Here it comes:

>telnet 10.0.0.138
Trying 10.0.0.138...
Connected to 10.0.0.138.
Escape character is '^]'.
Username : wybo
Password : ******
------------------------------------------------------------------------
*
*                             ______  SpeedTouch 510
*                         ___/_____/\ 
*                        /         /\\  Version 4.2.3.0.0
*                  _____/__       /  \\ 
*                _/       /\_____/___ \  Copyright (c) 1999-2003, 
*               //       /  \       /\ \              THOMSON
*       _______//_______/    \     / _\/______ 
*      /      / \       \    /    / /        /\
*   __/      /   \       \  /    / /        / _\__ 
*  / /      /     \_______\/    / /        / /   /\
* /_/______/___________________/ /________/ /___/  \ 
* \ \      \    ___________    \ \        \ \   \  /
*  \_\      \  /          /\    \ \        \ \___\/
*     \      \/          /  \    \ \        \  /
*      \_____/          /    \    \ \________\/
*           /__________/      \    \  /
*           \   _____  \      /_____\/
*            \ /    /\  \    /___\/
*             /____/  \  \  /
*             \    \  /___\/
*              \____\/
*
------------------------------------------------------------------------
=>help
Following commands are available :

help             : Displays this help information
menu             : Displays menu
?                : Displays this help information
exit             : Exits this shell.
..               : Exits group selection.
saveall          : Saves current configuration.

Following command groups are available :

adsl            atm             autopvc         bridge          cip         
config          dhcp            dns             env             eth         
ethoa           firewall        ip              ipoa            label       
language        nat             phonebook       pppoa           pppoe       
pptp            qosbook         script          snmp            software    
system          systemlog       td              upnp            

=>exit
Connection closed by foreign host.

> thanks ang kind regards -botp
> 
> 
> #
> #-- 
> #Wybo
> #
> 

-- 
Wybo
--693760-744810025-11205414312406--
--693760-744810025-11205414312406--