From 87cdac12dba6a2c0f7e62b18d8a217106e09a6ea Mon Sep 17 00:00:00 2001 From: daniel goldberg Date: Tue, 23 Aug 2016 11:02:18 +0300 Subject: [PATCH] Fixed bug in running Monkey from Island when win32 is the platform --- monkey_island/cc/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monkey_island/cc/main.py b/monkey_island/cc/main.py index 341c7b3ed..ccf3fe995 100644 --- a/monkey_island/cc/main.py +++ b/monkey_island/cc/main.py @@ -336,7 +336,10 @@ def run_local_monkey(island_address): # run the monkey try: - pid = subprocess.Popen(["%s m0nk3y -s %s:%s" % (target_path, island_address, ISLAND_PORT)], shell=True).pid + args = ["%s m0nk3y -s %s:%s" % (target_path, island_address, ISLAND_PORT)] + if sys.platform == "win32": + args = "".join(args) + pid = subprocess.Popen(args, shell=True).pid except Exception, exc: return (False, "popen failed: %s" % exc)