User Profile

Collapse

Profile Sidebar

Collapse
thamayanthi
thamayanthi
Last Activity: May 30 '08, 12:24 PM
Joined: Feb 19 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks for your reply...
    Now,my Script is woking fine........
    See more | Go to post

    Leave a comment:


  • thamayanthi
    started a topic Connecting to linux machine using Telnet Module.
    in Perl

    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);

    ...
    See more | Go to post
    Last edited by eWish; May 26 '08, 04:32 AM. Reason: Please use code tags

  • 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...
    See more | Go to post
    Last edited by numberwhun; May 8 '08, 10:45 AM. Reason: Please use code tags!

  • 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.
    See more | Go to post

    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...
    See more | Go to post

    Leave a comment:


  • thamayanthi
    started a topic To remove trailing prompt from the output
    in Perl

    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');...
    See more | Go to post
    Last edited by eWish; Mar 6 '08, 07:41 AM. Reason: Please use code tags

  • thamayanthi
    replied to Find files for remote machine
    in Perl
    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;...
    See more | Go to post
    Last edited by eWish; Feb 22 '08, 04:28 AM. Reason: Please use [CODE][/CODE] Tags

    Leave a comment:


  • thamayanthi
    started a topic Find files for remote machine
    in Perl

    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.
    See more | Go to post
No activity results to display
Show More
Working...