(flags)
| 101 | |
| 102 | |
| 103 | def p0f_selectdb(flags): |
| 104 | # tested flags: S, R, A |
| 105 | if flags & 0x16 == 0x2: |
| 106 | # SYN |
| 107 | return p0f_kdb |
| 108 | elif flags & 0x16 == 0x12: |
| 109 | # SYN/ACK |
| 110 | return p0fa_kdb |
| 111 | elif flags & 0x16 in [0x4, 0x14]: |
| 112 | # RST RST/ACK |
| 113 | return p0fr_kdb |
| 114 | elif flags & 0x16 == 0x10: |
| 115 | # ACK |
| 116 | return p0fo_kdb |
| 117 | else: |
| 118 | return None |
| 119 | |
| 120 | |
| 121 | def packet2p0f(pkt): |
no outgoing calls
no test coverage detected