Re: Telnet on Win32

2002-04-11 Thread inshri
why dont u try a combination of 'print' and ' waitfor ' if this does not works...
### open connection and other commands
$telnet-> print ($username);
$telnet -> waitfor("password");
$telnet -> print($password);
$telnet -> waitfor("your prompt');
$telnet -> print($commands);
."Lillianne Dykstra"<[EMAIL PROTECTED]> wrote:
Hi All!I am having problems executing a simple telnet session on Windows 2000. Itappears that it does not like my prompt. It times-out and then objects toline 15 of the code (the login line). Can you advise why this is notworking?$login="ldykstra";$pass="password";$host="200.1.2.20";use Net::Telnet;$telnet = new Net::Telnet(Timeout => 10,Prompt => '/[\$%#>] $/');$telnet->open($host);$telnet->login($login,$pass);@listing= $telnet->cmd("ls");print "@listing";print "\n";$telnet->close;Lillianne DykstraInformation Technology ManagerNorth Coast Medical18305 Sutter Blvd. Morgan Hill, CA 95037408-776-5000 x1571-800-821-9319[EMAIL PROTECTED]___Perl-Win32-Users mailing listPerl-Win32!
-U!
[EMAIL PROTECTED]To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Get Your Private, Free E-mail from Indiatimes at  http://email.indiatimes.comBuy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in


Re: Telnet on Win32

2002-04-10 Thread Trevor Joerges

A lot of UNIX systems print security warning information and other messages
before you get to the actual logon prompt. Could your system be displaying
anything like this that would cause the prompt to match prior to the command
prompt? Turning on the Net::Telnet debugging will tell you where this is
failing? I use Net::Telnet on Solaris, HPUX, Linux, WinNT and W2K. The
biggest issue is always getting the prompt regex correct and the debugging
log helps me resolve that every time.

Kind regards,
Trevor J. Joerges

$_=q;rrUSFWPSZK.ZKPFSHFT,rkvtuZbopuifsZQZibdl
rrqpxfsfeZcyZQ,,riuuq://xxx.%.dpn,ru~@%.dpn ,rrr8-)
;;s;\~;kpfshft;g;s;\%;tfoenjnf;g;y;B-x;A-w;;
s;P;perl;g;s;,;\n;g;s;Y; ;g;s;q;\t;g;print;


- Original Message -
From: "Lillianne Dykstra" <[EMAIL PROTECTED]>
To: "'Sundara Rajan'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, April 10, 2002 4:51 PM
Subject: RE: Telnet on Win32


| I am running HPUX B.11.0 and the prompt is {UserName}> and it should work.
|
| Lillianne Dykstra
| Information Technology Manager
| North Coast Medical
| 18305 Sutter Blvd. Morgan Hill, CA 95037
| 408-776-5000 x157
| 1-800-821-9319
| [EMAIL PROTECTED]
|
|
|
| -Original Message-
| From: Sundara Rajan [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, April 10, 2002 1:46 PM
| To: Lillianne Dykstra; '[EMAIL PROTECTED]'
| Subject: RE: Telnet on Win32
|
|
| The code seems fine. The issue must be with your prompt. It may help and
see
| if the regex /[\$%#>] $/, covers your prompt or not. For example my prompt
| on Solaris is 5.8 MachineName{UserName}/> so your script works
|
| -Original Message-
| From: Lillianne Dykstra [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, April 10, 2002 9:38 PM
| To: '[EMAIL PROTECTED]'
| Subject: Telnet on Win32
|
|
| Hi All!
|
| I am having problems executing a simple telnet session on Windows 2000.
It
| appears that it does not like my prompt.  It times-out and then objects to
| line 15 of the code (the login line).  Can you advise why this is not
| working?
|
| $login="ldykstra";
| $pass="password";
| $host="200.1.2.20";
|
| use Net::Telnet;
| $telnet = new Net::Telnet
| (
|  Timeout => 10,
|  Prompt => '/[\$%#>] $/'
|  );
| $telnet->open($host);
|
| $telnet->login($login,$pass);
| @listing= $telnet->cmd("ls");
| print "@listing";
| print "\n";
| $telnet->close;
|
| Lillianne Dykstra
| Information Technology Manager
| North Coast Medical
| 18305 Sutter Blvd. Morgan Hill, CA 95037
| 408-776-5000 x157
| 1-800-821-9319
| [EMAIL PROTECTED]
|
|
| ___
| Perl-Win32-Users mailing list
| [EMAIL PROTECTED]
| To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|
| ___
| Perl-Win32-Users mailing list
| [EMAIL PROTECTED]
| To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Telnet on Win32

2002-04-10 Thread Lillianne Dykstra

I am running HPUX B.11.0 and the prompt is {UserName}> and it should work.

Lillianne Dykstra
Information Technology Manager
North Coast Medical
18305 Sutter Blvd. Morgan Hill, CA 95037
408-776-5000 x157
1-800-821-9319
[EMAIL PROTECTED]



-Original Message-
From: Sundara Rajan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 1:46 PM
To: Lillianne Dykstra; '[EMAIL PROTECTED]'
Subject: RE: Telnet on Win32


The code seems fine. The issue must be with your prompt. It may help and see
if the regex /[\$%#>] $/, covers your prompt or not. For example my prompt
on Solaris is 5.8 MachineName{UserName}/> so your script works

-Original Message-
From: Lillianne Dykstra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 9:38 PM
To: '[EMAIL PROTECTED]'
Subject: Telnet on Win32


Hi All!

I am having problems executing a simple telnet session on Windows 2000.  It
appears that it does not like my prompt.  It times-out and then objects to
line 15 of the code (the login line).  Can you advise why this is not
working?

$login="ldykstra";
$pass="password";
$host="200.1.2.20";

use Net::Telnet;
$telnet = new Net::Telnet
(
 Timeout => 10,
 Prompt => '/[\$%#>] $/'
 );
$telnet->open($host);

$telnet->login($login,$pass);
@listing= $telnet->cmd("ls");
print "@listing";
print "\n";
$telnet->close;

Lillianne Dykstra
Information Technology Manager
North Coast Medical
18305 Sutter Blvd. Morgan Hill, CA 95037
408-776-5000 x157
1-800-821-9319
[EMAIL PROTECTED]


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Telnet on Win32

2002-04-10 Thread Sundara Rajan

I use a good bit of Net::Telnet on a variety of UNIX servers - the only
issue I've had is when the prompts were different. And yes, it's a good idea
to turn on the log for input and output.

-Original Message-
From: Moulder, Glen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 9:45 PM
To: Lillianne Dykstra
Cc: perl-win32-users
Subject: RE: Telnet on Win32



Hi,

I've been doing a lot of work on my LAN lately, trying to establish
connections between my PC and the server and conduct operations on the
server.  I beat my head on Net::Telnet (in an environment similar to yours)
for over a week and finally gave up, opting for Net::FTP instead which is
much friendlier.  Seems that it's not the prompt that Telnet doesn't like,
it's all the weird line separators in the output (look at the dump of
output_log to see what I mean).  Caveat:  I'm having a problem with running
commands through Net::FTP->quot() also, so beware (see my post just prior to
yours).

Glen


> -Original Message-
> From: Lillianne Dykstra [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, April 10, 2002 4:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: Telnet on Win32
> 
> 
> Hi All!
> 
> I am having problems executing a simple telnet session on 
> Windows 2000.  It appears that it does not like my prompt.  
> It times-out and then objects to line 15 of the code (the 
> login line).  Can you advise why this is not working?
> 
> $login="ldykstra";
> $pass="password";
> $host="200.1.2.20";
> 
> use Net::Telnet;
> $telnet = new Net::Telnet
> (
>  Timeout => 10,
>  Prompt => '/[\$%#>] $/'
>  );
> $telnet->open($host);
> 
> $telnet->login($login,$pass);
> @listing= $telnet->cmd("ls");
> print "@listing";
> print "\n";
> $telnet->close;
> 
> Lillianne Dykstra
> Information Technology Manager
> North Coast Medical
> 18305 Sutter Blvd. Morgan Hill, CA 95037
> 408-776-5000 x157
> 1-800-821-9319
> [EMAIL PROTECTED]
> 
> 
> ___
> Perl-Win32-Users mailing list 
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Telnet on Win32

2002-04-10 Thread Lillianne Dykstra

Actually, I did use FTP instead. But it is very limiting in what you can do.
Thanks for the tip!

Lillianne Dykstra
Information Technology Manager
North Coast Medical
18305 Sutter Blvd. Morgan Hill, CA 95037
408-776-5000 x157
1-800-821-9319
[EMAIL PROTECTED]



-Original Message-
From: Moulder, Glen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 1:45 PM
To: Lillianne Dykstra
Cc: perl-win32-users
Subject: RE: Telnet on Win32



Hi,

I've been doing a lot of work on my LAN lately, trying to establish
connections between my PC and the server and conduct operations on the
server.  I beat my head on Net::Telnet (in an environment similar to yours)
for over a week and finally gave up, opting for Net::FTP instead which is
much friendlier.  Seems that it's not the prompt that Telnet doesn't like,
it's all the weird line separators in the output (look at the dump of
output_log to see what I mean).  Caveat:  I'm having a problem with running
commands through Net::FTP->quot() also, so beware (see my post just prior to
yours).

Glen


> -Original Message-
> From: Lillianne Dykstra [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, April 10, 2002 4:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: Telnet on Win32
> 
> 
> Hi All!
> 
> I am having problems executing a simple telnet session on 
> Windows 2000.  It appears that it does not like my prompt.  
> It times-out and then objects to line 15 of the code (the 
> login line).  Can you advise why this is not working?
> 
> $login="ldykstra";
> $pass="password";
> $host="200.1.2.20";
> 
> use Net::Telnet;
> $telnet = new Net::Telnet
> (
>  Timeout => 10,
>  Prompt => '/[\$%#>] $/'
>  );
> $telnet->open($host);
> 
> $telnet->login($login,$pass);
> @listing= $telnet->cmd("ls");
> print "@listing";
> print "\n";
> $telnet->close;
> 
> Lillianne Dykstra
> Information Technology Manager
> North Coast Medical
> 18305 Sutter Blvd. Morgan Hill, CA 95037
> 408-776-5000 x157
> 1-800-821-9319
> [EMAIL PROTECTED]
> 
> 
> ___
> Perl-Win32-Users mailing list 
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Telnet on Win32

2002-04-10 Thread Sundara Rajan

The code seems fine. The issue must be with your prompt. It may help and see
if the regex /[\$%#>] $/, covers your prompt or not. For example my prompt
on Solaris is 5.8 MachineName{UserName}/> so your script works

-Original Message-
From: Lillianne Dykstra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 9:38 PM
To: '[EMAIL PROTECTED]'
Subject: Telnet on Win32


Hi All!

I am having problems executing a simple telnet session on Windows 2000.  It
appears that it does not like my prompt.  It times-out and then objects to
line 15 of the code (the login line).  Can you advise why this is not
working?

$login="ldykstra";
$pass="password";
$host="200.1.2.20";

use Net::Telnet;
$telnet = new Net::Telnet
(
 Timeout => 10,
 Prompt => '/[\$%#>] $/'
 );
$telnet->open($host);

$telnet->login($login,$pass);
@listing= $telnet->cmd("ls");
print "@listing";
print "\n";
$telnet->close;

Lillianne Dykstra
Information Technology Manager
North Coast Medical
18305 Sutter Blvd. Morgan Hill, CA 95037
408-776-5000 x157
1-800-821-9319
[EMAIL PROTECTED]


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Telnet on Win32

2002-04-10 Thread Moulder, Glen


Hi,

I've been doing a lot of work on my LAN lately, trying to establish connections 
between my PC and the server and conduct operations on the server.  I beat my head on 
Net::Telnet (in an environment similar to yours) for over a week and finally gave up, 
opting for Net::FTP instead which is much friendlier.  Seems that it's not the prompt 
that Telnet doesn't like, it's all the weird line separators in the output (look at 
the dump of output_log to see what I mean).  Caveat:  I'm having a problem with 
running commands through Net::FTP->quot() also, so beware (see my post just prior to 
yours).

Glen


> -Original Message-
> From: Lillianne Dykstra [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, April 10, 2002 4:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: Telnet on Win32
> 
> 
> Hi All!
> 
> I am having problems executing a simple telnet session on 
> Windows 2000.  It appears that it does not like my prompt.  
> It times-out and then objects to line 15 of the code (the 
> login line).  Can you advise why this is not working?
> 
> $login="ldykstra";
> $pass="password";
> $host="200.1.2.20";
> 
> use Net::Telnet;
> $telnet = new Net::Telnet
> (
>  Timeout => 10,
>  Prompt => '/[\$%#>] $/'
>  );
> $telnet->open($host);
> 
> $telnet->login($login,$pass);
> @listing= $telnet->cmd("ls");
> print "@listing";
> print "\n";
> $telnet->close;
> 
> Lillianne Dykstra
> Information Technology Manager
> North Coast Medical
> 18305 Sutter Blvd. Morgan Hill, CA 95037
> 408-776-5000 x157
> 1-800-821-9319
> [EMAIL PROTECTED]
> 
> 
> ___
> Perl-Win32-Users mailing list 
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs