HP3000-L Archives

August 2003, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Neil Harvey <[log in to unmask]>
Reply To:
Neil Harvey <[log in to unmask]>
Date:
Tue, 26 Aug 2003 16:24:58 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
Hi Ron

There was a PERL script that achieved this running on MPE (and other
fine PERL platforms).
It did the logon, and ran a command, returning the results.

Here is a snippet that can be modified to suit, built into a command
file/UDC etc.

It should be run under the shell, as in:-

xeq sh.hpbin.sys;info="-c 'SCRPNAME'"

#!/PERL/PUB/perl                                                      
$username = 'name,manager.sys;hipri';                          
$passwd   = 'password';                       
use Net::Telnet ();                               
$t = new Net::Telnet (Timeout => 1000,           
                      Prompt => '/PUB.SYS:.$/'); 
$t->open("192.1.1.100");                         
$t->waitfor('/LoginPrompt:.$/');                  
$t->print("HELLO $username\n");                  
$t->waitfor('/PASSWORD:.$/');                    
$t->print("$passwd\n");                          
$t->waitfor('/PUB.SYS:.$/');                  
@lines = $t->cmd("listf @.pub,2");                    
print @lines;                                     


Regards

Neil



-----Original Message-----
From: Ron Horner [mailto:[log in to unmask]] 
Sent: 26 August 2003 15:53
To: [log in to unmask]
Subject: Telnet Question


I need to force a logon through telnet.  What I mean is I need to run
telnet in a way to perform an open and issue the hello command.  Can
this be done? If so, how?

Thanks!!

Ron Horner
Horner Consulting
OpenMPE Webmaster

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2