#NEWLINE# def nmap_match_one_sig( seen , ref ) : #NEWLINE# #INDENT# c = 0 #NEWLINE# for k in seen . keys ( ) : #NEWLINE# #INDENT# if ( c in ref ) : #NEWLINE# #INDENT# if ( seen [ k ] in ref [ k ] . split ( '|' ) ) : #NEWLINE# #INDENT# c += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( ( c == 0 ) and ( seen . get ( 'Resp' ) == 'N' ) ) : #NEWLINE# #INDENT# return 0.7 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( ( 1.0 * c ) / len ( seen . keys ( ) ) )