mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-02 08:15:22 +00:00
shlex.quote
This commit is contained in:
parent
4e03326ec5
commit
d6d2f55a4f
@ -1,4 +1,5 @@
|
|||||||
import csv
|
import csv
|
||||||
|
import shlex
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
from mitmproxy import ctx
|
from mitmproxy import ctx
|
||||||
@ -259,7 +260,7 @@ class ConsoleAddon:
|
|||||||
|
|
||||||
def callback(opt):
|
def callback(opt):
|
||||||
# We're now outside of the call context...
|
# We're now outside of the call context...
|
||||||
repl = "\"" + " ".join(args) + "\""
|
repl = shlex.quote(" ".join(args))
|
||||||
repl = repl.replace("{choice}", opt)
|
repl = repl.replace("{choice}", opt)
|
||||||
try:
|
try:
|
||||||
self.master.commands.call(subcmd + " " + repl)
|
self.master.commands.call(subcmd + " " + repl)
|
||||||
|
Loading…
Reference in New Issue
Block a user