5 lines
139 B
Python
5 lines
139 B
Python
packet=bytes([0,3])+b"cat"
|
|
length=int.from_bytes(packet[:2],"big")
|
|
assert length<=100 and len(packet)-2==length
|
|
print(packet[2:].decode())
|