From 8c4abba69d360e543001cd199e4b44edfe99f2be Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 31 Jan 2025 15:25:40 +0100 Subject: [PATCH] remove unused scripts --- matrix/matrix-client.py | 16 --------------- matrix/matrix-client.sh | 45 ----------------------------------------- 2 files changed, 61 deletions(-) delete mode 100755 matrix/matrix-client.py delete mode 100755 matrix/matrix-client.sh diff --git a/matrix/matrix-client.py b/matrix/matrix-client.py deleted file mode 100755 index f4d0097..0000000 --- a/matrix/matrix-client.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python3 - -import sys -import urllib -from mautrix.client import ClientAPI - -matrix_server="ungleich.matrix.ungleich.cloud" -matrix_user="@nico:ungleich.ch" -matrix_password=sys.argv[1] - -client = ClientAPI(matrixuser, - base_url=f"https://{matrix_server}" - token="syt_123_456") - - -await print(client.whoami()) diff --git a/matrix/matrix-client.sh b/matrix/matrix-client.sh deleted file mode 100755 index af5f3ae..0000000 --- a/matrix/matrix-client.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -matrix_server=$1; shift -# matrix_user=$1; shift -# matrix_user=$(echo $matrix_user | sed 's/^@/\@/') -# matrix_password=$1; shift - - -# Login -# http -j -p "HBhb" \ -# https://${matrix_server}/_matrix/client/v3/login \ -# identifier:="{ \"type\":\"m.id.user\", \"user\":\"$matrix_user\" }" \ -# device_id=nicoshell initial_device_display_name="matrixclientsh" \ -# type=m.login.password \ -# password=$matrix_password - -# { -# "access_token": "..", -# "device_id": "nicoshell", -# "home_server": "ungleich.ch", -# "user_id": "@nico:ungleich.ch", -# "well_known": { -# "m.homeserver": { -# "base_url": "https://ungleich.matrix.ungleich.cloud/" -# } -# } -# } - -key_url=https://${matrix_server}/_matrix/client/v3/room_keys/keys -token=$1; shift -http -j -p "HBhb" $key_url \ - identifier:="{ \"type\":\"m.id.user\", \"user\":\"$matrix_user\" }" \ - device_id=nicoshell initial_device_display_name="matrixclientsh" \ - type=m.login.password \ - password=$matrix_password - - -# get device keys + master_keys of Nico -http https://ungleich.matrix.ungleich.cloud/_matrix/client/v3/keys/query access_token=="$token" device_keys:='{ "@nico:ungleich.ch": [] }' - -# Get messages -room_id="!..:..." -http 'https://ungleich.matrix.ungleich.cloud/_matrix/client/v3/rooms/!pkPjzozYKUNEbcZKKA:unchat.cat/messages' access_token=="$token" - -# Get room keys