From c0490af2fd6271ca7d375e3021e3bb1aad4f4d30 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 11 Apr 2008 18:57:32 +0000 Subject: [PATCH] Remove mentions of the TCP sequence class in XML output. --- docs/nmap.dtd | 1 - docs/nmap.xsl | 1 - global_structures.h | 2 -- nmap.cc | 22 ---------------------- nmap.h | 9 --------- output.cc | 2 +- 6 files changed, 1 insertion(+), 36 deletions(-) diff --git a/docs/nmap.dtd b/docs/nmap.dtd index 0420cf3c7..e0ebfaa8c 100644 --- a/docs/nmap.dtd +++ b/docs/nmap.dtd @@ -263,7 +263,6 @@ diff --git a/docs/nmap.xsl b/docs/nmap.xsl index 17bcf2bca..df72bbe0b 100644 --- a/docs/nmap.xsl +++ b/docs/nmap.xsl @@ -726,7 +726,6 @@

tcpsequence

diff --git a/global_structures.h b/global_structures.h index fc1e1a174..8dba989b2 100644 --- a/global_structures.h +++ b/global_structures.h @@ -202,8 +202,6 @@ struct timeout_info { struct seq_info { int responses; - int seqclass; /* SEQ_* defines in nmap.h. This should be removed when - we remove osscan gen1 cruft. */ int ts_seqclass; /* TS_SEQ_* defines in nmap.h */ time_t uptime; /* time of latest system boot (or 0 if unknown ) */ int ipid_seqclass; /* IPID_SEQ_* defines in nmap.h */ diff --git a/nmap.cc b/nmap.cc index 975dfe17c..e9ca6bcee 100644 --- a/nmap.cc +++ b/nmap.cc @@ -2371,28 +2371,6 @@ const char *seqidx2difficultystr(unsigned long idx) { return (idx < 3)? "Trivial joke" : (idx < 6)? "Easy" : (idx < 11)? "Medium" : (idx < 12)? "Formidable" : (idx < 16)? "Worthy challenge" : "Good luck!"; } - -const char *seqclass2ascii(int seqclass) { - switch(seqclass) { - case SEQ_CONSTANT: - return "constant sequence number (!)"; - case SEQ_64K: - return "64K rule"; - case SEQ_TD: - return "trivial time dependency"; - case SEQ_i800: - return "increments by 800"; - case SEQ_RI: - return "random positive increments"; - case SEQ_TR: - return "truly random"; - case SEQ_UNKNOWN: - return "unknown class"; - default: - return "ERROR, WTF?"; - } -} - const char *ipidclass2ascii(int seqclass) { switch(seqclass) { case IPID_SEQ_CONSTANT: diff --git a/nmap.h b/nmap.h index b46df08a1..56c0256bd 100644 --- a/nmap.h +++ b/nmap.h @@ -358,15 +358,6 @@ void *realloc(); wrapped. */ #define FP_RESULT_WRAP_LINE_LEN 74 -/* TCP/IP ISN sequence prediction classes */ -#define SEQ_UNKNOWN 0 -#define SEQ_64K 1 -#define SEQ_TD 2 -#define SEQ_RI 4 -#define SEQ_TR 8 -#define SEQ_i800 16 -#define SEQ_CONSTANT 32 - /* TCP Timestamp Sequence */ #define TS_SEQ_UNKNOWN 0 #define TS_SEQ_ZERO 1 /* At least one of the timestamps we received back was 0 */ diff --git a/output.cc b/output.cc index c46987008..ca206f892 100644 --- a/output.cc +++ b/output.cc @@ -1649,7 +1649,7 @@ void printosscanoutput(Target *currenths) { while(*p) p++; } - log_write(LOG_XML, "\n", (long) currenths->seq.index, seqclass2ascii(currenths->seq.seqclass), seqidx2difficultystr(currenths->seq.index), numlst); + log_write(LOG_XML, "\n", (long) currenths->seq.index, seqidx2difficultystr(currenths->seq.index), numlst); if (o.verbose) log_write(LOG_PLAIN,"%s", seqreport(&(currenths->seq)));