I am using subprocess.check_output() method to execute commands from within the python script. There are some commands that need " (double quotes) to be present in syntax.
Here's one example:
> drozer console connect -c "run app.package.info -a com.package.name"
It throws error if we remove " (double quotes) from above command.
I did the following :
string = '\"run app.package.info -a com.package.name\"'
command = ['/usr/bin/drozer','console','connect','-c',string]
output = subprocess.check_output(command)
This yields me to error:
*** Unknown syntax: "run app.package.info -a com.package.name"
How can I solve this issue of quotes?