import sys, struct #See PORTING def js(a1,a2,a3,base): return '''{ "byte0": 0x%02x, "byte1": 0x%02x, "byte2": 0x%02x, "version": "$VERSION$", "dyld_shared_cache_offset": 0x%08x }, '''% ( a1&0xff, a2&0xff, a3&0xff, a1- base ) cache = file(sys.argv[1],'rb').read() a1,a2,a3 = struct.unpack('