Skip to main content

Modify your offline megolm key backups from shell

Project description

megolm_filter.py

Modify your offline megolm key backups from a shell.

The main use of megolm_filter is to filter what keys you'd like to share with another user. Let's say you have a 1:1 chat, and the other user lost all their keys and you need to give them access without giving access to all of your rooms.

There is currently no Element-based support for this, so this script can help in the meantime.

Install

pip install megolm-filter

Command Line Interface

usage: megolm_filter [-h] [-o OUTPUT] [--plain] [file] [room_id]

Operate on megolm session backups.

positional arguments:
  file                 megolm session data
  room_id              Room id to filter (optional)

options:
  -h, --help           show this help message and exit
  -o, --output OUTPUT  Output to file
  -p, --plain          Returns the plain unencrypted content

You can filter your keys fairly easily running:

megolm_filter element-keys.txt '!room1:matrix.org' '!room2:matrix.org' ...

Copyright (C) 2019 Aleksa Sarai cyphar@cyphar.com
Copyright (C) 2025 Lain Iwakura lain@serialexperiments.club

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

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.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

megolm_filter-0.2.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

megolm_filter-0.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file megolm_filter-0.2.tar.gz.

File metadata

  • Download URL: megolm_filter-0.2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for megolm_filter-0.2.tar.gz
Algorithm Hash digest
SHA256 11c3cb3a8a03b83b9ae983a67ab30d7290fb743d4260e72dc7788716e1011c40
MD5 5cc136f40d310dc60647a6b0fb310577
BLAKE2b-256 7b275eff2772426bdcee2f3c59dabc2e39f34ad799e48279ca4f398f915e6b43

See more details on using hashes here.

File details

Details for the file megolm_filter-0.2-py3-none-any.whl.

File metadata

  • Download URL: megolm_filter-0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for megolm_filter-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dedc8116f8015ae371f293d0f39ca482ffba7d51db79861287e0423da7e42665
MD5 7a12da9c915e5461f07343be90ba0665
BLAKE2b-256 cd90e101d69f2e5a8cb0a8f03c043e877fcff44a8ffcecd4df62147c2cf23d5d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page