Nmap Development mailing list archives
Re: Reduce zenmap topology noise (patch)
From: Anders Sundman <anders () 4zm org>
Date: Wed, 04 Jan 2012 08:42:06 +0100
On 2011-12-31 01:36, Colin L Rice wrote:
On 11-12-29 06:26 AM, Patrik Karlsson wrote:2011/12/14, Anders Sundman<anders () 4zm org>:I suggest combining nodes in the graph that represent anonymous hops between two known devices. Here is a patch implementing this behavior: http://www.4zm.org/files/2011/integration.py.diffCould some Zenmap guru take a look at this patch so that we can make a decision whether to commit it or not?I'm no guru but I've done some zenmap patch work. The obvious thing it is missing is some testcases. I don't remember if we have built them into radialnet but we have them in zenmap and It'd be nice if we kept them maintained.
I'm all for unit tests, but I could not find any test cases anywhere. Where can they be found and what test framework does (ze)nmap use?
The logic looks sound. I think we can use post_hop = find_hop_by_ttl(hops, ttl+1) if ttl < max(ttls) else None instead of post_hop = find_hop_by_ttl(hops, ttl+1) if ttl < len(hops) - 1 else None just so it is prettier.
There is a small performance hit in your suggested change since an O(1) operation becomes O(n). However, ttls is always short and the algorithmic degradation is therefore negligible. I agree it makes the code more readable which is a big plus. For this reason I'm in favor of using your suggested change. All the best, Anders _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: Reduce zenmap topology noise (patch) Anders Sundman (Jan 03)
- Re: Reduce zenmap topology noise (patch) Colin L Rice (Jan 03)
- <Possible follow-ups>
- Re: Reduce zenmap topology noise (patch) David Fifield (Jan 08)
- Re: Reduce zenmap topology noise (patch) Anders Sundman (Jan 09)
- Re: Reduce zenmap topology noise (patch) David Fifield (Jan 20)
- Re: Reduce zenmap topology noise (patch) Anders Sundman (Jan 09)