0

I have a binary file that I have read into a text file. This contains two JSON arrays that both have data that I wish to take out.

I have tried cleaning the file, I have attempted to decode via utf-8 and ascii and get errors several times.

The best I have so far is to read into a text file as a string from the binary file and then I figured I could regex the json arrays out?

This is all I have so far

try:
    with open('TestReplays/replay_2023-04-14_21-28-07.rpl3', 'rb') as f:
        file = f.read()
        text = str(file)[2:-1]
        print(text)
except Exception as e:
    print(e)

I've cut the below down as the actual file itself is over 7million characters long.

ESAV\x00\x00\x00\x03\x00\x1f\x8eB\x90\nQRmodd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00rply\x00\x00\x00\x00\x00\x00\x089\x00\x00\x00\x00{"game":{"GameMode":"1","IsNetworkMode":"1","NbMaxPlayer":"2","NbPlayersAndIA":"2","AllowObservers":"1","ObserverDelay":"120","Seed":"1322943104","Private":"0","ServerName":"Lynchie vs Tiro Game 2","WithHost":"1","ServerProtocol":"1.0","TimeLeft":"0","Version":"94077","GameState":"0","NeedPassword":"0","NbIA":"0","TickRate":"10","UniqueSessionId":"1ae482a7:5597c6e6:45d98090:3ee8f755","ModList":"","ModTagList":"","ServerTag":"","GameType":"1","Map":"_2x3_BlackForestStorm","InitMoney":"1500","TimeLimit":"2400","ScoreLimit":"2000","DeploymentMode":"1","CombatRule":"2","IncomeRate":"3","WarmupCountdown":"10","DeploiementTimeMax":"180","DebriefingTimeMax":"180","LoadingTimeMax":"1200","NbMinPlayer":"10","DeltaMaxTeamSize":"10","MaxTeamSize":"10","PhaseADuration":"-1","PhaseBDuration":"-1","MapSelection":"0","MapRotationType":"0","CoopVsAI":"0","InverseSpawnPoints":"0","DivisionTagFilter":"DEFAULT","AutoFillAI":"0","DeltaTimeCheckAutoFillAI":"60"},"player_1":{"PlayerUserId":"684602","PlayerIALevel":"-1","PlayerObserver":"0","PlayerAlliance":"1","PlayerReady":"1","PlayerElo":"1600.75803065","PlayerLevel":"9","PlayerName":"Lynchie","PlayerTeamName":"","PlayerAvatar":"VirtualData/SteamGamerPicture/76561198043635455","PlayerDeckName":"","PlayerDeckContent":"FBE40YlpKTHojDCpywASZwLQGQAQwzHwLgAQLAALRTEQGwAQGwAIIgAIyAAIhwLIuwAJ8gAQtQdQvAARwwAQJgAQJgAQxTEQGwAWQQ9ovwAQ1w9wFAAIDQALlQAK/zHoiTEIDwAIEAAQLgAJLjEBAA==","PlayerSkinIndexUsed":"","PlayerIsAIAutoFilled":"0","PlayerScoreLimit":"2000","PlayerIncomeRate":"1"},"player_2":{"PlayerUserId":"323931","PlayerIALevel":"-1","PlayerObserver":"0","PlayerAlliance":"0","PlayerReady":"0","PlayerElo":"1559.63376877","PlayerLevel":"10","PlayerName":"Tiro","PlayerTeamName":"","PlayerAvatar":"VirtualData/SteamGamerPicture/76561198065998403","PlayerDeckName":"","PlayerDeckContent":"FBF6aIS1tYAFtYAGLwAKKYAEeAAEfUVIfYAIfYAEgoAKKUVGLUVKL4AEwYAEwYAGMoAIfYAIqsVKK8RKK8REq0VqUkRIfYAKIoAKIoAKJwAKUQAGJMRKLA9UegAEeIAEfgAGKsVGMQAKUQAAgA==","PlayerSkinIndexUsed":"","PlayerIsAIAutoFilled":"0","PlayerScoreLimit":"2000","PlayerIncomeRate":"1"},"ingamePlayerId":1}star\x00\x00\x00\x00\x00\x00\x00"\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x003\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff3\x00\x00\x00\xff\xff\xff\xff\xaf\x04\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff3\x00\x00\x00\xff\xff\xff\xff\xae\x04\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff3\x00\x00\x00\xff\xff\xff\xff\xad\x04\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff3\x00\x00\x00\xff\xff\xff\xff\xac\x04\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff3\x00\x00\x00\xff\xff\xff\xff\xab\x04\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x00\x00\xff\xff\xff\xff3\x00\x00\x004\x00\x00\x00\xff\xff\xff\xff\x01\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00x\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00j\x00\x02\x1c\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\xcd\xcc\xcc>\r\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x1c\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\xcd\xcc\xcc>\r\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00x\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00j\x00\x02\x1d\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\x00\x00\x000\x00\x00\x00\x00\x00\x00\x00\xcd\xcc\xcc>\r\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x1d\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\x00\x00\x000\x00\x00\x00\x00\x00\x00\x00\xcd\xcc\xcc>\r\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x05\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x06\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x08\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\t\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\t\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\n\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\r\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\'\x00\x00\x00\x00\r\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x19\x00(\x00\x00\x00\x00\x1c\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\r\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\r\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\'\x00\x00\x00\x00\x0e\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x19\x00(\x00\x00\x00\x00\x1d\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x0f\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x10\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x11\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x12\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x13\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x14\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x15\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x16\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x17\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x19\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1a\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1b\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1c\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1d\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x1f\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00 \x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00!\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00"\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00"\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00#\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00#\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00#\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00#\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00$\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00$\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00$\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00$\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00%\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00%\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00%\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00%\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00&\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00&\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00&\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00&\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\'\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\'\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00(\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00)\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00)\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00)\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00)\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00*\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00*\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00*\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00*\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00+\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00+\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00,\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00-\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00-\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00.\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00.\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00.\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00.\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00/\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00/\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00/\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00/\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x000\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x000\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x000\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x000\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x001\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x001\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x002\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x002\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x003\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x003\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x004\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x004\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x004\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x004\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x005\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x005\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x005\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x005\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x006\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x006\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x006\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x006\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x007\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x007\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x007\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x007\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x008\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x008\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x008\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x008\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x009\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x009\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x009\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x009\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00:\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00:\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00:\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00:\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00;\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00;\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00?\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00?\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00?x0c\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00A\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00A\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00H\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00endt\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00H\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00star\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00I\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00I\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pact\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\{"result":{"Duration":"1247","Victory":"6"}}

