MaimMim Man in the middle minetest interceptor
- prototype - between client and server, allow to capture all exchanges and potentially change them - created to capture server maps in laby - first test get only MapBlock, support version serialization version 28 - prepartion for 29 with zstd but untested. # Conflicts: # fetch_dependencies.sh
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package org.artisanlogiciel.games.minetest.net;
|
||||
|
||||
import org.artisanlogiciel.games.minetest.core.PacketException;
|
||||
import org.artisanlogiciel.games.minetest.core.Serialize;
|
||||
|
||||
public class BufferedPacket {
|
||||
|
||||
public static int BASE_HEADER_SIZE = 7;
|
||||
|
||||
// Data of the packet, including headers
|
||||
byte[] m_data;
|
||||
|
||||
BufferedPacket(byte[] data)
|
||||
{
|
||||
m_data = data;
|
||||
}
|
||||
|
||||
int getSeqNum()
|
||||
throws PacketException
|
||||
{
|
||||
return Serialize.readU16(m_data, BASE_HEADER_SIZE + 1, size());
|
||||
}
|
||||
|
||||
int size()
|
||||
{
|
||||
return m_data.length;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user