Net::Telnet --help required

------=_Part_19101_13362803.1179309892857
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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
<snip>
use warnings;
use Net::Telnet;

my $t = new Net::Telnet (Timeout => 10,Prompt => '/bash\$ $/');
my @line;
$t->open("host1");
$t->waitfor('/login:.*$/');
$t->print("root");
$forecast=$t->print("/usr/bin/ls");
print $forecast;


O/P : 1

OR

use warnings;
use Net::Ping;
use Net::Telnet;

my $t = new Net::Telnet (Timeout => 10,Prompt => '/bash\$ $/');
my @line;
$t->open("host1");
$t->login("root","");
$result=$t->cmd("/usr/bin/ls");
print $result;

O/P : timed-out waiting for password prompt at j.pl line 8


Please, help me to understand the solution of it.
I need this as urgent requirement for house-keeping activities

Thanks in adavance

_abhi

------=_Part_19101_13362803.1179309892857--
0
testabhi
5/16/2007 10:04:52 AM
perl.beginners 29388 articles. 4 followers. Follow

2 Replies
386 Views

Similar Articles

[PageSpeed] 46

T24gNS8xNi8wNywgYSBiIDx0ZXN0YWJoaUBnbWFpbC5jb20+IHdyb3RlOgo+IEhlbGxvLAo+IEkg
YW0gdHJ5aW5nIHRvIHRlbG5ldCB0byBhbGwgbS9jIGZvciB3aGljaCBpIGhhdmVuJ3Qgc2V0IHBh
c3N3b3JkKG9ubHkgcm9vdAo+IGlzIGEgdmFsaWQgdXNlcikKPiBhbnkgYm9keSBjYW4gdGVsbmV0
IHVzaW5nIHJvb3QgdXNlcgo+IEJ1dCB3aGVuIGkgdHJ5IHRvIGFjY2VzcyB0aHJvdWdoIHBlcmwg
aXQKPiA8c25pcD4KPiB1c2Ugd2FybmluZ3M7Cj4gdXNlIE5ldDo6VGVsbmV0Owo+Cj4gbXkgJHQg
PSBuZXcgTmV0OjpUZWxuZXQgKFRpbWVvdXQgPT4gMTAsUHJvbXB0ID0+ICcvYmFzaFwkICQvJyk7
Cj4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3QgcGFzcyBhIHBh
c3N3b3JkIHRvIGxvZ2luIG9yIHdhaXRmb3Igb25lLCBzbwp5b3UgbmV2ZXIgbG9naW4uIFlvdSBk
bywgdGhvdWdoLCB1c2UgY21kLCB3aGljaCBpcyB3aGF0IHlvdSB3YW50LAphbHRob3VnaCB5b3Ug
bmVlZCBsaXN0IGNvbnRleHQ6CgokdC0+b3BlbigiaG9zdDEiKTsKJHQtPndhaXRmb3IoJy9sb2dp
bjouKiQvJyk7CiR0LT5wcmludCgicm9vdCIpOwpteSBAZm9yZWNhc3Q9JHQtPmNtZCgiL3Vzci9i
aW4vbHMiKTsKbXkgJHNjYWxhcl9mb3JlY2FzdCA9IGpvaW4gIiIsIEBmb3JlY2FzdDsKIyBvciBq
b2luJ1xuJywgSSBkb24ndCByZW1lbWJlciBpZiBjbWQgcmV0dXJucyBuZXdsaW5lcyBvciBub3QK
CkhUSCwKCi0tIGpheQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLQpUaGlzIGVtYWlsIGFuZCBhdHRhY2htZW50KHMpOiBbICBdIGJsb2dhYmxlOyBbIHgg
XSBhc2sgZmlyc3Q7IFsgIF0KcHJpdmF0ZSBhbmQgY29uZmlkZW50aWFsCgpkYWdnZXJxdWlsbCBb
YXRdIGdtYWlsIFtkb3RdIGNvbQpodHRwOi8vd3d3LnR1YXcuY29tICBodHRwOi8vd3d3LmRvd25s
b2Fkc3F1YWQuY29tICBodHRwOi8vd3d3LmVuZ2F0aWtpLm9yZwoKdmFsdWVzIG9mIOIgd2lsbCBn
aXZlIHJpc2UgdG8gZG9tIQo=
0
daggerquill
5/16/2007 12:27:04 PM
------=_Part_41285_27144267.1179416543496
Content-Type: text/plain; charset=ISO-8859-7; format=flowed
Content-Transfer-Encoding: base64
Content-Disposition: inline

