Nmap Development mailing list archives

Re: [NSE] Adding mkdir support


From: Patrik Karlsson <patrik () cqure net>
Date: Fri, 30 Mar 2012 20:30:49 +0200

On Fri, Mar 30, 2012 at 12:26 AM, Patrick Donnelly <batrick () batbytes com>wrote:

On Thu, Mar 29, 2012 at 6:10 PM, Patrik Karlsson <patrik () cqure net> wrote:
I think adding lfs to NSE is a good solution. We can move the NSE
specific stuff to the private cnse library in nse_main.cc or maybe in
nse_nmaplib.cc.


Sounds like a good idea. How much work would it involve do you think?
Is it a matter of simply copying the code over or does it require a lot
other changes?

Very little work. It would involve moving the nse_fetch* functions in
nse_fs.cc to nse_main.cc. Correct the references in nse_main.cc and
nse_main.lua which I believe are cnse.fs.* to cnse.*.

The rest is just copying lfs.[ch] and adding code in nse_main.cc to
load the library into the global namespace. You can look at
nse_bit.(cc|h) as a simple example.

--
- Patrick Donnelly


I'm attaching a patch that adds lfs to nse_fs.cc and the fs namespace and
moves the functions you mentioned to nse_main.cc.
As this is not one of my usual script/library additions I would appreciate
all help/suggestions I can get.

Cheers,
Patrik
-- 
Patrik Karlsson
http://www.cqure.net
http://twitter.com/nevdull77

Attachment: nmap-lfs.patch
Description:

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

Current thread: