diff options
Diffstat (limited to 'desktop')
| -rwxr-xr-x | desktop/island/obs-auth.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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. <danix@danix.xyz> +# +# 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 |
