Re: Help on Net::Telnet perl module

2011-07-11 Thread John Mason Jr
On 7/9/2011 2:46 PM, Irfan Sayed wrote: modified the code. my $t = new Net::Telnet (Timeout => 20, Prompt => '/bash\$ $/', Dump_Log => $filename, I

Re: Help on Net::Telnet perl module

2011-07-09 Thread Irfan Sayed
 modified the code.   my $t = new Net::Telnet (Timeout => 20,                           Prompt => '/bash\$ $/',                           Dump_Log  => $filename,                           Input_log  => $file,                           Errmode    => $errmode,      

Re: Help on Net::Telnet perl module

2011-07-08 Thread Jim Gibson
On 7/8/11 Fri Jul 8, 2011 12:43 PM, "Irfan Sayed" scribbled: > here is the actual code > > > use Net::Telnet; > $telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die'); > $telnet->open('10.216.119.53'); > $telnet->wait

Re: Help on Net::Telnet perl module

2011-07-08 Thread Irfan Sayed
ards irfan From: Jim Gibson To: Perl Beginners Sent: Friday, July 8, 2011 10:47 PM Subject: Re: Help on Net::Telnet perl module You chose to allow Jim Gibson (jimsgib...@gmail.com) even though this message failed authentication Click to disallow

Re: Help on Net::Telnet perl module

2011-07-08 Thread Jim Gibson
On 7/8/11 Fri Jul 8, 2011 5:59 AM, "Irfan Sayed" scribbled: > hi, > > i am using Net::Telnet module to connect to remote hosts > i able to to successfully connect to remote host and run the "ls" command > but the issue is , the output of command is not g

Help on Net::Telnet perl module

2011-07-08 Thread Irfan Sayed
hi, i am using Net::Telnet module to connect to remote hosts i able to to successfully connect to remote host and run the "ls" command but the issue is , the output of command is not getting printed to scalar variable use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Pro

Re: doubts in using net::telnet in perl

2010-07-22 Thread Chas. Owens
On Thu, Jul 22, 2010 at 03:38, Sooraj S wrote: > Thanks for your help...It worked...My shell script prints properly... > > At one stage it will prompt for user input > -- > Mountpoint : Xpr23filesystem > Kernel : verified > P2P : katren" > OK to go : [y/n] ?

Re: doubts in using net::telnet in perl

2010-07-22 Thread Sooraj S
Thanks for your help...It worked...My shell script prints properly... At one stage it will prompt for user input -- Mountpoint : Xpr23filesystem Kernel : verified P2P : katren" OK to go : [y/n] ? -- How to get the user in

Re: doubts in using net::telnet in perl

2010-07-21 Thread Chas. Owens
On Wed, Jul 21, 2010 at 10:41, Sooraj S wrote: > Hi Chas Owens, > > Thanks for your reply. I tried as you suggested. It prints the output > in the run time but the output is unformatted. snip > > Is there any way to avoid the address values that gets attached to the > actual output.. snip Hmm, it

Re: doubts in using net::telnet in perl

2010-07-21 Thread Sooraj S
Hi Chas Owens, Thanks for your reply. I tried as you suggested. It prints the output in the run time but the output is unformatted. < 0x0: 77 6f 72 6b 2f 61 74 6c 61 6e 74 69 63 5f 6e 6f home/ shell_script < 0x00010: 72 5f 72 65 6c 65 61 73 65 2e 63 73 68 5f 74 65 _newlone.csh_te < 0x0

Re: doubts in using net::telnet in perl

2010-07-21 Thread Chas. Owens
On Tue, Jul 20, 2010 at 10:57, Sooraj S wrote: > Hi, > > I am using Net::Telnet module to login to a remote machine and to > perform a series of steps. In my script i am calling a shell script > which does some operations and takes almost 3 min to complete. I want > to redirect

doubts in using net::telnet in perl

2010-07-21 Thread Sooraj S
Hi, I am using Net::Telnet module to login to a remote machine and to perform a series of steps. In my script i am calling a shell script which does some operations and takes almost 3 min to complete. I want to redirect the output of that script to the console in run time, when it is running. Is

Re: Problems with "show tech" using the Net::Telnet Module

2010-04-25 Thread Uri Guttman
> "A" == Asterix writes: A> Instead of this printf OUTPUT_FILE "@output\n\n"; A> I've used print OUTPUT_FILE "@output\n\n"; that would not make any difference in buffering or anything. the second is better in that you don't use printf's formatting there. when i see lots o

Re: Problems with "show tech" using the Net::Telnet Module

2010-04-25 Thread Asterix
> Have you considered using the cmd() method of Net::Telnet? It has the option > to individually set a reply timeout for each command: > > #!/usr/bin/perl-w > > use strict; > use Net::Telnet; > > my $host = '42.42.42.42'; > my $sysname = 'cisco&

Re: Problems with "show tech" using the Net::Telnet Module

2010-04-25 Thread Asterix
> Have you considered using the cmd() method of Net::Telnet? It has the option > to individually set a reply timeout for each command: > > #!/usr/bin/perl-w > > use strict; > use Net::Telnet; > > my $host = '42.42.42.42'; > my $sysname = 'cisco&

AW: Problems with "show tech" using the Net::Telnet Module

2010-04-20 Thread Thomas Bätzler
Asterix asked: > I've made a little script to capture the output of networking > devices. > Everything works fine, until I use the "show tech" command in an Cisco > device. Have you considered using the cmd() method of Net::Telnet? It has the option to individually s

Problems with "show tech" using the Net::Telnet Module

2010-04-20 Thread Asterix
I've made a little script to capture the output of networking devices. Everything works fine, until I use the "show tech" command in an Cisco device. The script does not save anything form the "show tech", but I can see that the TELNET Session gets back some output. But

RE: Feeding ouput from Net::Telnet into sub

2010-04-10 Thread Joseph L. Casale
>so it could still likely use a review. especially if you are learning >perl. many doc examples aren't written to the best coding standards. I'll take you up on that once its "supposedly" done:) Many great tips, thanks for all the help! jlc -- To unsubscribe, e-mail: beginners-unsubscr...@perl.o

Re: Feeding ouput from Net::Telnet into sub

2010-04-10 Thread Uri Guttman
ways is bad. JLC> Ok, fair enough. that is true for all programming, not just perl. JLC> Well the rest of the code _only_ does the telnet part and has too much JLC> hardcoded stuff atm. It works perfectly as per cpan docs. so it could still likely use a review. especially if you ar

RE: Feeding ouput from Net::Telnet into sub

2010-04-10 Thread Joseph L. Casale
urself or get >them some other way. e.g. backticks in a list context will split its >output into lines for you. i dunno how you are doing this telnet thing >(as i said SHOW MORE/ALL CODE :). Well the rest of the code _only_ does the telnet part and has too much hardcoded stuff atm. It works

Re: Feeding ouput from Net::Telnet into sub

2010-04-10 Thread Uri Guttman
uld you think foreach would loop over its lines vs its single string? arrays can contain strings without lines and a scalar could contain a single string with lines. so foreach is neutral and just loops over what you pass it in terms of perl elements. if you want lines, split them yourself or get them

RE: Feeding ouput from Net::Telnet into sub

2010-04-10 Thread Joseph L. Casale
>use a named variable with foreach loops. sure some docs and examples >show using the default $_ but it can have problems with action at a >distance. also a name makes the code read better. Ok, simple enough to do. >and where does $match get set? it must be from outside the sub so it is >a global

Re: Feeding ouput from Net::Telnet into sub

2010-04-10 Thread Uri Guttman
>>>>> "JLC" == Joseph L Casale writes: JLC> I get a page full of output from a command passed into a JLC> Net::Telnet session that as per the cpan example is stored in JLC> $output. I then want to call a sub passing $output into it, that JLC> matches

Feeding ouput from Net::Telnet into sub

2010-04-10 Thread Joseph L. Casale
I get a page full of output from a command passed into a Net::Telnet session that as per the cpan example is stored in $output. I then want to call a sub passing $output into it, that matches a string against each line, and sets a a var to "OK" if the match is successful. All is well

Re: telnet session to read or write a file

2010-02-20 Thread Jim Gibson
At 3:20 PM +0530 2/20/10, suresh kumar wrote: Hi Folks, I am trying to connect to a server where i want to create a file or read a existing file. This is my code. #!/usr/bin/perl use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Prompt => '/] $/&#

telnet session to read or write a file

2010-02-20 Thread suresh kumar
Hi Folks, I am trying to connect to a server where i want to create a file or read a existing file. This is my code. #!/usr/bin/perl use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Prompt => '/] $/'); # My prompt will be looking after telnet s

Re: TELNET

2009-07-03 Thread Peter Scott
On Fri, 03 Jul 2009 15:24:14 +0530, Swayam wrote: > Hi ,, > >I want to test a scenario where it is required to check that >the > server *should not allow telnet .Please* let me know what is the best > way to do this If you just want to see if anything is

TELNET

2009-07-03 Thread Swayam
Hi ,, I want to test a scenario where it is required to check that the server *should not allow telnet .Please* let me know what is the best way to do this my code use Net::Telnet; my $proxySmtpPort= 20025; my $telnet = new Net::Telnet (Host => "localhost",

SSH equivalent to Net::Telnet::Cisco?

2008-10-07 Thread Paul
I've searched CPAN, but have not found an equivalent module such as Net::Telnet::Cisco for SSH (SSH2). Is there one somewhere out there? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: SSH equivalent to Net::Telnet::Cisco?

2008-10-06 Thread Rodrick Brown
Have you tried the standard Net::SSH does it not work with cisco devices? On Mon, Oct 6, 2008 at 1:22 PM, Paul <[EMAIL PROTECTED]> wrote: > I've searched CPAN, but have not found an equivalent module such as > Net::Telnet::Cisco for SSH (SSH2). Is there one somewhere ou

SSH equivalent to Net::Telnet::Cisco?

2008-10-06 Thread Paul
I've searched CPAN, but have not found an equivalent module such as Net::Telnet::Cisco for SSH (SSH2). Is there one somewhere out there? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Net::Telnet "pattern match timed-out..."

2008-09-17 Thread ariel . casas
Hello all, I am trying to automate a simple telnet to port 7010 and give me the output to the command "gstatus". However, I get the following error: ./telnet_mod.test.pl pattern match timed-out at ./telnet_mod.test.pl line 6 Here are the contents of

Re: Net::Telnet

2008-08-13 Thread Hashmat Khan
t; exceeds the limit which I had suspected before. > >>> Bottomline, I want to get the $match value. How can I do this ? > > >> Please try to remember to bottom-post your responses to this group. > >> Thanks again. > > >> You can disable the timeout by s

Re: Net::Telnet

2008-08-11 Thread Rob Dixon
an I do this ? >> >> Please try to remember to bottom-post your responses to this group. >> Thanks again. >> >> You can disable the timeout by specifying a value of undef, for instance >> >> my $t = new Net::Telnet (Timeout => undef); >> >>

Re: Net::Telnet

2008-08-11 Thread Rob Dixon
$match value. How can I do this ? Please try to remember to bottom-post your responses to this group. Thanks again. You can disable the timeout by specifying a value of undef, for instance my $t = new Net::Telnet (Timeout => undef); You can't use waitfor like that. Regular expressions mu

Re: Net::Telnet

2008-08-11 Thread Hashmat Khan
Hello All, For the timeout, I used a very large value, so its solved ! One more issue, when I use this: @lines = $t->cmd($bldcmd) ($prematch, $match) = $t->waitfor(Match => /Build completed on/ || / Build failed on/); I get this error: maximum input buffer length exceeded: 1048576 bytes at D:

Re: Net::Telnet

2008-08-07 Thread Hashmat Khan
Hi, The only issue I have now is with timeout, and how do I disable this ? thanks, Hashmat On Thu, Aug 7, 2008 at 7:07 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Hashmat Khan wrote: > > > > ok.. the latest on this... > > when I try cmd for certain commands, it doesn't work. > > But looks like p

Re: Net::Telnet

2008-08-07 Thread Hashmat Khan
> Thanks for the reply. > Yes, I am using  Net::Telnet. And I am new to perl, I was not aware if there > are other methods to start telnet using perl. > I did as you suggested. It worked but not completely as I wanted the output. >     use Net::Telnet (); >     $

Re: Net::Telnet

2008-08-07 Thread Hashmat Khan
On Aug 5, 2:52 pm, [EMAIL PROTECTED] (Hashmat Khan) wrote: > Hello Rob, > > Thanks for the reply. > Yes, I am using  Net::Telnet. And I am new to perl, I was not aware if there > are other methods to start telnet using perl. > I did as you suggested. It worked but not complete

Re: Net::Telnet

2008-08-07 Thread Hashmat Khan
And when I use print, it doesn't work, I don't see any output, but if I use I see the output, but it times out(command timed out). thanks. On Aug 5, 2:52 pm, [EMAIL PROTECTED] (Hashmat Khan) wrote: > Hello Rob, > > Thanks for the reply. > Yes, I am using  Net::Telnet. And I

Re: Net::Telnet

2008-08-07 Thread Hashmat Khan
a clearcase view, anybody has any idea ? thanks. On Aug 5, 2:52 pm, [EMAIL PROTECTED] (Hashmat Khan) wrote: > Hello Rob, > > Thanks for the reply. > Yes, I am using  Net::Telnet. And I am new to perl, I was not aware if there > are other methods to start telnet using perl. > I did a

Re: Net::Telnet

2008-08-07 Thread Rob Dixon
Hashmat Khan wrote: > > ok.. the latest on this... > when I try cmd for certain commands, it doesn't work. > But looks like print works, but I don't see any output(Input_log => > \*STDOUT). So I can't verify my commands in print. How do we print the > output of print ? Please try to remember to b

Re: Net::Telnet

2008-08-07 Thread Hashmat Khan
ashmat Khan) wrote: > Hello Rob, > > Thanks for the reply. > Yes, I am using  Net::Telnet. And I am new to perl, I was not aware if there > are other methods to start telnet using perl. > I did as you suggested. It worked but not completely as I wanted the output. >     use Net

Re: Net::Telnet

2008-08-05 Thread Hashmat Khan
Hello Rob, Thanks for the reply. Yes, I am using Net::Telnet. And I am new to perl, I was not aware if there are other methods to start telnet using perl. I did as you suggested. It worked but not completely as I wanted the output. use Net::Telnet (); $t = new Net::Telnet (Timeout =>

Re: Net::Telnet

2008-08-04 Thread aditya
Hi, If I am getting you right means you want to display on Console. for that use this. ---CODE--- my $telnet = Net::Telnet->new(HOST); $telnet->login(USER,PASS) my @display = $telnet ->cmd('ls -l'); print @display; --Code-- On Aug 4, 7:47 am, [EMAIL

Re: Net::Telnet

2008-08-04 Thread aditya
Hi Hashmat, If I am getting you correclty then use this: CODE- $telnet = Net::Telnet->new(HOST); $telnet->login(USER,PASS) @display = $telnet ->cmd('ls -l'); print @display; CODE On Aug 4, 11:33 am, [EMAIL PROTECTED] (Jm) wrote: > IO

Re: Net::Telnet

2008-08-04 Thread Rob Dixon
John W. Krahn wrote: > Rob Dixon wrote: >> Hashmat Khan wrote: >>> Has anybody used Telnet ? >>> >>> I want to know, how can we redirect the output to STDOUT instead of >>> log file ? (Dump_Log => "dump.txt") >> It's import

Re: Net::Telnet

2008-08-04 Thread John W. Krahn
Rob Dixon wrote: Hashmat Khan wrote: Has anybody used Telnet ? I want to know, how can we redirect the output to STDOUT instead of log file ? (Dump_Log => "dump.txt") It's important to tell us exactly what module you're using. See the Subject line. :-) John

Re: Net::Telnet

2008-08-04 Thread Rob Dixon
Hashmat Khan wrote: > > Has anybody used Telnet ? > > I want to know, how can we redirect the output to STDOUT instead of > log file ? (Dump_Log => "dump.txt") It's important to tell us exactly what module you're using. Telnet is a comms protocol but I d

Re: Net::Telnet

2008-08-04 Thread jm
IO::Tee allows STDOUT as one of your output options On Mon, Aug 4, 2008 at 9:47 AM, Hashmat Khan <[EMAIL PROTECTED]> wrote: > Hi, > > Has anybody used Telnet ? > > I want to know, how can we redirect the output to STDOUT instead of > log file ? (Dump_Log => "

Net::Telnet

2008-08-04 Thread Hashmat Khan
Hi, Has anybody used Telnet ? I want to know, how can we redirect the output to STDOUT instead of log file ? (Dump_Log => "dump.txt") thanks, Hashmat -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: Telnet exits after time out

2007-07-27 Thread Lakshmi Sailaja
Thanks for the input. Will try it out and see!! Thanks & Regards, Lakshmi 952-833-1220 -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Friday, July 27, 2007 12:47 PM To: [EMAIL PROTECTED] Cc: beginners@perl.org Subject: Re: Telnet exits after time out On 7/2

Re: Telnet exits after time out

2007-07-27 Thread Chas Owens
On 7/27/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: snip > What is the solution? Is there a way that I don't specify the time out value > and let it run until the exe completes its execution? snip You should never disable the timeout. If you do then there is a chance your program will hang for

Telnet exits after time out

2007-07-27 Thread Lakshmi Sailaja
Hi, I am logging to a remote session using telnet. I am calling a command to run an exe. This exe sometimes runs fast and at times take a couple of minutes depending on the objects. The problem that I am facing is: While creating the telnet object, I specify the time out. If the exe that am

Re: Prompt in Net::Telnet

2007-06-13 Thread Chas Owens
s Free Software not freeware*. You will need to provide the full path to the executable like this: $telnet->cmd('c:\cygwin\bin\ls.exe -l > lsop.log'); * see "Comparison with other terms" on http://en.wikipedia.org/wiki/Freeware -- To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: Prompt in Net::Telnet

2007-06-13 Thread Lakshmi Sailaja
The telnet server running on my windows machine is the Microsoft telnet server (which comes from windows). As suggested when I used 'dir', I am able to see the content in lsop.log. 'ls' is an exe that is obtained with some free-ware software. But I don't see any output

Re: Prompt in Net::Telnet

2007-06-13 Thread Chas Owens
On 6/13/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: You are right that I am trying to connect to a Windows m/c from a Solaris server. But when I used the below code, it gets connected but I am having problem displaying the output: my $telnet = Net::Telnet->new(HOST =&

Re: Prompt in Net::Telnet

2007-06-13 Thread Martin Barth
> server. > > But when I used the below code, it gets connected but I am having problem > displaying the output: > > > my $telnet = Net::Telnet->new(HOST => "$server", > Dump_log => "telnetdump.txt", > PR

RE: Prompt in Net::Telnet

2007-06-13 Thread Lakshmi Sailaja
You are right that I am trying to connect to a Windows m/c from a Solaris server. But when I used the below code, it gets connected but I am having problem displaying the output: my $telnet = Net::Telnet->new(HOST => "$server", Dump_log =&

Re: Prompt in Net::Telnet

2007-06-12 Thread Chas Owens
On 6/12/07, Chas Owens <[EMAIL PROTECTED]> wrote: snip If you are trying to connect to the "telnet" server that comes with Microsoft OSes then you are SOL. If you are trying to connect to a different telnet server, then please provide the name of the server and operating syst

Re: Prompt in Net::Telnet

2007-06-12 Thread Chas Owens
On 6/12/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: Hello, I am supposed to write a program that will telnet to a remote server and execute some commands. I get the following error: "timed-out waiting for command prompt at line " This is because the prompt is not set co

Re: Net::Telnet - Variable in Prompt

2007-06-12 Thread Chas Owens
On 6/12/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: snip $sub = "xyz"; $prompt = "L:\\$sub"; my $t = Net::Telnet->new( Timeout => 10, Prompt => "/$prompt/" ); snip from perldoc Net::Telnet What To Know Before Using

Prompt in Net::Telnet

2007-06-12 Thread Lakshmi Sailaja
Hello, I am supposed to write a program that will telnet to a remote server and execute some commands. I get the following error: "timed-out waiting for command prompt at line " This is because the prompt is not set correctly. Can you please tell me what the prompt value should be se

RE: Net::Telnet - Variable in Prompt

2007-06-12 Thread Lakshmi Sailaja
I am if my question was brief. $prompt is a scalar variable. like this: $sub = "xyz"; $prompt = "L:\\$sub"; my $t = Net::Telnet->new( Timeout => 10, Prompt => "/$prompt/" ); Thanks & Regards, Lakshmi 952-833-1220 -Original M

Re: Net::Telnet - Variable in Prompt

2007-06-12 Thread Chas Owens
On 6/12/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: But it did not work. I was getting the below error: "timed-out waiting for command prompt at line " snip This code works for me. #!/usr/bin/perl use strict; use warnings; use Net::Telnet; #my propmt is /home/

RE: Net::Telnet - Variable in Prompt

2007-06-12 Thread Lakshmi Sailaja
org Cc: [EMAIL PROTECTED] Subject: Re: Net::Telnet - Variable in Prompt On Tue, 12 Jun 2007 11:56:12 -0500 "Lakshmi Sailaja" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to use a variable in the Prompt parameter like the below > line? > >

Re: Net::Telnet - Variable in Prompt

2007-06-12 Thread Martin Barth
On Tue, 12 Jun 2007 11:56:12 -0500 "Lakshmi Sailaja" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to use a variable in the Prompt parameter like the below > line? > > my $telnet = Net::Telnet->new([HOST => "$server",] >

Net::Telnet - Variable in Prompt

2007-06-12 Thread Lakshmi Sailaja
Hi, Is there a way to use a variable in the Prompt parameter like the below line? my $telnet = Net::Telnet->new([HOST => "$server",] [PROMPT => /$prompt/,]); Thanks & Regards, Lakshmi 952-833-1220 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re: Net::Telnet --help required

2007-05-17 Thread a b
Hi Jay, Thanks for your resoponse. I tried with the suggested but it failed due to timed out (j.pl) use Net::Telnet; my $t = new Net::Telnet; $t->open("slias10"); print($t->waitfor('/login:.*$/')); $t->print("root"); sleep(2); @forecast=$t->cmd("

Re: Net::Telnet --help required

2007-05-16 Thread Jay Savage
On 5/16/07, a b <[EMAIL PROTECTED]> wrote: Hello, I am trying to telnet to all m/c for which i haven't set password(only root is a valid user) any body can telnet using root user But when i try to access through perl it use warnings; use Net::Telnet; my $t = new Net::Telnet (Ti

Net::Telnet --help required

2007-05-16 Thread a b
Hello, I am trying to telnet to all m/c for which i haven't set password(only root is a valid user) any body can telnet using root user But when i try to access through perl it use warnings; use Net::Telnet; my $t = new Net::Telnet (Timeout => 10,Prompt => '/bash\$ $/'

Re: Telnet question in Perl

2007-03-27 Thread Tom Phoenix
On 3/26/07, Dukelow, Don <[EMAIL PROTECTED]> wrote: I'm using Net::Telnet in my Perl script and I can get through the user login ok. But when I try to "sudo" to root I can't get there. Any ideas? It might be that sudo is (mis-)configured not to allow you root ac

Re: Telnet question in Perl

2007-03-27 Thread jm
no difference! Its only after I sudo to root thaat I have this problem. Don Dukelow -Original Message- From: jm [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 27, 2007 12:01 PM To: Beginners List Subject: Re: Telnet question in Perl i can't find any reference to a "cmw" opt

Re: Telnet question in Perl

2007-03-27 Thread jm
i can't find any reference to a "cmw" option so i'll assume that's a typo for "cmd". is the typo only in the email or also in your script? beyond that, the only difference i see between your script and the net::telnet documentation is your use of single-quot

Re: Telnet question in Perl

2007-03-26 Thread jm
e "/"s I'm not sure which one you mean but I was tring all kinds of thinks to get it to work. That is just what I ended up with. Don Dukelow -Original Message----- From: jm [mailto:[EMAIL PROTECTED] Sent: Monday, March 26, 2007 4:22 PM To: beginners@perl.org Subject: Re: Teln

Re: Telnet question in Perl

2007-03-26 Thread jm
ve never included "/"s in my expected returns unless they were part of the text i expected to see, though this could well be a viable format i've never before seen. On 3/26/07, Dukelow, Don <[EMAIL PROTECTED]> wrote: I'm using Net::Telnet in my Perl script and I can g

Telnet question in Perl

2007-03-26 Thread Dukelow, Don
I'm using Net::Telnet in my Perl script and I can get through the user login ok. But when I try to "sudo" to root I can't get there. Any ideas? My $TELNET = Net::Telnet->new(Timeout => 10,

Net::Telnet errmode

2006-05-07 Thread jm
i use Net::Telnet to connect to a server and run tests for several hours. the script will normally die in various places in the script, apparently due to losing connection to the server. i found in the documentation about changing Net::Telnet's Errmode to 'return' so it wil

Re: Problem with retrieving output from commands using net::telnet

2005-12-21 Thread Stephen Kratzer
er prompts. > All, > > I'm trying to write a perl script that will telnet a device and run one > of two commands based on the output from a beginning command. I'm still > in the beginning stages of this, and right now I'm simply trying to > print the output f

Problem with retrieving output from commands using net::telnet

2005-12-20 Thread Tim Huffman
All, I'm trying to write a perl script that will telnet a device and run one of two commands based on the output from a beginning command. I'm still in the beginning stages of this, and right now I'm simply trying to print the output from the device to standard out. Reading the d

Re: Help required about NET::TELNET

2005-12-05 Thread Stephen Kratzer
Mazhar, try: $telnet->waitfor(Match => '/login: $/i'); and $telnet->waitfor(Match => '/password: $/i'); Vishal, Right, you want to wait for the device to return something that will match the expression between the slashes. In that example, you'd be wait

Re: Help required about NET::TELNET

2005-12-05 Thread vmalik
Hey Mazhar, I don't know much about perl, but in the $telnet->waitfor method, what does the weird parameter mean ('/login: $/i')? I thought that $ means a scalar variable in perl. What do the forward slashes do here? Some sort of regular expression?? Vishal Quoting Mazhar

Help required about NET::TELNET

2005-12-05 Thread Mazhar
Hi Folks, I have installed the module NET::TELNET from CPAN and when i try to execute the below simple pgm, --- use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>100,Errmode=>'die'); $telnet->o

RE: :Telnet Updating Prompt?

2005-10-11 Thread Thomas Bätzler
Bastian Angerstein <[EMAIL PROTECTED]> asked: [net::Telnet] > Is it possible to update the internal Object-attribute ($last_prompt)? >From the documentation: last_prompt - last prompt read $string = $obj->last_prompt; $prev = $obj->last_prompt($string); Wit

Net::Telnet Updating Prompt?

2005-10-11 Thread Angerstein
Hello, I have a small issue with net::telnet 3.03. The Device I want to connect aus an OS-Level CLI and a Application-Level CLI. I have to log in to OS-Level to gai Access to Application level. Now, the problem is, the command prompt of the application is different from the prompt of the Os

Re: my telnet cmd output problem solved

2005-06-27 Thread MEENA SELVAM
only. (in my > > case it is about 30 lines) > > , and i run single command(although multiple cmds > > are > > supported in the code) > > > > sub sfRemoteRun($$){ > > > > my $telnet = shift; > > $cmds = shift; > > > >

why is the $output returned by NET::Telnet->cmd is empty [ ], dump_log is Ok

2005-06-27 Thread MEENA SELVAM
contains > the output or 1 or the boolean status only. (in my > case it is about 30 lines) > , and i run single command(although multiple cmds > are > supported in the code) > > sub sfRemoteRun($$){ > > my $telnet = shift; > $cmds = shift; > &

Re: is this an array context or scalar context?, while using Net::Telnet

2005-06-27 Thread MEENA SELVAM
know in this code, the @tmp really contains the output or 1 or the boolean status only. (in my case it is about 30 lines) , and i run single command(although multiple cmds are supported in the code) sub sfRemoteRun($$){ my $telnet = shift; $cmds = shift; my @results

Re: where to get perldoc Net::Telnet? missing in the perldoc from perldoc.perl.org

2005-06-20 Thread Wijaya Edward
Which version are you using? Check the standard CPAN site, you will find: http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm HtH -- Regards, Edward WIJAYA SINGAPORE - Original Message - From: MEENA SELVAM <[EMAIL PROTECTED]> Date: Tuesday, June 21, 2005 12:29 pm S

where to get perldoc Net::Telnet? missing in the perldoc from perldoc.perl.org

2005-06-20 Thread MEENA SELVAM
Hi, I do not have the Net::Telnet in the perldoc i downloaded from perldoc.perl.org. even http://perldoccom/cspan/Net/Telnet.Html page is not working meena __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http

microsoft telnet server problem

2005-05-09 Thread jm
i'm trying to script - using net::telnet - an automated connection to a microsoft telnet server. following the example in the net::telnet documentation, i can get the necessary telnet options set before and just after connecting to the server (environ, echo, escape, etc... options) but

Re: redefining Net::Telnet "escape" character

2005-02-28 Thread Joe Mecklin
e character used for client side > handling? In this case why would you need to worry about the escape > character, as you can drop to a subshell from within Perl, and since > this is talking directly to a telnet session it doesn't really make > since to drop to a subshell, as that s

Re: redefining Net::Telnet "escape" character

2005-02-28 Thread Wiggins d'Anconia
shell from within Perl, and since this is talking directly to a telnet session it doesn't really make since to drop to a subshell, as that subshell would be your Perl script??? here is a condensed version of the script: ### #!/usr/bin/perl use ASI::WebDB; use Term::ReadKey;

Re: redefining Net::Telnet "escape" character

2005-02-28 Thread Joe Mecklin
ok, per the instructions, binmode only converts CR LF to \n, which is not what i'm looking for. here is a condensed version of the script: ### #!/usr/bin/perl use ASI::WebDB; use Term::ReadKey; use Net::Telnet (); my $login = ""; my $securid = ""; pr

Re: redefining Net::Telnet "escape" character

2005-02-25 Thread Joe Mecklin
i'll try it when i get back to work, though i don't see how binmode will tell me what net::telnet command i need to use to redefine a character sequence, or what external command i'll need to call to accomplish that. thanks for the suggestion, though. On Fri, 25 Feb 2005 12:13:4

Re: redefining Net::Telnet "escape" character

2005-02-25 Thread mgoland
Joe, Try turning binmod on. If it fails post some code and a bit more od a description of what you are trying to do. hth, Mark G. - Original Message - From: Joe Mecklin <[EMAIL PROTECTED]> Date: Friday, February 25, 2005 8:44 am Subject: redefining Net::Telnet "escape"

redefining Net::Telnet "escape" character

2005-02-25 Thread Joe Mecklin
i sent this to the comp.lang.perl.modules newsgroup as the documentation suggests and got no response at all, so i thought i'd see if anyone here may be able to help. i'm using net::telnet to connect to a remote script (rather than a login). the script internally uses "^]"

RE: script how to interactive mode in telnet

2004-10-22 Thread Chris Devers
function/method? The perldoc system is a good place to start for this and your other questions, as is a good introductory text like _Beginning Perl_. > Does anyone have something like this for Windows Telnet connecting to > Exchange? Yeah -- a SMTP module. Don't connect to a mail

RE: script how to interactive mode in telnet

2004-10-22 Thread adisegna
hesis required around the quotations or is it just for aesthetics? Does anyone have something like this for Windows Telnet connecting to Exchange? Thanks AD -Original Message- From: Adam Saeed [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 10:32 PM To: [EMAIL PROTECTE

Re: script how to interactive mode in telnet

2004-10-21 Thread Chris Devers
On Fri, 22 Oct 2004, Adam Saeed wrote: > i want to write a script that automatically call telnet If you *really* want telnet, use Net::Telnet But -- > and do some > stuff and exit. e.g > telnet > open > e.g port = 25 -- that's the SMTP port. If you're trying

  1   2   3   4   >