Skip to content

Instantly share code, notes, and snippets.

View clarence112's full-sized avatar

clarence112 clarence112

  • Indianapolis, IN
View GitHub Profile
import socket
import struct
import json
def unpack_varint(s):
d = 0
for i in range(5):
b = ord(s.recv(1))
d |= (b & 0x7F) << 7*i
if not b & 0x80: