mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
fd8c921a2f
Bash (and many other shells) provide a nifty feature in "anonymous pipe" or "anonymous fifo" whereby the output of a subshell may be treated as a simple file by the parent shell: http://unix.stackexchange.com/a/156088 Unfortunately, libmproxy complains because that "file" is not a regular file, as os.path.isfile checks, e.g. giving the error "Not a file: /dev/fd/11". This patch is intended to provide for the following use-case: ``` mitmdump -s <(echo "def response(context, flow):\n flow.response.headers['newheader'] = [`hostname`]") ``` where `hostname` may be replaced with a more complicated lookup. |
||
---|---|---|
.. | ||
console | ||
contrib | ||
models | ||
onboarding | ||
platform | ||
protocol | ||
proxy | ||
web | ||
webfonts | ||
__init__.py | ||
cmdline.py | ||
contentviews.py | ||
controller.py | ||
dump.py | ||
exceptions.py | ||
filt.py | ||
flow.py | ||
main.py | ||
script.py | ||
stateobject.py | ||
tnetstring.py | ||
utils.py | ||
version.py |