mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 03:11:48 +00:00
Extend parse_fingerprint_file for FP processing tools to get MatchPoints only
This commit is contained in:
parent
12bb86e678
commit
5f3be5ad17
2 changed files with 5 additions and 3 deletions
|
|
@ -973,7 +973,7 @@ FingerPrint *parse_single_fingerprint(const FingerPrintDB *DB, const char *fprin
|
|||
}
|
||||
|
||||
|
||||
FingerPrintDB *parse_fingerprint_file(const char *fname) {
|
||||
FingerPrintDB *parse_fingerprint_file(const char *fname, bool points_only) {
|
||||
FingerPrintDB *DB = NULL;
|
||||
FingerPrint *current;
|
||||
FILE *fp;
|
||||
|
|
@ -999,6 +999,8 @@ top:
|
|||
fparse:
|
||||
if (strncmp(line, "Fingerprint", 11) == 0) {
|
||||
parsingMatchPoints = false;
|
||||
if (points_only)
|
||||
break;
|
||||
current = new FingerPrint;
|
||||
} else if (strncmp(line, "MatchPoints", 11) == 0) {
|
||||
if (DB->MatchPoints)
|
||||
|
|
@ -1089,5 +1091,5 @@ FingerPrintDB *parse_fingerprint_reference_file(const char *dbname) {
|
|||
/* Record where this data file was found. */
|
||||
o.loaded_data_files[dbname] = filename;
|
||||
|
||||
return parse_fingerprint_file(filename);
|
||||
return parse_fingerprint_file(filename, false);
|
||||
}
|
||||
|
|
|
|||
2
osscan.h
2
osscan.h
|
|
@ -245,7 +245,7 @@ FingerPrint *parse_single_fingerprint(const char *fprint_orig);
|
|||
/* These functions take a file/db name and open+parse it, returning an
|
||||
(allocated) FingerPrintDB containing the results. They exit with
|
||||
an error message in the case of error. */
|
||||
FingerPrintDB *parse_fingerprint_file(const char *fname);
|
||||
FingerPrintDB *parse_fingerprint_file(const char *fname, bool points_only);
|
||||
FingerPrintDB *parse_fingerprint_reference_file(const char *dbname);
|
||||
|
||||
void free_fingerprint_file(FingerPrintDB *DB);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue