From b290594d93d035edbee62c53e83e5f297abac600 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Fri, 15 Jan 2021 10:53:16 +0100 Subject: [PATCH] Upon --replace, suggest --modify-body / --modify-headers Else the user sees ``` --replace is deprecated. Please use `--replacements` instead. mitmdump: error: unrecognized arguments: --replace ``` and then ``` mitmdump: error: unrecognized arguments: --replacements --replacements is deprecated. Please use `--modify-body` or `--modify-headers` instead. ``` and feels silly --- mitmproxy/utils/arg_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/utils/arg_check.py b/mitmproxy/utils/arg_check.py index 44ef971ac..e7de8a703 100644 --- a/mitmproxy/utils/arg_check.py +++ b/mitmproxy/utils/arg_check.py @@ -97,7 +97,7 @@ REPLACEMENTS = { "--cert": "--certs", "--insecure": "--ssl-insecure", "-c": "-C", - "--replace": "--replacements", + "--replace": ["--modify-body", "--modify-headers"], "--replacements": ["--modify-body", "--modify-headers"], "-i": "--intercept", "-f": "--view-filter",