Query Mechanism
This wiki is using an old backup from 2020
Some information may be old/missing
The backbone of packets
Byte | PHP | Hexadecimal | Description |
---|---|---|---|
0-3 | "VCMP" | 56 43 4D 50 | The magic of the packet. |
4 | chr('192'); | C0 | The first byte in the server's IP address. |
5 | chr('168'); | A8 | The second byte in the server's IP address. |
6 | chr('200'); | C8 | The third byte in the server's IP address. |
7 | chr('103'); | 67 | The fourth byte in the server's IP address. |
8 | chr('5192' & 0xFF); | 48 | The first byte of the port. |
9 | chr('5192' >> 8 & 0xFF); | 14 | The second byte of the port. |
10 | "i" | 69 | The opcode that you would like to query. |
Opcodes
The packet table
Packet 'opcode' | Description |
---|---|
i | Server information |
p | Ping |
c | Client list |
Recieving the packets
The header of the query response will be the exact same thing that the client sent, except that the header sent by the server will always be MP04, and not VCMP. This acts as a compatibility check due to the differing protocols.