1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00
Commit Graph

20 Commits

Author SHA1 Message Date
david
77fbcc8bc5 Get rid of ndiff.py symlink.
This existed only to allow importing the ndiff program as a module for
the ndifftest.py program. I found another way to do that.
2012-08-02 18:35:36 +00:00
david
5be27e7aad Do output as a byproduct of calculating the diff.
This doesn't require keeping the whole diff in memory until the end.
2011-12-21 06:59:46 +00:00
david
79ae90e80f Add nmaprun information to Ndiff output.
Patch by Daniel Miller.
2011-04-29 03:56:03 +00:00
david
9a65f4e010 Fix Ndiff unit test failure code found by Daniel Miller.
I guess this means the test was passing.
2011-04-28 22:14:54 +00:00
david
05e5348b57 Normalize the Ndiff exit codes.
0 if the scans are equal,
	1 if they differ, and
	2 for runtime errors.
Add tests and man page documentation.
2009-07-30 14:40:46 +00:00
david
3a4a181f2d Remove extraports state inference from Ndiff. This was a feature that,
if there was only one extraports state, would create a Port object for
each scanned port that was not listed explictly. So for example, if a
scan of 100 ports had 5 open ports and an extraports of "filtered",
Ndiff would create 95 port records in the "filtered" state in addition
to the 5 "open". If there was more than one extraports state this was
not possible.

This turned out to be a slow operation, out of all proportion to its
utility. Here are times for a diff of random-1.xml and random-2.xml,
before and after:

real    0m11.912s
user    0m10.970s
sys     0m0.249s

real    0m0.773s
user    0m0.726s
sys     0m0.046s

In most cases extraports are not shown in the output, so this was wasted
effort. I know of only one place where it affected the output, when an
extraports in the A scan because a non-extraports in a different state
in the B scan. Then the previous state would be included in the <a>
port, where now it will just be listed without a state.
2009-07-17 19:46:41 +00:00
david
b9f994e71d Add script output to Ndiff XML output. 2009-07-13 05:34:13 +00:00
david
a660b37026 Parse script results. 2009-07-10 23:55:29 +00:00
david
72949e27e8 Remove the test for the sort order of addresses. The idea behind that
was that if a host had multiple addresses of the same type, they should
be sorted numerically, not alphabetically. So 20.0.0.1 should come
before 100.0.0.1. But the way Nmap works, I don't think a host can have
more than one address of the same type, and it's not worth the code it
would take to make them sort properly if it did.
2009-07-10 23:30:32 +00:00
david
3d3e3b8515 Regnerate test scan files, add script scanning, version detection, and
OS detection to complex.xml.
2009-07-10 23:28:28 +00:00
david
98af0bba24 Add an append_raw method to the Table class to add an unformatted string
to a table. This is going to be for script output.
2009-07-10 01:25:39 +00:00
david
c701b9559b Merge from /nmap-exp/david/ndiff-mkii and
/nmap-exp/david/zenmap-ndiff-alt. This is the new Ndiff output format
described in http://seclists.org/nmap-dev/2009/q1/0825.html and
http://seclists.org/nmap-dev/2009/q2/0127.html.
2009-04-10 19:07:39 +00:00
david
72e9a1fd93 Adjust capitalization of "ndiff" to "Ndiff" in a couple of comments. 2009-03-26 01:57:57 +00:00
david
ccd55623c7 Record OS information in Ndiff. 2009-03-18 00:09:14 +00:00
david
fd41fcd0f7 Include service detection information in Ndiff output. Change the output format
from

	21/tcp is open, was filtered.
	23/tcp is open, was filtered.
	80/tcp is open, was filtered.
	8701/tcp is filtered, was open.

to

	-21/tcp filtered  
	+21/tcp open ftp Netgear broadband router ftpd 1.0
	-23/tcp filtered  
	+23/tcp open telnet Netgear broadband router admin telnetd
	-80/tcp filtered  
	+80/tcp open http Embedded Allegro RomPager webserver 4.07 UPnP/1.0 (ZyXEL ZyWALL 2)
	-8701/tcp open unknown 
	+8701/tcp filtered
2009-03-16 19:53:34 +00:00
david
91956287c2 Make each possible diff hunk its own class, rather than having them all be in
the DiffHunk class with a type tag. Now output is handled with polymorphism
rather than dispatching with if/else. It also better shows what members each
hunk type has.
2009-03-13 00:17:48 +00:00
david
c4b27a31b4 Don't ignore host state changes when the change is to the state "unknown". This
happens when a host was scanned in the A scan but wasn't scanned in the B scan.
I previously had it ignore such changes using the logic that the diff should be
like scan aggregation: no new information means no state change. But I think
it's more useful to see those changes in which hosts were scanned.

This is analogous to r10263, which did the same thing for port state changes.
2009-01-20 21:02:15 +00:00
david
efac5dd813 Add some missing words to a comment in ndifftest.py. 2008-11-21 17:40:36 +00:00
david
989117eb54 Update a unit test to match my new thinking about port state changes. 2008-09-19 00:42:53 +00:00
david
903e91a48b Move /nmap-exp/david/ndiff to /nmap/ndiff. 2008-09-18 23:31:19 +00:00