import struct import sys from collections import Counter buf = open(sys.argv[1], "rb").read() print("len", len(buf)) counts = Counter() for off in range(0, len(buf) - 7, 8): q = struct.unpack_from(" libphp=%#x" % (name, (top_q - off) & 0xFFFFFFFFFFFFFFFF))