From a01bcfdd29496fc6047f5f710bd5ef81b9841536 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 17 Oct 2026 12:15:58 +0200 Subject: island: obs-websocket auth helper --- desktop/island/obs-auth.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 desktop/island/obs-auth.sh (limited to 'desktop/island/obs-auth.sh') diff --git a/desktop/island/obs-auth.sh b/desktop/island/obs-auth.sh new file mode 100755 index 0000000..8be20f0 --- /dev/null +++ b/desktop/island/obs-auth.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Copyright (C) 2026 Danilo M. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# obs-websocket v5 authentication, which QML cannot compute: it has no +# SHA256. stdin is two lines, password+salt then challenge, so neither +# reaches a command line. stdout is +# base64(sha256(base64(sha256(password + salt)) + challenge)) + +read -r ps || exit 1 +read -r ch || exit 1 +secret=$(printf %s "$ps" | openssl dgst -sha256 -binary | base64) +printf %s "$secret$ch" | openssl dgst -sha256 -binary | base64 -- cgit v1.2.3