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

Method send

scapy/layers/kerberos.py:2937–2969  ·  view source on GitHub ↗
(self, x, **kwargs)

Source from the content-addressed store, hash-verified

2935 return self.queue.popleft()
2936
2937 def send(self, x, **kwargs):
2938 from scapy.layers.http import HTTP_Client
2939
2940 cli = HTTP_Client(no_check_certificate=self.no_check_certificate)
2941 try:
2942 # sr it via the web client
2943 resp = cli.request(
2944 self.url,
2945 Method="POST",
2946 data=bytes(
2947 # Wrap request in KDC_PROXY_MESSAGE
2948 KDC_PROXY_MESSAGE(
2949 kerbMessage=bytes(x),
2950 targetDomain=ASN1_GENERAL_STRING(self.targetDomain.encode()),
2951 # dclocatorHint is optional
2952 dclocatorHint=self.dclocatorHint,
2953 )
2954 ),
2955 http_headers={
2956 "Cache-Control": "no-cache",
2957 "Pragma": "no-cache",
2958 "User-Agent": "kerberos/1.0",
2959 },
2960 )
2961 if resp and conf.raw_layer in resp:
2962 # Parse the payload
2963 resp = KDC_PROXY_MESSAGE(resp.load).kerbMessage
2964 # We have an answer, queue it.
2965 self.queue.append(resp)
2966 else:
2967 raise EOFError
2968 finally:
2969 cli.close()
2970
2971 @staticmethod
2972 def select(sockets, remain=None):

Callers 1

sendMethod · 0.45

Calls 7

requestMethod · 0.95
closeMethod · 0.95
HTTP_ClientClass · 0.90
ASN1_GENERAL_STRINGClass · 0.90
KDC_PROXY_MESSAGEClass · 0.85
encodeMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected