MU Soapbox

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Muxify
    • Mustard

    Reading the MUX dbm database with Python

    MU Code
    3
    3
    491
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Kumakun
      Kumakun last edited by

      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!

      No trees were destroyed in the sending of this message, however, a significant number of electrons were terribly inconvenienced.

      1 Reply Last reply Reply Quote 0
      • Ashen-Shugar
        Ashen-Shugar last edited by Ashen-Shugar

        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: https://github.com/brazilofmux/tinymux

        Those will be the files of interest. Good luck.

        1 Reply Last reply Reply Quote 1
        • Thenomain
          Thenomain last edited by

          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.

          “If you wish to make an apple pie from scratch, you must first invent the universe.”
          ― Carl Sagan, Cosmos

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post