[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: scripting a telnet session in lua
- From: Tymur Gubayev <tymur.gubayev@...>
- Date: Sat, 23 Jul 2011 04:12:59 +0200
On 22 July 2011 20:27, Wade Guidry <WGUIDRY@pugetsound.edu> wrote:
> I’m new to lua.
> I’m trying to script a session against a telnet server (login, run a few
> commands within a menu-driven interface, then close the session).
> I’m using lua sockets. My code appears below.
> I’m not getting the expected results, though the code seems to run OK.
> I’m trying to figure out how I can “see” what’s going on during the session.
> Is there a way in lua to echo back the server responses, for example?
> Thanks very much for any thoughts or suggestions.
>
> Wade
>
There're many simple samples in the distribution of the library, or
You can find them on github[1]
Take a closer look at echoclnt.lua (You can simply amend it to use TCP
instead of UDP).
Wbr,
Tymur
[1] https://github.com/sam-github/luasocket/tree/master/samples