Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions conf/default/web.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ ignore_rdp_cert = false
rdp_disable_wallpaper = yes
rdp_disable_theming = yes
rdp_enable_font_smoothing = no
# Idle timeout settings for interactive sessions
# idle_timeout_seconds: Maximum idle time before session is terminated
# Defaults to 0 (disabled) when omitted or set to an invalid value
idle_timeout_seconds = 0
# activity_check_interval: How often to check for timeout in seconds when enabled
activity_check_interval = 30
rdp_enable_full_window_drag = no
rdp_enable_desktop_composition = no
rdp_enable_menu_animations = no
Expand Down
15 changes: 15 additions & 0 deletions lib/cuckoo/common/guac_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""Utilities for Guacamole protocol handling and activity detection."""

import re

# Matches the opcode of a Guacamole instruction at message start or after ';'.
# Guacamole wire format: <len>.<value>,<len>.<value>...;
# Example: 5.mouse,3.100,3.200,1.0;
_ACTIVITY_RE = re.compile(r"(?:^|;)\d+\.(key|mouse),")


def is_user_activity(message: str) -> bool:
"""Return ``True`` if *message* contains a mouse or keyboard instruction."""
if not message or not isinstance(message, str):
return False
return _ACTIVITY_RE.search(message) is not None
Loading
Loading