MCPcopy Create free account
hub / github.com/secdev/scapy / _build_ticket

Method _build_ticket

scapy/modules/ticketer.py:1094–1476  ·  view source on GitHub ↗
(self, store)

Source from the content-addressed store, hash-verified

1092 )
1093
1094 def _build_ticket(self, store):
1095 if store["CC.ClaimsArrays"]:
1096 claimSet = CLAIMS_SET(
1097 ndr64=False,
1098 ClaimsArrays=[
1099 CLAIMS_ARRAY(
1100 usClaimsSourceType=ca["ClaimsSourceType"],
1101 ClaimEntries=[
1102 CLAIM_ENTRY(
1103 Id=ce["Id"],
1104 Type=ce["Type"],
1105 Values=NDRUnion(
1106 tag=ce["Type"],
1107 value=CLAIM_ENTRY_sub2(
1108 ValueCount=ce["StringValues"].count(";") + 1,
1109 StringValues=ce["StringValues"].split(";"),
1110 ),
1111 ),
1112 )
1113 for ce in ca["ClaimEntries"]
1114 ],
1115 )
1116 for ca in store["CC.ClaimsArrays"]
1117 ],
1118 usReservedType=0,
1119 ulReservedFieldSize=0,
1120 ReservedField=None,
1121 )
1122 else:
1123 claimSet = None
1124 _signature_set = lambda x: store[x + ".SignatureType"] != -1
1125 return EncTicketPart(
1126 transited=TransitedEncoding(
1127 trType=ASN1_INTEGER(0), contents=ASN1_STRING(b"")
1128 ),
1129 addresses=None,
1130 flags=store["flags"],
1131 key=EncryptionKey(
1132 keytype=store["key"]["keytype"],
1133 keyvalue=store["key"]["keyvalue"],
1134 ),
1135 crealm=store["crealm"],
1136 cname=PrincipalName(
1137 nameString=store["cname"]["nameString"],
1138 nameType=store["cname"]["nameType"],
1139 ),
1140 authtime=store["authtime"],
1141 starttime=store["starttime"],
1142 endtime=store["endtime"],
1143 renewTill=store["renewTill"],
1144 authorizationData=AuthorizationData(
1145 seq=[
1146 AuthorizationDataItem(
1147 adType=ASN1_INTEGER(1),
1148 adData=AuthorizationData(
1149 seq=[
1150 AuthorizationDataItem(
1151 adType="AD-WIN2K-PAC",

Callers 2

create_ticketMethod · 0.95
edit_ticketMethod · 0.95

Calls 15

_build_sidMethod · 0.95
CLAIMS_SETClass · 0.90
CLAIMS_ARRAYClass · 0.90
CLAIM_ENTRYClass · 0.90
NDRUnionClass · 0.90
CLAIM_ENTRY_sub2Class · 0.90
EncTicketPartClass · 0.90
TransitedEncodingClass · 0.90
ASN1_INTEGERClass · 0.90
ASN1_STRINGClass · 0.90
EncryptionKeyClass · 0.90
PrincipalNameClass · 0.90

Tested by

no test coverage detected