Thanks for your reply...
Now,my Script is woking fine........
User Profile
Collapse
-
Connecting to linux machine using Telnet Module.
Hi,
The below code is used to connect to the remote machine using Telnet module in perl.
[CODE=perl]use Net::Telnet;
use Net::Ping;
$telnet = new Net::Telnet (Timeout=>10,Er rmode=>'die');
open (FILE,"C:/start.txt") or die ("Unable to open start.txt");
while(<FILE>)
{
$cnt++ if !/^\s+?$/;
}
close(FILE);
... -
Connect to the remote machine using Telnet module
Hi,
Please find the below code which is used to Print the Operating System of a remote Machine of linux.This code is working fine,if i give the correct UserName and Password of a machine but what i need is if iam having set of UserName and Password in a flat file and the code should check if it matches with any of this set of UserName and Passwords and execute the code without throwing any error like (command timed-out at linux.pl... -
Hi,
If i add the above code in the program it is taking long time to execute..I didn't get any output.
please help me in this.........
Regard's
Thamayanthi.Leave a comment:
-
Thank for your reply........
It's a wonderful solution!!!!
I have tried that command and it is working fine.
one more doubt i have is how to remove the first few lines of the same output
for ex:
who
login: Resource temporarily unavailable while getting initial credentials
Last login: Thu Mar 6 12:09:51 from 192.168.70.71
[tsom31@tsom31 ~]$ who
this need...Leave a comment:
-
To remove trailing prompt from the output
Iam trying to connect to the remote Linux machine from the Windows box using the Perl module use Net::Telnet.The following is the code,
[CODE=perl]use Net::Telnet;
$telnet = new Net::Telnet (Timeout=>10,Er rmode=>'die');
$telnet->open('hostname ');
$telnet->waitfor('/login: $/i');
$telnet->print('usernam e');
$telnet->waitfor('/password for tsom31: $/i');
$telnet->print('passwor d');... -
The following Perl Script will collect all the *.EXE file from the local machine but It is failing to collect the data from Remote machine.If any one know where iam going wrong.Please any one help me on this.......
[CODE=perl]use strict;
use Win32::OLE('in' );
#use File::Find;
use File::List;
Win32::OLE->Option(Warn => 0);
use constant wbemFlagReturnI mmediately => 0x10;...Leave a comment:
-
Find files for remote machine
Hi,
I want to find all the *.Exe files for Remote machine.Is it possible to collect the information.If so, please any one help me in this.
Thanks in Advance.
No activity results to display
Show More
Leave a comment: