#!/usr/bin/env python3 from argparse import ArgumentParser, FileType from hashlib import md5 from requests import get from struct import pack from urllib.parse import urlencode # char magic[8] # u32 game_id # u32 console_id # u32 forum_topic_id # u32 flags # u32 is_final # u32 achievement_count # u32 leaderboard_count # u32 reserved1[3] # u8 hash[16] # char title[32] # char publisher[32] # char developer[32] # char genre[32] # char release_date[32] # char console_name[32] HEADER_STRUCT = "<8sIIIIIII12x16s32s32s32s32s32s32s" # 0x100 bytes # u32 id # u32 points # u32 flags # u32 creation_time # u32 modified_time # u32 description_len # u32 mem_addr_len # u32 completion_time # u32 reserved1[8] # char title[32] # char author[32] # char reserved2[128] # char description[256] # char mem_addr[512] ACHIEVEMENT_STRUCT = "