aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/tools/console/consoleaddons.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/tools/console/consoleaddons.py b/mitmproxy/tools/console/consoleaddons.py
index 03f2e240..c73eda42 100644
--- a/mitmproxy/tools/console/consoleaddons.py
+++ b/mitmproxy/tools/console/consoleaddons.py
@@ -1,4 +1,5 @@
import csv
+import shlex
import typing
from mitmproxy import ctx
@@ -259,7 +260,7 @@ class ConsoleAddon:
def callback(opt):
# We're now outside of the call context...
- repl = " ".join(args)
+ repl = shlex.quote(" ".join(args))
repl = repl.replace("{choice}", opt)
try:
self.master.commands.call(subcmd + " " + repl)