Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: [NSE] Adding mkdir support
From: Patrick Donnelly <batrick () batbytes com>
Date: Mon, 2 Apr 2012 21:17:25 -0400

On Sat, Mar 31, 2012 at 3:56 PM, Patrik Karlsson <patrik () cqure net> wrote:
Thanks! I fixed both changes you mentioned.
In addition, I ended up creating the luadoc in nselib/fs.luadoc

Great, we need the luadoc as well (I should have mentioned that).

as well as
some minor code adjustments as a result of that.
I essentially made sure that all functions returned false instead of nil as
there first return value and added a status return value for one or two
functions that needed it.

I don't really like adopting the status as first return policy outside
of the nsock binding. The Lua idiom is to return nil, error_message on
failure; otherwise, return the expected values. The io library is a
good example of this practice. The nice thing about this is you can
wrap everything with the assert function to raise errors on failure.

The new patch with these changes, including the luadoc is attached. I have
done some testing using a test script and have finished implementing the
http-mirror script which makes use of the mkdir function.

The patch looks good to me. I'm ultimately indifferent on the first
return status code change to lfs.

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


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]