Ncat-Lua/TODO
From SecWiki
< Ncat-Lua
Socket abstractions
Rename alllua_toncat_luato avoid name collisions.- Extra points if it's done as a clever Perl one-liner. :>
local make_function = function(), to get rid of the ugly function_self thing.ret[m] = function(self, ...) return table.unpack({self.super[m](self.super, ...)}) end
-
return self.super[m](self.super, ...) - perhaps just copy the parent's function? explore it.
recv() call self.super:recv() only once, not running send() (and send() not running recv() until it gets figured out).nil returned by the socket methods.recv() inside of recv()?
- Idea for a solution: set a flag before calling the
recv()at the very bottom and returnnilif we're already inrecv. - 19:25:31 yyzfp$ Lua filters should not be scheduling their own next reads.
- 19:30:34 yyzfp$ Also check nse_yield.
Not a priority
-
recv()- add the numbytes argument to that would let you control how much data is read -
connect()- pass the key to the connections[] global array as an argument -
close()- try to close cleanly - Find a way to rewrite
nls->in_send - Make lowest-level socket an userdata.
- Detect when user calls coroutine.resume().
- nse_main.lua:988
- See if I can get away without saving the coroutines by not using the main thread in recv handler.

