Nmap Development mailing list archives

Re: [NSE] http-archive.nse


From: Patrick Donnelly <batrick () batbytes com>
Date: Mon, 25 Nov 2013 15:27:54 -0500

On Mon, Nov 25, 2013 at 12:28 PM, George Chatzisofroniou
<sophron () latthi com> wrote:
On Wed, Nov 20, 2013 at 06:44:19PM -0500, Patrick Donnelly wrote:
This is very cool. Thanks for coming back and finishing up the
scripts. My main comment so far is that I'd like to see
http-archive-liveness depend on http-archive (see [1]). I'd like to
reduce code repetition. [Unless you have a good reason to keep them
like this?]

From what i see, dependencies in NSE are about establishing an ordering of
scripts.

Yes, and the #1 reason for this ordering is so dependent scripts can
use the results from an earlier script.

But i don't think this is what we want here. We want to be able to
execute http-archive-liveness without running http-archive at all.

To reduce the code repetition we could either 1) make an archive.org crawling
library or 2) merge the two scripts.

There is a very fuzzy line between when to move a script like
http-archive.nse to a library and when to keep it as a regular script.
If http-archive-liveness can be made to use the results from
http-archive instead of doing the same thing, that will reduce code
the scripts share. If http-archive-liveness cannot use http-archive
results then perhaps a library would be best.

On Mon, Nov 25, 2013 at 12:03:33AM -0500, Patrick Donnelly wrote:
o Lines 141 and 142 (http-archive.nse) should use string.match and not
string.gmatch (unrelated to bug).

I don't see a "gmatch" statement in none of the scripts.

Sorry, I apparently was looking at the http-archive script in your
original September 23rd post.

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


Current thread: