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

Class CCPrincipal

scapy/modules/ticketer.py:130–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128
129
130class CCPrincipal(Packet):
131 fields_desc = [
132 IntEnumField("name_type", 0, _PRINCIPAL_NAME_TYPES),
133 FieldLenField("num_components", None, count_of="components", fmt="I"),
134 PacketField("realm", CCCountedOctetString(), CCCountedOctetString),
135 PacketListField(
136 "components",
137 [],
138 CCCountedOctetString,
139 count_from=lambda pkt: pkt.num_components,
140 ),
141 ]
142
143 def toPN(self):
144 return "%s@%s" % (
145 "/".join(x.data.decode() for x in self.components),
146 self.realm.data.decode(),
147 )
148
149 def guess_payload_class(self, payload):
150 return conf.padding_layer
151
152
153class CCDeltaTime(Packet):

Callers 2

CCCredentialClass · 0.85
CCacheClass · 0.85

Calls 5

IntEnumFieldClass · 0.90
FieldLenFieldClass · 0.90
PacketFieldClass · 0.90
PacketListFieldClass · 0.90

Tested by

no test coverage detected