The only other thing I can think of is using an index to get "game" and "results" and then forward search until I get the next bracket that closes off the JSON, or is that too complex?

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Lynchie
  • 1,077
  • 2
  • 20
  • 36
  • Do you know how the file was originally encoded? – ShadowCrafter_01 Jun 08 '23 at 09:19
  • @ShadowCrafter_01 I'm afraid I don't it is from a game and is there bespoke engine that creates the files. the file is an RPL3 file type. – Lynchie Jun 08 '23 at 09:23
  • Maybe you can try determining the enoding using [this](https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text) method – ShadowCrafter_01 Jun 08 '23 at 09:26
  • @ShadowCrafter_01 - Apparently its Windows-1254 and in Turkish (0.66 confidence) this was made by a french development studio so that is interesting to say the least. – Lynchie Jun 08 '23 at 09:34
  • The file is probably not formed by the encoding of a string. It's more likely to be a structured object in which case you'll only be able to extract what you want if you know its internal format. EDIT: Just found your earlier (now deleted) question about this. It's definitely structured. You'll need to do some research to discover how RPL3 files are organised internally – DarkKnight Jun 08 '23 at 09:38
  • That is interesting indeed but you could try and decode it using this format and see what happens – ShadowCrafter_01 Jun 08 '23 at 09:41
  • @DarkKnight unfortunately its a bespoke engine for the dev and they aren't exactly cooperative :) – Lynchie Jun 08 '23 at 09:42
  • @Lynchie From which game this file come from ? – Jay Jun 08 '23 at 10:17

1 Answers1

1

It's certainly not the fastest or most efficient way of doing this, but for the part of the file you've given it works very well!

def parse_file(file):
    json_return = []
    bracket_indentation = 0
    first_bracket = 0
    for idx, c in enumerate(file):
        if c == ord("{"):
            if bracket_indentation == 0:
                first_bracket = idx
            bracket_indentation += 1

        elif c == ord("}"):
            bracket_indentation -= 1
            if bracket_indentation == 0:
                try:
                    json_return.append(eval(file[first_bracket : idx + 1]))
                except Exception as e:
                    print(e)
    return json_return


try:
    with open("TestReplays/replay_2023-04-14_21-28-07.rpl3", "rb") as f:
        file = f.read()
        print(parse_file(file))
except Exception as e:
    print(e)

And with your string i got :

[{'game': {'GameMode': '1', 'IsNetworkMode': '1', 'NbMaxPlayer': '2', 'NbPlayersAndIA': '2', 'AllowObservers': '1', 'ObserverDelay': '120', 'Seed': '1322943104', 'Private': '0', 'ServerName': 'Lynchie vs Tiro Game 2', 'WithHost': '1', 'ServerProtocol': '1.0', 'TimeLeft': '0', 'Version': '94077', 'GameState': '0', 'NeedPassword': '0', 'NbIA': '0', 'TickRate': '10', 'UniqueSessionId': '1ae482a7:5597c6e6:45d98090:3ee8f755', 'ModList': '', 'ModTagList': '', 'ServerTag': '', 'GameType': '1', 'Map': '_2x3_BlackForestStorm', 'InitMoney': '1500', 'TimeLimit': '2400', 'ScoreLimit': '2000', 'DeploymentMode': '1', 'CombatRule': '2', 'IncomeRate': '3', 'WarmupCountdown': '10', 'DeploiementTimeMax': '180', 'DebriefingTimeMax': '180', 'LoadingTimeMax': '1200', 'NbMinPlayer': '10', 'DeltaMaxTeamSize': '10', 'MaxTeamSize': '10', 'PhaseADuration': '-1', 'PhaseBDuration': '-1', 'MapSelection': '0', 'MapRotationType': '0', 'CoopVsAI': '0', 'InverseSpawnPoints': '0', 'DivisionTagFilter': 'DEFAULT', 'AutoFillAI': '0', 'DeltaTimeCheckAutoFillAI': '60'}, 'player_1': {'PlayerUserId': '684602', 'PlayerIALevel': '-1', 'PlayerObserver': '0', 'PlayerAlliance': '1', 'PlayerReady': '1', 'PlayerElo': '1600.75803065', 'PlayerLevel': '9', 'PlayerName': 'Lynchie', 'PlayerTeamName': '', 'PlayerAvatar': 'VirtualData/SteamGamerPicture/76561198043635455', 'PlayerDeckName': '', 'PlayerDeckContent': 'FBE40YlpKTHojDCpywASZwLQGQAQwzHwLgAQLAALRTEQGwAQGwAIIgAIyAAIhwLIuwAJ8gAQtQdQvAARwwAQJgAQJgAQxTEQGwAWQQ9ovwAQ1w9wFAAIDQALlQAK/zHoiTEIDwAIEAAQLgAJLjEBAA==', 'PlayerSkinIndexUsed': '', 'PlayerIsAIAutoFilled': '0', 'PlayerScoreLimit': '2000', 'PlayerIncomeRate': '1'}, 'player_2': {'PlayerUserId': '323931', 'PlayerIALevel': '-1', 'PlayerObserver': '0', 'PlayerAlliance': '0', 'PlayerReady': 
'0', 'PlayerElo': '1559.63376877', 'PlayerLevel': '10', 'PlayerName': 'Tiro', 'PlayerTeamName': '', 'PlayerAvatar': 'VirtualData/SteamGamerPicture/76561198065998403', 'PlayerDeckName': '', 'PlayerDeckContent': 'FBF6aIS1tYAFtYAGLwAKKYAEeAAEfUVIfYAIfYAEgoAKKUVGLUVKL4AEwYAEwYAGMoAIfYAIqsVKK8RKK8REq0VqUkRIfYAKIoAKIoAKJwAKUQAGJMRKLA9UegAEeIAEfgAGKsVGMQAKUQAAgA==', 'PlayerSkinIndexUsed': '', 'PlayerIsAIAutoFilled': '0', 'PlayerScoreLimit': '2000', 'PlayerIncomeRate': '1'}, 'ingamePlayerId': 1}, {'result': {'Duration': '1247', 'Victory': '6'}}]

Update

After some search, and test directly on som .rpl3, So from what I see, first json always start 10 bytes after "rply" so I start to parse from here to the last '}', and last json always end the file so I reverse the file to parse from first '}' to last '{', I come with this piece of code :

def parse_first_json(file: bytes) -> dict[str, str]:
    rply_idx = file.find(b"rply")
    json_start_idx = rply_idx + 4 + 8 + 4

    first_bracket = 0
    bracket_indentation = 0
    for idx, c in enumerate(file[json_start_idx:]):
        if c == ord("{"):
            if bracket_indentation == 0:
                first_bracket = idx + json_start_idx
            bracket_indentation += 1
        elif c == ord("}"):
            bracket_indentation -= 1
            if bracket_indentation == 0:
                return eval(file[first_bracket : idx + json_start_idx + 1])
    raise Exception("Can't find first Json")


def parse_last_json(file: bytes) -> dict[str, str]:
    rev_file = file[::-1]
    last_bracket = 0
    bracket_indentation = 0

    for idx, c in enumerate(rev_file):
        if c == ord("}"):
            if bracket_indentation == 0:
                last_bracket = idx
            bracket_indentation += 1
        elif c == ord("{"):
            bracket_indentation -= 1
            if bracket_indentation == 0:
                return eval(rev_file[last_bracket : idx + 1][::-1])

    raise Exception("Can't find last Json")


def parse_file(file: bytes) -> tuple[dict[str, str], dict[str, str]]:
    first_json = parse_first_json(file)
    second_json = parse_last_json(file)

    return first_json, second_json


try:
    with open("C:/Users/Player/Downloads/replay_2017-04-23_22-29-04.rpl3", "rb") as f:
        file = f.read()
        print(parse_file(file))
except Exception as e:
    print(e)
Jay
  • 305
  • 2
  • 11
  • Tried running it against the full file and it just returns the open and closing brackets. Hmmm – Lynchie Jun 08 '23 at 09:40
  • @Lynchie Sorry, as the file is opened in binary mode, I forgot to pass the '{' and '}' in ord, I've fixed it! – Jay Jun 08 '23 at 09:43
  • I got "name 't' is not defined" and then the closed brackets again. Appreciate your help here. I'm not a python developer, this is all a learning curve for me, sorry. – Lynchie Jun 08 '23 at 09:44
  • @Lynchie Just a typo, I used your part of file as global value so during test, I just put in a t value, so now it's should work ! – Jay Jun 08 '23 at 09:46
  • @Jay There is a binary preamble leading to the JSON data in this file. You search for *ord('{')* and assume that that's the start of the JSON. It may not be! – DarkKnight Jun 08 '23 at 09:52
  • @DarkKnight With an entire file, I could determine what value gives me the start of the jsons, but with just this line, I have no idea if it's feasible. – Jay Jun 08 '23 at 09:56
  • @Lynchie I've tried a few modifications, can you tell me if this time you get a better result? – Jay Jun 08 '23 at 11:49