PS4 JSON-2-SHA1 Python Script for Game PKG Files by Hosamn

Following the JSON Format details, PS4 PKGs via SEN and the JSON Entitlement Grabber Add-on this weekend developer hosamn made available a PS4-JSON-2-SHA1 Python Script for use in checking the hashes of PlayStation 4 game packages. :geek:

Download: / GIT

This comes proceeding the PS4 PKG Integrity Checker for PS4 packages and the PS4 Title Update Checker, and from the, to quote: PS4-json-2-sha1

Generate SHA1 integrity check files for PS4 game PKG files from official json data. eg: JSON File:


Resulting files can be used to check PKG files with any hash checker like HashCheck Shell Extension.


import json
import os

# Change the working directory to the py file dir:

# Get a list of current dir json files:
for root, dirs, files in os.walk("."):
    # print(len(files), files)
    json_files = [f for f in files if f.endswith('.json')]
    break  # break after reporting current dir files and don't go deeper

# print(json_files)

for json_file in json_files:

    out_file_name = json_file.split('.')[0]+'.sha1'

    with open(json_file) as opf:
        data = json.loads(

    for i in range(data['numberOfSplitFiles']):
        piece_name = data['pieces'][i]['url'].split('/')[-1]
        piece_hash = data['pieces'][i]['hashValue']
        file_line = piece_hash + ' *' + piece_name
        with open(out_file_name, 'a') as outt: