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

Function nmap_tcppacket_sig

scapy/modules/nmap.py:110–121  ·  view source on GitHub ↗
(pkt)

Source from the content-addressed store, hash-verified

108
109
110def nmap_tcppacket_sig(pkt):
111 # type: (Optional[Packet]) -> Dict
112 res = {}
113 if pkt is not None:
114 res["DF"] = "Y" if pkt.flags.DF else "N"
115 res["W"] = "%X" % pkt.window
116 res["ACK"] = "S++" if pkt.ack == 2 else "S" if pkt.ack == 1 else "O"
117 res["Flags"] = str(pkt[TCP].flags)[::-1]
118 res["Ops"] = "".join(x[0][0] for x in pkt[TCP].options)
119 else:
120 res["Resp"] = "N"
121 return res
122
123
124def nmap_udppacket_sig(snd, rcv):

Callers 1

nmap_probes2sigFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected