aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiroslav <ttahabatt@gmail.com>2018-02-19 23:50:46 +0200
committerMiroslav <ttahabatt@gmail.com>2018-02-19 23:50:46 +0200
commitd6d2f55a4f4f36519192706501880f11aa0b7217 (patch)
tree2f5e3e2c81b354d211e852d0e749687ffcb20713
parent4e03326ec5e26f9b9584fe980a196d034595d182 (diff)
downloadmitmproxy-d6d2f55a4f4f36519192706501880f11aa0b7217.tar.gz
mitmproxy-d6d2f55a4f4f36519192706501880f11aa0b7217.tar.bz2
mitmproxy-d6d2f55a4f4f36519192706501880f11aa0b7217.zip
shlex.quote
-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 e8979b01..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)