Skip to content

Commit d80d6d8

Browse files
authored
1.0.6 (#9)
**Arcane Protocol Update:** The protocol has been upgraded to version 5.0.2, bringing support for several server improvements, including dynamic display resolution updates, HDPI settings changes, and Secure Desktop support for Remote Desktop Streaming and Input (Mouse, Keyboard, Clipboard).]
1 parent a5fc5d6 commit d80d6d8

8 files changed

Lines changed: 225 additions & 134 deletions

File tree

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ The client/viewer is a cross-platform application developed in Python, using the
1010

1111
The project was renamed to Arcane to avoid the generic nature of the previous name and to signify a major step in the project's development: the complete rewrite of the viewer to be cross-platform.
1212

13-
[![Demo Video](https://raw.githubusercontent.com/PhrozenIO/Arcane/main/resources/images/video.png)](https://www.youtube.com/watch?v=h6xePrsIcQY)
14-
15-
> Arcane is currently in beta and is not recommended for production environments.
13+
[![Demo Video](https://raw.githubusercontent.com/PhrozenIO/Arcane/main/resources/images/video.png)](https://www.youtube.com/watch?v=TgklYPXEptY)
1614

1715
## Key Features
1816

@@ -27,6 +25,8 @@ The project was renamed to Arcane to avoid the generic nature of the previous na
2725
* **Session Concurrency**: Multiple viewers can connect to a single server at the same time, allowing multiple users to collaborate on the same remote desktop.
2826
* **Sleep Mode Prevention**: To ensure that the remote desktop remains active and responsive, the module prevents the remote computer from entering sleep mode while it is waiting for viewers to connect.
2927
* **Streaming Optimization**: To improve the streaming speed, the module only sends updated pieces of the desktop to the viewer, reducing the amount of data transmitted over the network.
28+
* **Secure Desktop / LogonUI Integration**: When Arcane Server is run as an interactive SYSTEM process, it can access Secure Desktop features, such as Logon UI or UAC prompts, without relying on external processes or tools. Everything is handled within a single Arcane Server instance. Please note that exposing an interactive SYSTEM process can pose security risks; use this feature only if you understand the implications.
29+
* **Dynamic Display Settings Update:** Arcane Server detects changes in display resolution or HDPI settings and keeps the Viewer updated with these adjustments.
3030

3131
## Coming Soon
3232

@@ -71,9 +71,10 @@ For detailed instructions on how to use and configure the Arcane Server, please
7171

7272
## Version Table
7373

74-
| Version | Protocol Version | Release Date | Compatible Servers |
75-
|---------|------------------|----------------|--------------------|
76-
| 1.0.5b | 5.0.1 | 22 August 2024 | [1.0.4](https://github.com/PhrozenIO/ArcaneServer/releases/tag/1-0-4) |
74+
| Version | Protocol Version | Release Date | Compatible Servers |
75+
|---------|------------------|-------------------|--------------------|
76+
| 1.0.5b | 5.0.1 | 22 August 2024 | [1.0.4](https://github.com/PhrozenIO/ArcaneServer/releases/tag/1-0-4) |
77+
| 1.0.6 | 5.0.2 | 17 September 2024 | |
7778

7879
> ⓘ You can use any version of the viewer with any version of the server, as long as the protocol version matches. The protocol version ensures compatibility between the viewer and the server.
7980
@@ -103,6 +104,10 @@ For detailed instructions on how to use and configure the Arcane Server, please
103104

104105
## Change Log
105106

107+
### Version 1.0.6
108+
109+
- [x] **Arcane Protocol Update:** The protocol has been upgraded to version 5.0.2, bringing support for several server improvements, including dynamic display resolution updates, HDPI settings changes, and Secure Desktop support for Remote Desktop Streaming and Input (Mouse, Keyboard, Clipboard).]
110+
106111
### Version 1.0.5 (Beta)
107112

108113
This release focuses on improving the code structure through extensive refactoring and resolving infrequent bugs caused by previously unhandled edge cases. Type hinting has been fully implemented, and the code is now nearly ready for production deployment.
@@ -115,7 +120,7 @@ This release focuses on improving the code structure through extensive refactori
115120
### Version 1.0.3 (Beta)
116121

117122
- [x] The connection window interface has been streamlined, with additional options now accessible in a dedicated settings window.
118-
- [x] Server certificate validation has been introduced. When connecting to a server for the first time, users will be prompted to trust the certificate and can choose to remember their decision.
123+
- [x] Server certificate validation has been introduced. When co- nnecting to a server for the first time, users will be prompted to trust the certificate and can choose to remember their decision.
119124
- [x] A new settings window has been implemented, offering support for additional remote desktop parameters and managing trusted server certificates, including options to add, edit, and remove certificates.
120125
- [x] Various code refactoring and structural improvements have been made to enhance the overall performance and maintainability of the application.
121126

@@ -126,6 +131,16 @@ This release focuses on improving the code structure through extensive refactori
126131
- [x] HDPI and scaling support have been improved.
127132
- [x] Arcane Viewer Virtual Desktop Window placement has been improved.
128133

134+
## Special Thanks
135+
136+
* [Mudpak (Mudsor MASOOD)](https://www.linkedin.com/in/mudsormasood/) - Official Beta / Quality Tester
137+
138+
Additionally, I extend my gratitude to those who contributed to enhancing the project's visibility:
139+
140+
* [Laurent Minne](https://www.linkedin.com/in/laurent-minne/)
141+
142+
*If you share Arcane with your community, please feel free to contact me to be recognized in this section. I am very grateful to those who contribute by sharing my research and projects.*
143+
129144
---
130145

131146
![HackTheBox Meetup France](https://raw.githubusercontent.com/PhrozenIO/Arcane/main/resources/images/htb_france.png)

arcane_viewer/arcane/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ def get_asset_file(asset_name: str) -> str:
2525

2626

2727
# Application Information
28-
APP_VERSION = "1.0.5"
28+
APP_VERSION = "1.0.6"
2929
APP_NAME = "Arcane"
3030
APP_ORGANIZATION_NAME = "Phrozen"
31-
APP_DISPLAY_NAME = f"{APP_NAME} {APP_VERSION} (βeta)"
31+
APP_DISPLAY_NAME = f"{APP_NAME} {APP_VERSION}"
3232

3333
# Remote Desktop Engine Hardcoded Values
3434
VD_WINDOW_ADJUST_RATIO = 90

arcane_viewer/arcane/protocol.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from enum import Enum, auto
88

9-
PROTOCOL_VERSION = '5.0.1'
9+
PROTOCOL_VERSION = '5.0.2'
1010

1111

1212
class WorkerKind(Enum):
@@ -29,8 +29,6 @@ class ArcaneProtocolCommand(Enum):
2929
BadRequest = 0x5
3030
ResourceFound = 0x6
3131
ResourceNotFound = 0x7
32-
LogonUIAccessDenied = 0x8
33-
LogonUIWrongSession = 0x9
3432

3533

3634
class OutputEvent(Enum):

arcane_viewer/arcane/threads/events.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ def client_execute(self) -> None:
9292
@pyqtSlot(int, int, arcane.MouseState, arcane.MouseButton)
9393
def send_mouse_event(self, x: int, y: int, state: arcane.MouseState, button: arcane.MouseButton) -> None:
9494
""" Send mouse event to the server """
95-
if self.session.presentation:
96-
return
97-
9895
if self.client is not None and self._connected:
9996
self.client.write_json(
10097
{
@@ -107,25 +104,20 @@ def send_mouse_event(self, x: int, y: int, state: arcane.MouseState, button: arc
107104
)
108105

109106
@pyqtSlot(str)
110-
def send_key_event(self, keys: str) -> None:
107+
def send_key_event(self, keys: str, is_shortcut: bool) -> None:
111108
""" Send keyboard event to the server """
112-
if self.session.presentation:
113-
return
114-
115109
if self.client is not None and self._connected:
116110
self.client.write_json(
117111
{
118112
"Id": arcane.OutputEvent.Keyboard.name,
113+
"IsShortcut": is_shortcut,
119114
"Keys": keys,
120115
}
121116
)
122117

123118
@pyqtSlot(int)
124119
def send_mouse_wheel_event(self, delta: int) -> None:
125120
""" Send mouse wheel event to the server """
126-
if self.session.presentation:
127-
return
128-
129121
if self.client is not None and self._connected:
130122
self.client.write_json(
131123
{

arcane_viewer/arcane/threads/v_desktop.py

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
Author: Jean-Pierre LESUEUR (@DarkCoderSc)
33
License: Apache License 2.0
44
More information about the LICENSE on the LICENSE file in the root directory of the project.
5-
6-
Todo:
7-
- (0001) LogonUI Support
85
"""
96

107
import logging
@@ -25,15 +22,20 @@
2522
class VirtualDesktopThread(ClientBaseThread):
2623
""" Thread to handle remote desktop streaming, at quantum level """
2724
open_cellar_door = pyqtSignal(arcane.Screen)
28-
request_screen_selection = pyqtSignal(list)
29-
chunk_received = pyqtSignal(QImage, int, int)
25+
request_screen_selection_dialog_signal = pyqtSignal(list)
26+
received_dirty_rect_signal = pyqtSignal(QImage, int, int)
27+
start_events_worker_signal = pyqtSignal()
3028

3129
def __init__(self, session: arcane.Session) -> None:
3230
super().__init__(session, arcane.WorkerKind.Desktop)
3331

3432
self.selected_screen: Optional[arcane.Screen] = None
3533
self.event_loop: Optional[QEventLoop] = None
3634

35+
def open_or_refresh_cellar_door(self) -> None:
36+
if self.selected_screen is not None:
37+
self.open_cellar_door.emit(self.selected_screen)
38+
3739
"""`Destruction is a form of creation. So the fact they burn the money is ironic. They just want to see what happens
3840
when they tear the world apart. They want to change things.`, Donnie Darko"""
3941
def client_execute(self) -> None:
@@ -61,24 +63,30 @@ def client_execute(self) -> None:
6163
"ImageCompressionQuality": self.session.option_image_quality,
6264
"PacketSize": self.session.option_packet_size.value,
6365
"BlockSize": self.session.option_block_size.value,
64-
"LogonUI": False, # TODO: 0001
6566
}
6667
)
6768

6869
""" Open Cellar Door
6970
`This famous linguist once said, of all the phrases in the English language, of all the endless combinations
7071
of words in all of history, that 'cellar door' is the most beautiful.`, Karen Pomeroy"""
71-
self.open_cellar_door.emit(
72-
self.selected_screen
73-
)
72+
self.open_or_refresh_cellar_door()
73+
74+
self.start_events_worker_signal.emit()
7475

7576
packet_max_size = self.session.option_packet_size.value
7677
while self._running:
7778
try:
78-
chunk_size, x, y = struct.unpack('III', self.client.conn.read(12))
79+
chunk_size, x, y, screen_updated = struct.unpack('IIIB', self.client.conn.read(13))
7980
except (Exception, ):
8081
break
8182

83+
if bool(screen_updated):
84+
self.selected_screen = arcane.Screen(self.client.read_json())
85+
86+
self.open_or_refresh_cellar_door()
87+
88+
continue
89+
8290
chunk_bytes = QByteArray()
8391
bytes_read = 0
8492
while bytes_read < chunk_size:
@@ -94,7 +102,7 @@ def client_execute(self) -> None:
94102
chunk = QImage()
95103
chunk.loadFromData(chunk_bytes)
96104

97-
self.chunk_received.emit(
105+
self.received_dirty_rect_signal.emit(
98106
chunk,
99107
x,
100108
y,
@@ -109,7 +117,7 @@ def stop(self) -> None:
109117
def display_screen_selection_dialog(self, screens: List[arcane.Screen]) -> None:
110118
self.event_loop = QEventLoop()
111119

112-
self.request_screen_selection.emit(screens)
120+
self.request_screen_selection_dialog_signal.emit(screens)
113121

114122
self.event_loop.exec()
115123

0 commit comments

Comments
 (0)