Nmap Development mailing list archives

Re: [patch][Ndiff] Make Ndiff install as a library as well as a script


From: Daniel Miller <bonsaiviking () gmail com>
Date: Mon, 14 Oct 2013 23:04:42 -0500

On Sun, Oct 13, 2013 at 10:12 PM, Fyodor <fyodor () nmap org> wrote:

Thanks Dan, this sounds like a promising idea!  I've only been able to take
a quick glance, but I have a few questions:

o Is it nmap/ndiff/ndiff in svn which would have to be renamed to ndiff.py?
And this is so it can function as a more general Nmap parsing library?  Your
patch does not do this renaming.

Yes, nmap/ndiff/ndiff would be renamed to nmap/ndiff/ndiff.py. I
didn't include that in the diff to keep the size down (since the diff
was treating it as a delete-and-new-file).


o Your patch creates nmap/ndiff/scripts/ndiff, which is only five lines of
code.  So this would become the command line script people would call to use
ndiff, and it basically relies on the newly renamed ndiff.py library to do
all of its work?

Yes, the new script is basically a duplicate of the if
__name__=="__main__" section of the original Ndiff.


o  On Windows of course we use py2exe to create an executable ndiff.exe.  I
assume this still works with your changes?

I didn't check this, but I don't see why it wouldn't work. I will look
at the Makefiles (and/or other build directives) to be sure that the
name change is propagated throughout. Please expect another patch in a
couple days if I find anything that needs to be changed.


Thanks,
Fyodor



Thanks for the feedback!

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


Current thread: