(pkt)
return r
Passive OS fingerprinting: which OS emitted this TCP packet ?
p0f(packet) -> accuracy, [list of guesses]
Passive OS fingerprinting: which OS emitted this TCP packet ?
p0f(packet) -> accuracy, [list of guesses]
Passive OS fingerprinting : which OS emitted this TCP packet ? p0f ( packet ) - > accuracy [ list of guesses ]
def p0f(pkt):
    """Passive OS fingerprinting: which OS emitted this TCP packet ?
p0f(packet) -> accuracy, [list of guesses]
"""
    db, sig = packet2p0f(pkt)
    if db:
        pb = db.get_base()
    else:
        pb = []
    if not pb:
        warning("p0f base empty.")
        return []
    #s = len(pb[0][0])
    r = []
    max = len(sig[4].split(",")) + 5
    for b in pb:
        d = p0f_correl(sig,b)
        if d == max:
            r.append((b[6], b[7], b[1] - pkt[IP].ttl))
    return r
def p0f ( pkt ) : db , sig = packet2p0f ( pkt ) if db : pb = db . get_base ( ) else : pb = [ ] if not pb : warning ( "p0f base empty." ) return [ ] #s = len(pb[0][0]) r = [ ] max = len ( sig [ 4 ] . split ( "," ) ) + 5 for b in pb : d = p0f_correl ( sig , b ) if d == max : r . append ( ( b [ 6 ] , b [ 7 ] , b [ 1 ] - pkt [ IP ] . ttl ) ) return r