MCPcopy Index your code
hub / github.com/secdev/scapy / p0f_selectdb

Function p0f_selectdb

scapy/modules/p0fv2.py:103–118  ·  view source on GitHub ↗
(flags)

Source from the content-addressed store, hash-verified

101
102
103def 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
121def packet2p0f(pkt):

Callers 2

packet2p0fFunction · 0.85
p0f_impersonateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected