sync: auto-sync from HOWARD-HOME at 2026-06-21 19:32:30

Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-21 19:32:30
This commit is contained in:
2026-06-21 19:32:57 -07:00
parent 5b44a3e619
commit f4296f2d9e
4 changed files with 103 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ import urllib.error
import urllib.request
from pathlib import Path
from typing import Any, Optional
from urllib.parse import quote
try:
import httpx # type: ignore
@@ -234,6 +235,42 @@ class ScreenConnectClient:
"""Call any RESTful API Manager method directly (power use / probing)."""
return self.call(method, body, http_method=http_method)
# ======================================================================
# INSTALLER BUILDER (no API call — constructs the parameterized access
# installer URL so a device self-tags into the right Company/Site/Tag).
# ======================================================================
def build_installer_url(
self,
platform: str = "msi",
name: Optional[str] = None,
company: Optional[str] = None,
site: Optional[str] = None,
tag: Optional[str] = None,
extra_props: Optional[list] = None,
) -> str:
"""Build a parameterized ScreenConnect ACCESS installer URL.
VERIFIED LIVE 2026-06-22: the cloud instance serves a pre-keyed installer at
/Bin/ScreenConnect.ClientSetup.<platform>?e=Access&y=Guest ; append `t=`
(session name) and repeated `c=` for the custom properties (order =
CP1=Company, CP2=Site, CP3=Tag, ... up to 8). The installed agent self-tags
with these, so it lands under the matching session-group filters.
platform: msi | exe | pkg | deb | rpm | sh
"""
props = [company or "", site or "", tag or ""]
if extra_props:
props.extend(extra_props)
params = ["e=Access", "y=Guest"]
if name:
params.append("t=" + quote(name, safe=""))
for p in props:
params.append("c=" + quote(p, safe=""))
return (
f"{self.base_url}/Bin/ScreenConnect.ClientSetup.{platform}?"
+ "&".join(params)
)
def main() -> int:
"""Minimal self-check: load secret (no network call)."""