MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / succeed

Method succeed

mitmproxy/dns.py:351–367  ·  view source on GitHub ↗
(self, answers: list[ResourceRecord])

Source from the content-addressed store, hash-verified

349 )
350
351 def succeed(self, answers: list[ResourceRecord]) -> DNSMessage:
352 return DNSMessage(
353 timestamp=time.time(),
354 id=self.id,
355 query=False,
356 op_code=self.op_code,
357 authoritative_answer=False,
358 truncation=False,
359 recursion_desired=self.recursion_desired,
360 recursion_available=True,
361 reserved=0,
362 response_code=response_codes.NOERROR,
363 questions=self.questions,
364 answers=answers,
365 authorities=[],
366 additionals=[],
367 )
368
369 @classmethod
370 def unpack(cls, buffer: bytes, timestamp: float | None = None) -> DNSMessage:

Callers 3

test_responsesMethod · 0.80
resolveMethod · 0.80
dns_requestFunction · 0.80

Calls 1

DNSMessageClass · 0.70

Tested by 1

test_responsesMethod · 0.64