SGkgSmF5LAoKVGhhbmtzIGZvciB5b3VyIHJlc29wb25zZS4gSSB0cmllZCB3aXRoIHRoZSBzd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yBvZiDiIHdpbGwgZ2l2ZSByaXNl
IHRvIGRvbSEKPgo=
------=_Part_41285_27144267.1179416543496--
0
testabhi
5/17/2007 3:42:23 PM
Reply:

Similar Artilces:

Net::Telnet::Cisco telnet to PIX Firewall
Hi, I am a new perl user. I have problem telnet to Cisco PIX Firewall. Following is my testing perl script. I used net::telnet::cisco module telnet to Cisco routers or switches no problem. But, Cisco PIX Firewall not working. Please give me some advises. use Net::Telnet::Cisco; use strict; my $cnt_total=0; my $result ='Active'; my $host1='192.168.1.1'; #--- PIX Firewall inside Interface my $username1=''; my $password1='pix123'; #---- The password tested fine by manually telnet my $password_enable1='pix456'; my @cmd_output=(); ...

Beginner tutorial for ADO.NET with ASP.NET (VB)?
Does anyone know where there is a beginner tutorial for ADO.NET with ASP.NET (using VB)?  I mean some short, simple, quick and dirty code to:   Connect to a database Create a dataset with a select query How to use a couple of parameters in your select query Update Records Insert Records Delete Records Record Navigation (move first, move last, etc.) Etc.   And I mean code, no GridView stuff.  Just something to get someone started in the right direction that used ADO in the past before .NET.  Something that shows the basics ...

.Net version required for ASP.NET MVC 1.0
Hi, I am not sure I can use the MVC on .NET 3.0. Thanks,   3.5 SP1 is best ... it's possible to do what you want, example:http://www.hanselman.com/blog/DeployingASPNETMVCOnASPNET20.aspx.is there a reason you do not want to do this?Regards,Gerry (Lowry)Gerry Lowry, PrincipalAbility Business Computer Services ~~ Because it's your Business, our Experience Counts!68 John W. Taylor AvenueAlliston · Ontario · Canada · L9R 0E1 · gerry.lowry@abilitybusinesscomputerservices.com 3.5 is the minimum required for the runtime, but 3.5 SP1 is recommended.  If you want Visual Studi...

Could anyone please answer a $telnetAte = Net::Telnet -> new...
--0-179085252-1090024258=:32842 Content-Type: text/plain; charset=us-ascii Hi, I am always grateful for your help. I use CYGWIN on win-2000 with a �$� prompt and run my .pl to telnet to a VxWorks station. doing it manually this is what I follow: telnet <return> open 144.248.176.132 <return> then I get the login prompt which is �VxWorks Login: � and I enter �marco� and the �password: � which I enter �system� then I get the vxworks prompt �-> � here I do a �pwd� and get the result and then the prompt again. Below is my code but does not log me...

Net::Telnet
i am writing a short script to log into a unix type box, request a report, wait for the output and then log out. one problem i can't seem to figure out is how to slow down the transmission of my commands. occasionaly the commands i send lose a character or two which of course ... how do i slow the transmission rate thanks -- hcir mailto:g3pb@alaska.net Made with a Mac! on 02/07/2001 09:21 PM, g3pb at g3pb@alaska.net wrote: > i am writing a short script to log into a unix type box, request a report, > wait for the output and then log out. one problem i can...

.NEt beginner
I worked with ASP earlier on Windows 2000. Now I got XP on my machine & .NET 3.5 is what rules now. Tied up with ASP now are AJAX, IIS, Visual Web developerI came here http://msdn.microsoft.com/theshow/episode.aspx?xml=theshow/en/episode056/manifest.xml looking for IIS7 where next?????For AJAX I visited http://www.asp.net/ajax/downloads. I have 3 options now 1- ASP.NET AJAX Control Toolkit 2- Microsoft AJAX Library 3.53- The ASP.NET 3.5 Extensions Preview Which one should I go for? There is also Visual Web Developer where do I get that from What are the directories in which I would ...

