Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import binascii, struct
from PIL import Image
f = open("mousestuff.pcap", "rb")
im ="RGB", (1024, 1024))
while True:
data =
if len(data) != 0x10:
ts, us, sz1, sz2 = struct.unpack("<IIII", data)
packet =
data = packet[64:]
if data[0:2] == "\x02\xf1":
x, y, z, p = struct.unpack("<HHHB", data[2:9])
im.putpixel((x / 8, y / 8), (z / 256, p * 16, 0))"test.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment