Loading ...
Sorry, an error occurred while loading the content.

output from Net::Telnet

Expand Messages
  • Mahbub Hossain
    Hi , I am trying to write small script for telnet as follows: Remote windows machine login: login name: password: Windows NT Domain:
    Message 1 of 1 , May 24, 2008
    • 0 Attachment
      Hi ,
      I am trying to write small script for telnet as follows:
      Remote windows machine login:

      login name: <$usr>
      password: <$pass>
      Windows NT Domain: <enter>
      ...Loging ok
      C:\WINNT\usr\profile>vol
      Need this vol output.

      Code :
      my $t =new Net::Telnet (Timeout => 30,
      Dump_Log => 'dlog.log',
      Output_log => 'flog.log',
      Errmode => 'return');
      $t->open('xxx.xx.xx.xx');
      $t->waitfor('/:/');
      $t->print("$user");
      $t->waitfor('/:/');
      $t->print("$password");
      $t->print('');
      $t->waitfor('/>/');

      @lines = $t->cmd('vol');
      print @lines;

      ------------------
      I can see from dumplog the output is there.But i cannot store it to
      my array , whats wrong !! Appreciate your help.
      Thanks
    Your message has been successfully submitted and would be delivered to recipients shortly.