lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Eduardo Ochs once stated:
> On Thu, Sep 20, 2012 at 12:11 PM, Daniel Silverstone <
> dsilvers@digital-scurf.org> wrote:
> 
> > On Thu, Sep 20, 2012 at 12:01:02PM -0300, Eduardo Ochs wrote:
> > > Is there something similar but without any sandboxing, for people who
> > > want no security at all and just the simplest solution possible -
> > > "simplest" from the technical standpoint?
> >
> > assert(loadstring(something))()  ?
> >
> >
> 
>  Like that, except that the "something" should come from a socket, and
> Lua should enter "assert(loadstring(something))()-mode" whenever it's
> idle - maybe even when it's waiting for (local) input in its REPL...

  If you are on a Unix system, you can recompile Lua with the target
"generic", and use inetd or xinetd (depending up Unix system) to launch lua
from a network connection.  

[spc]lucy:~>telnet localhost
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> print("hello world")
hello world
> os.exit()
Connection closed by foreign host.

It's the simplest thing that could work.

  -spc (As long as you know it's not secure in any way ... )