MCPcopy
hub / github.com/mitmproxy/mitmproxy / tdnsreq

Function tdnsreq

mitmproxy/test/tutils.py:5–23  ·  view source on GitHub ↗
(**kwargs)

Source from the content-addressed store, hash-verified

3
4
5def tdnsreq(**kwargs) -> dns.DNSMessage:
6 default = dict(
7 timestamp=946681200,
8 id=42,
9 query=True,
10 op_code=dns.op_codes.QUERY,
11 authoritative_answer=False,
12 truncation=False,
13 recursion_desired=True,
14 recursion_available=False,
15 reserved=0,
16 response_code=dns.response_codes.NOERROR,
17 questions=[dns.Question("dns.google", dns.types.A, dns.classes.IN)],
18 answers=[],
19 authorities=[],
20 additionals=[],
21 )
22 default.update(kwargs)
23 return dns.DNSMessage(**default) # type: ignore
24
25
26def tdnsresp(**kwargs) -> dns.DNSMessage:

Callers 13

test_dnsFunction · 0.90
tdnsflowFunction · 0.90
tflowsFunction · 0.90
test_regularFunction · 0.85
test_regular_hook_errFunction · 0.85
test_reverseFunction · 0.85

Calls 1

updateMethod · 0.45

Tested by 11

test_dnsFunction · 0.72
test_regularFunction · 0.68
test_regular_hook_errFunction · 0.68
test_reverseFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…