Net::Telnet
i have written this script .. just supposed to log into computer on network and start a forwarded gnome session to my Nt machine ! problem is i cant get the prompt to match. #############perl script ################ #!e:\perl\bin\perl use Net::Telnet; $telnet = Net::Telnet->new ( Timeout => 90, Prompt => '/[\$%#>] $/', Host => '192.168.0.2' ); $telnet->login('kris', 'password'); $telnet->cmd('DISPLAY=192.168.0.10:0'); $telnet->cmd("export DISPLAY"); $...

.Net Requirements
Hi, I am working on a windows dotnet app. I will need to install this app on another machine for demo. This machine is windows XP machine. My question is what do I need to install on this demo machine to get my app working? I think I only need .Net Framework, but I am not too sure? Thanks! (You might stand a better chance of finding the answer on a Windows Forms forum -) Try: http://windowsforms.net/David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple co...

.Net Beginner
Hi.. Can someone help me please... I'm new to the .Net thing. When I create an aspx page using WebMatrix and save it to a folder on my webprovider (.Net capable), I get the following error. Isnt creating an aspx page as simple as asp page ? What am I missing ? Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To ena...

why .net is required?
Why .net plateform is build?How it is started.Sharique udddin Ahmed FarooquiWeb Developer Please mark it as answer if it resolves the issue. Hi,Check this article http://www.tutorialized.com/tutorial/The-Evolution-Of-Microsoft-.NET-Explained/2782Thanks.regards,Harishhttp://geekswithblogs.net/ranganh do what??...

NET:TELNET
Hi,I am using Perl ver 5.6.1. I have downloaded the NET::Telnet module and is able to log into telnet. But what I am unable to do is to open/edit a file from the client side. I had read the documenation and still unable to open the file using the <fhopen> method and <get> method. The documenation state that the Filehandle must already be open for this method to be used. Do U have any idea what that means? Or can you give me an simple example to juz open a file( server side) from the client. Any advice will be greatly appreciated. Thanks. _______________________...

Install Turbo Delphi on .NET 3.5
Hi, I'd like to install Turbo Delphi on my laptop running .NET 3.5, I get a message saying that Delphi requires SP1 of .NET v1.1 to be installed. I'm not sure what to do, maybe I need to roll back my .NET installaion to v1.1 in order to install Turbo Delphi, and then upgrade .NET back to 3.5 afterwards? michael collier wrote: > Hi, > > I'd like to install Turbo Delphi on my laptop running .NET 3.5, I get > a message saying that Delphi requires SP1 of .NET v1.1 to be > installed. > > I'm not sure what to do, maybe I need to roll back my .N...

beginner to asp.net and ado.net. and already lost. how can i do this simple thing? thank you
 dear forum members, i'm not a pro at all. i want to use asp.net. cuz everything seems so cool and easy. but i am lost with ado.net and i couldn't find any easy example that explains what i wanna do.  can you please check out the below code and tell me how to do it in asp.net? rs.open str,connstr,1,3 'after selecting, i want to get RecordCount, I want to be able to read coloumns, I want to be able to do a loop to write coloumnsresponse.write(rs.recordcount)response.write(rs("cName"))-------rs.open str,connstr,1,3 'and this time after selec...

Is IIS a requirement for asp.net (using visual studio.net 2003 on windows 2000)
I'm using visual studio.net 2003 on windows 2000 at work and can not use IIS due to security reasons. What other web server can i use. I saw a question posted where it can be used on linux from the following article (http://www.pcquest.com/content/search/showarticle.asp?arid=47162&way=search). But I"m not using Linux. Can apache be used with windows 2000?. thanks... Hi, If you want to host ASP.NET page on Win2000, you may try Cassini, or the ASP.NET Web Matrix. Regards, ...

Net:Net:Net::LDAP::FAQ
------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

Web resources about - Net::Telnet --help required - perl.beginners

Resources last updated: 12/25/2015 8:37:12 PM