Sending a NuVotifier vote with nothing but the Python standard library
Minecraft server lists reward players for voting: the list sends a small message to the game server, and a plugin like VotingPlugin hands out the reward. The protocol behind this is Votifier , today mostly in its fork NuVotifier . If you run a server, the most common question is "is my Votifier actually reachable, and is my token right?". So we wrote a tiny test client, and it turned out to be a…
Minecraft server lists reward players for voting by sending a small message to the game server. The protocol behind this is Votifier, today mostly in its fork NuVotifier. To test if your Votifier is reachable and your token is correct, a tiny test client was written using only Python's standard library.
When opening a TCP connection to the Votifier port (default 8192), the server speaks first with the greeting "VOTIFIER 2" followed by a challenge, which ties the vote to this connection to prevent replay attacks. The test client reads this greeting and prepares the signed message. This message is a JSON object containing the service name, username, IP address, timestamp, and challenge, serialized and then signed with HMAC-SHA256 using the server's token.
The message is framed with two big-endian 16-bit integers: the magic number 0x733A and the length of the message. This packet is sent to the server. The server responds with a JSON line indicating either "ok" or "error" with a specific cause and error message. The error message is crucial for a test tool to show, as it helps identify common setup mistakes, such as using the wrong token.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.