Reading the MUX dbm database with Python

  • Hi all! I've been kicking around methods to read MUX DB info for web integration using python. I'm about to access the file using the dbm module, but the actual DB was made using encryption - which I can't seem to find any reference too in the source. I built a bot that queries the DB and turns it into API JSON response - but I'd rather access the DB directly if I can, and cut out the middleman.

    It's been many moons since I've had to work in C so I'm pretty rusty. I figured I might find the encryption information in netmux source, but from what I can tell it comes pre-compiled.

    Does anyone know where I can find the encryption info, or who I should talk to about it?

    Thanks, everyone!

  • I'm honestly not aware of the db writing in encrypted mode of any form, it should be a method of binary and/or compressed format.

    If it's being compressed it's likely in ZLIB format of some sort.

    Otherwise the binary structure can be found in db_rw.cpp.

    Be careful with the open db as well, lots of mu* engines don't like having an external application actively reading the data while it's open.

    I know that Brazil writes data in UTF8 and he has his own hash routine that does the hash tables in svdhash.cpp which is likely his indexer tree.

    Anyway, all the reading of a db flatfile should be in db_rw.cpp, the hash in svdhash.cpp, and any object/attribute content handling in db.cpp and attrcache.cpp.

    MUX's current github is at:

    Those will be the files of interest. Good luck.

  • I suggested looking at the Omega code in TinyMux’s directories too as it has a way to pull details on specific objects by dbref.

Log in to reply