This repository has been archived on 2020-03-29. You can view files and clone it, but cannot push or open issues or pull requests.
sampy_archive/sampy/handlers/unknownHandler.py

16 lines
426 B
Python

import struct
index = 0
def handle(client: "Client", data: bytes) -> bytes:
global index
data = LOOKUP[index]
client.send_immediate(data[:3])
index = (index + 1) % 2
return data[3:]
LOOKUP = [
bytes([int(x,16) for x in "e3 00 00 00 00 42 98 0c 11 33 30 45 39 33 39 33 33 36 39 42 35 36 38 43 32 00".split(" ")]),
bytes([int(x,16) for x in "e3 01 00 00 80 42 68 22 c0 a8 02 85 dc f8 01 00 e0 57 00 00".split(" ")])
]