nmap.receive_bytes functions. It claimed that if you don't get all the
lines/bytes you request before a timeout, then a "TIMEOUT" error happens. In
reality you get back data as long as at least one byte was received before the
timeout. From nsock_readlines:
/* Read up to nlines lines (terminated with \n, which of course
inclues \r\n), or until EOF, or until the timeout, whichever comes
first. Note that NSE_STATUS_SUCCESS will be returned in the case
of EOF or tiemout if at least 1 char has been read. Also note that
you may get more than 'nlines' back -- we just stop once "at least"
'nlines' is read */
license" to "Same as Nmap--See http://nmap.org/book/man-legal.html" like
scripts commonly use. I added the field to some modules I know to be under the
Nmap license: bin, datafiles, dns, nmap, unpwdb. I left alone bin, bit, pcre,
and url, which come from outside sources.
nmap.new_try is not a function accepting another function, it is a function
taking a variable number of arguments, assumed to be the return value of some
function. In other words, the returned try function is not responsible for
running other functions, it only sees their return values.