Telnet Shell Help

Jim Bufalini jim at visitrieve.com
Mon Oct 5 22:03:18 EDT 2009


Don't know specifically about telnet but the way to issue multiple lines of
commands in shell is to use "&&" So...

Shell("Telnet 192.168.168.19 333 && ...<each line of the shell followed by>
... &&..." 

>From Rev the && must be in quotes. So you might need quote & "&&" & quote in
your shell command.

Aloha from Hawaii,

Jim Bufalini

> 
> Phil Davis <revdev at pdslabs.net> on October 3, 2009 at 8:47 PM -0700
> wrote:
> >Maybe it wouldn't be as hard if you opened telnet with "open process
> for
> >update" and interacted with it that way. Then the socket-handling
> >business would be done by the OS. Recently Josh Mellicker showed me
> how
> >to do that with 'curl' using 'open process for read' and it made it
> >super easy.
> >
> >Phil Davis
> 
> Mark Smith <lists at futilism.com> on October 3, 2009 at 5:46 PM -0700
> wrote:
> >Stewart, I think you could do telnet over a socket connection. See
> >"open socket", "write to socket" and friends in the docs.
> 
> 
> This is what I would like to do, but have no idea on how to implement
> this.  I have not used sockets ever and I really need a simple sample
> app
> that would help me to get started.
> 
> I don't really know how to start.
> I need to telnet to a server and enter the credentials and once
> authenticated, send a script that the server understands.
> I do it in terminal or in the command line on window but I want to
> automate it through revolution.
> I understand that when I open a socket to that computer on port 333
> (which
> is the port I need to use) then the port is open.
> I get an open connection but how do I send the commands and know when
> or
> if the server has received and accepted the commands so that I can send
> the next one.
> For example, when I connect over telnet, I know I have a connection and
> can issue my next command, because the terminal displays +0
> 
> Any help would be greatly appreciated.
> 
> 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list