Nmap Development mailing list archives

Re: Writeup on `brute.lua` Modification v.2. Resource Management Feature.


From: Patrick Donnelly <batrick () batbytes com>
Date: Thu, 9 Jun 2016 22:15:06 -0400

On Thu, Jun 9, 2016 at 10:04 PM, Patrick Donnelly <batrick () batbytes com> wrote:
This should take an optional table as its first argument so that
repeated calls do not created unnecessary garbage (i.e. a new table
for each call). Look at the Lua os.time function for inspiration:

https://www.lua.org/manual/5.2/manual.html#pdf-os.time
https://www.lua.org/source/5.2/loslib.c.html#os_time

Hrm, this isn't what I thought. os.time doesn't populate input table
with the current date. I also can't find the function I was thinking
of which did it. I had thought it was os.date but it always returns a
new table.

Anyway, disregard my suggestion and just return a new table everytime.

-- 
Patrick Donnelly
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: