From 407f99a555ca718ca065b207f3b216908dd5a4bb Mon Sep 17 00:00:00 2001 From: Robert Wasinger Date: Mon, 30 Sep 2024 17:09:22 -0700 Subject: [PATCH] route windows vnc correctly --- dojo_plugin/api/v1/workspace.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dojo_plugin/api/v1/workspace.py b/dojo_plugin/api/v1/workspace.py index da17f293a..23deecf14 100644 --- a/dojo_plugin/api/v1/workspace.py +++ b/dojo_plugin/api/v1/workspace.py @@ -56,6 +56,17 @@ def get(self): "password": password, } iframe_src = url_for("pwncollege_workspace.forward_workspace", service=service_param, service_path="vnc.html", **vnc_params) + elif service == "desktop-windows": + service_param = "~".join(("desktop-windows", str(user.id), container_password(container, "desktop-windows"))) + vnc_params = { + "autoconnect": 1, + "reconnect": 1, + "reconnect_delay": 200, + "resize": "local", + "path": url_for("pwncollege_workspace.forward_workspace", service=service_param, service_path="websockify"), + "password": "password", # Not really used for auth! + } + iframe_src = url_for("pwncollege_workspace.forward_workspace", service=service_param, service_path="vnc.html", **vnc_params) else: iframe_src = f"/workspace/{service}/"