mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Use stable_sort when sorting OS fingerprints for comparison.
Often an OS will respond differently to the second transmission of a probe than to the first. For example, sometimes after it sends a SYN/ACK it loses patience and sends a RST. The different second probe often has different flags and options. In OS integration, I normally want to compare with the first set of responses whenever they differ, so keep them in the first position when sorting.
This commit is contained in:
parent
7807926f15
commit
04f595e692
1 changed files with 2 additions and 2 deletions
|
|
@ -213,8 +213,8 @@ void FingerPrint::sort() {
|
|||
unsigned int i;
|
||||
|
||||
for (i = 0; i < tests.size(); i++)
|
||||
std::sort(tests[i].results.begin(), tests[i].results.end());
|
||||
std::sort(tests.begin(), tests.end());
|
||||
std::stable_sort(tests[i].results.begin(), tests[i].results.end());
|
||||
std::stable_sort(tests.begin(), tests.end());
|
||||
}
|
||||
|
||||
/* Compare an observed value (e.g. "45") against an OS DB expression (e.g.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue