Subject: | |
From: | |
Reply To: | |
Date: | Tue, 26 Aug 2003 16:24:58 +0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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 *
|
|
|