MCPcopy
hub / github.com/mitmproxy/mitmproxy / mutations

Function mutations

test/mitmproxy/proxy/layers/http/test_http_fuzz.py:90–99  ·  view source on GitHub ↗
(draw, elements)

Source from the content-addressed store, hash-verified

88
89@composite
90def mutations(draw, elements):
91 data = draw(elements)
92
93 cut_start = draw(integers(0, len(data)))
94 cut_end = draw(integers(cut_start, len(data)))
95 data = data[:cut_start] + data[cut_end:]
96
97 replace_start = draw(integers(0, len(data)))
98 replace_end = draw(integers(replace_start, len(data)))
99 return data[:replace_start] + draw(binary()) + data[replace_end:]
100
101
102@composite

Callers

nothing calls this directly

Calls 1

drawFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…