Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion for addition: gencerthash.py #18

Open
johnnybubonic opened this issue Nov 17, 2017 · 1 comment
Open

Suggestion for addition: gencerthash.py #18

johnnybubonic opened this issue Nov 17, 2017 · 1 comment

Comments

@johnnybubonic
Copy link

Hello.

I wrote a python script for generating the certificate fingerprint hash client-side.

You can view it here: upstream/authoritative source, GitHub mirror

It:

  • Requires Python 3 and the pyOpenSSL module (at the very least/for now) (user-friendly information is printed if it does not find required modules etc.)
  • If an exported certificate file (.p12) is specified, it does not require Mumble to even be installed on the machine.
  • Supports *BSD, GNU/Linux, Windows, MacOS/OSX
  • Tries very hard to find the certificate Mumble uses - there shouldn't be a need to specify/use an exported certificate, but it is supported.
  • Supports password-protected certificates, even though Mumble currently does not. This is there as "future-proofing" should Mumble ever support this in the future.

It is useful for Murmur administrators that run a locked-down Murmur instance (such as myself) that refuse joining for unregistered users (ergo users cannot self-register). I'm still working on other tools that can use this fingerprint hash that do it The Right Way (Ice/GRPC for 1.3.x), but for now I've been simply just manually creating the user in the DB and restarting Murmur as needed.

@johnnybubonic
Copy link
Author

johnnybubonic commented Nov 17, 2017

p.s. For those curious how I add a user registration to Mumble myself, I do this via something like this (note that editing the sqlite3 like this is DANGEROUS if you have self-registration enabled/allowed, and it's a very flawed/quick demonstration. Education purposes only.):

#!/bin/bash

NOW=$(date '+%Y-%m-%d %H:%M:%S')
MURMURDB='/var/lib/murmur/murmur.sqlite'
USER='username'
FPR='fingerprinthash'
SRVR_ID='1'
LAST_CHAN='0'
LST_UID=$(sqlite3 ${MURMURDB} "SELECT user_id FROM users ORDER BY user_id DESC LIMIT 1")
NXT_UID=$(($LST_UID+1))

sqlite3 ${MURMURDB} \
    "INSERT INTO users (server_id,user_id,name,pw,lastchannel,texture,last_active) \
     VALUES ('${SRVR_ID}', '${NXT_UID}','${USER}','','${LAST_CHAN}','','${NOW}')"
sqlite3 ${MURMURDB} \
    "INSERT INTO user_info (server_id,user_id,key,value) \
     VALUES ('${SRVR_ID}','${NXT_UID}','3','${FPR}')"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant