Stewart, I think you could do telnet over a socket connection. See
"open socket", "write to socket" and friends in the docs.
Best,
Mark Smith
On 3 Oct 2009, at 22:28, RevList wrote:
I need to write a very small utility that uses Telnet so that I can
connect to a server on port 333 and login with credentials and issue a
specified command recognized by the server.
I can do this manually as follows from the command line on Windows or
Terminal on OS X
Telnet 192.168.168.19 333 <press enter on keyboard>
this returns +0 and waits for me to enter my userID, so I enter
MyLoginID <press enter on keyboard>
this returns +0 again and waits for me to enter my password, so I
enter
MyPassword <press enter on keyboard>
and this again returns a +0 and another +0 on a new line indicating a
successful entry. Now all I need to do is enter my command which
looks
like this
Put User someuserID 1271 0 newpw <press enter on keyboard>
and this confirms success with a +0
I then enter q <press enter on keyboard>
and I am out of Telnet
So what I would like to do is write a simple Rev utility that will
pass
all of the information, but all I can seem to do is to issue the first
line and have no opportunity to enter the login credentials and my
special
script
As soon as I issue Shell("Telnet 192.168.168.19 333") it issues the
telnet
command and opens the connection on port 333, but immediately after
that
closes the connection and returns "Connection closed by foreign host"
Can anyone help me here? How can I keep the telnet session open so
that I
can issue the remaining commands?
Thanks in advance
Stewart
----------------------------------------------------------------------
----------------------------------------------
This message and any attachments are intended only for the use of the
individual to whom they are addressed and it may contain
information that
is privileged or confidential. If you have received this
communication by
mistake, please notify us immediately.
----------------------------------------------------------------------
----------------------------------------------
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution