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

Class _GSSAPI_Field

scapy/layers/gssapi.py:162–183  ·  view source on GitHub ↗

PacketField that contains a GSSAPI_BLOB_SIGNATURE, but one that can have a payload when not encrypted.

Source from the content-addressed store, hash-verified

160
161
162class _GSSAPI_Field(PacketField):
163 """
164 PacketField that contains a GSSAPI_BLOB_SIGNATURE, but one that can
165 have a payload when not encrypted.
166 """
167
168 __slots__ = ["pay_cls"]
169
170 def __init__(self, name, pay_cls):
171 self.pay_cls = pay_cls
172 super().__init__(
173 name,
174 None,
175 GSSAPI_BLOB_SIGNATURE,
176 )
177
178 def getfield(self, pkt, s):
179 remain, val = super().getfield(pkt, s)
180 if remain and val:
181 val.payload = self.pay_cls(remain)
182 return b"", val
183 return remain, val
184
185
186# RFC2744 Annex A, Null values

Callers 1

LDAP_SASL_BufferClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected