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)