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

Method run_command_with_input

examples/contrib/mitmproxywrapper.py:53–56  ·  view source on GitHub ↗
(self, command, input)

Source from the content-addressed store, hash-verified

51 return {b: a for (a, b) in mapping}
52
53 def run_command_with_input(self, command, input):
54 popen = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
55 (stdout, stderr) = popen.communicate(input.encode())
56 return stdout.decode()
57
58 def primary_interace_name(self):
59 scutil_script = "get State:/Network/Global/IPv4\nd.show\n"

Callers 2

primary_interace_nameMethod · 0.95

Calls 2

encodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected