1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

bug fixing

This commit is contained in:
fyodor
2006-09-12 07:03:35 +00:00
parent d7ee3ebfa7
commit 23c214d961
3 changed files with 19 additions and 19 deletions

View File

@@ -18,13 +18,13 @@ dummy:
.cc.o: dummy
$(CXX) -c $(CXXFLAGS) $(INCLUDE_FLAGS) $(DEFINES) $< -o $@
fingerfix: dummy
fingerfix: dummy fingerlib.o
$(CXX) $(CXXFLAGS) -Wall $(INCLUDE_FLAGS) $(LINK_FLAGS) $(DEFINES) -o $@ $@.cc fingerlib.o $(NMAP_OBJS) -lm -lnbase -lpcap -lpcre -lssl -lcrypt
fingermatch: dummy
fingermatch: dummy fingerlib.o
$(CXX) $(CXXFLAGS) -Wall $(INCLUDE_FLAGS) $(LINK_FLAGS) $(DEFINES) -o $@ $@.cc fingerlib.o $(NMAP_OBJS) -lm -lnbase -lpcap -lpcre -lssl -lcrypt
fingerdiff: dummy
fingerdiff: dummy fingerlib.o
$(CXX) $(CXXFLAGS) -Wall $(INCLUDE_FLAGS) $(LINK_FLAGS) $(DEFINES) -o $@ $@.cc fingerlib.o $(NMAP_OBJS) -lm -lnbase -lpcap -lpcre -lssl -lcrypt
servicematch: dummy

View File

@@ -194,25 +194,25 @@ int readFP(FILE *filep, char *FP, int FPsz ) {
lineno++;
linelen = strlen(line);
p = line;
if (*p == '\n' || *p == '.') {
if (*p == '\n' || *p == '.') {
// end of input
*dst = '\0';
if(isInWrappedFP) {
// We have just completed reading in a wrapped fp. Because a
// wrapped fp is submitted by user, so we check if there is a
// SCAN line in it. If yes, look inside the scan line.
*dst = '\0';
checkFP(oneFP);
isInWrappedFP = false;
}
// We have just completed reading in a wrapped fp. Because a
// wrapped fp is submitted by user, so we check if there is a
// SCAN line in it. If yes, look inside the scan line.
checkFP(oneFP);
isInWrappedFP = false;
}
break;
}
while(*p && isspace(*p)) p++;
if (*p == '#')
continue; // skip the comment line
if (*p == '#')
continue; // skip the comment line
if (dst - FP + linelen >= FPsz - 5)
fatal("[ERRO] Overflow!\n");
if (dst - FP + linelen >= FPsz - 5)
fatal("[ERRO] Overflow!\n");
if(strncmp(p, "OS:", 3) == 0) {
// the line is start with "OS:"
@@ -223,9 +223,9 @@ int readFP(FILE *filep, char *FP, int FPsz ) {
}
p += 3;
while(*p != '\r' && *p != '\n') {
*dst++ = toupper(*p);
if(*p == ')') *dst++ = '\n';
p++;
*dst++ = toupper(*p);
if(*p == ')') *dst++ = '\n';
p++;
}
continue;
}

View File

@@ -143,7 +143,7 @@ int main(int argc, char *argv[]) {
if (!testFP) fatal("Sorry -- failed to parse the so-called fingerprint you entered");
if ((rc = remove_duplicate_tests(testFP))) {
printf("\n**WARNING**: Adjusted fingerprint due to %d duplicated tests (we only look at the first).", rc);
printf("[WARN] Adjusted fingerprint due to %d duplicated tests (we only look at the first).\n", rc);
}
/* Now we find the matches! */