I'm debugging a python program named test.py as this:
#!/bin/env python
import sys
print sys.argv[1]
when I enter this command, result is confuse:
[root@yf-mos-test-net09 ~]# python test.py "{"execute": "guest-execute", "session": "4768", "arguments": {"commands": [{"command": "/bin/sh", "arguments": ["sh", "-c", "ping -c 1 8.8.8.8"]}]}}"
result is:
{execute: guest-execute, session: 4768, arguments: {commands: [{command: /bin/sh, arguments: [sh, -c, ping
what I expect should be:
{"execute": "guest-execute", "session": "4768", "arguments": {"commands": [{"command": "/bin/sh", "arguments": ["sh", "-c", "ping -c 1 8.8.8.8"]}]}}
How to fix this? Is there something wrong in my param or something wrong in my program? Thank you~