Proceeding the PS5 XML Updaters, first PS5 PKGs, PS5UPDATE.PUP Unpacker via BLSUnpack, PS5 Firmware Checker, PS5 Scene Game Dumps and PS5 Error Codes today 1jtp8sobiu shared a PS5 PKG project on Github that includes a PS5 XML Update Checker Python script alongside some PS5 XML JSON (JavaScript Object Notation file format) update links for those interested in PlayStation 5 research documentation.
From XML_HASH.json:
Download: ps5_xml_update_checker.py / ps5-pkg-master.zip / GIT
From PS5_XML.tsv:
Code:
{"PPSA01280_00": "1781eb161bae5be95af7238c1343c695eb6879278944b63f137033fb1165359a", "PPSA01288_00": "60c189d697266893dd607b38a7899c40891c7ddc1136306438d6b12577c99468", "PPSA01289_00": "0be525707717e8a32f7cbff809b988b1f18d420067b705c376ff6d761367120c", "PPSA01291_00": "92de317c9e23715a828db9d5c8742f5442f90c72ea01b8c7cffc7805ef7e93c7", "PPSA01325_00": "36595e8bceece06d374df954bfaafb2c687257da73f648c713b45699399c7388", "PPSA01343_00": "401bf3212e7c1ee0392c0b8984a9ef021c96733c0c0a76df9dba4b21ace33fb8", "PPSA01418_00": "c2057a69bb6587b0e6755f3a4d87f8aca92006000ae717b37552e95f88aef120", "PPSA01432_00": "3afbe74febf4678873712ddb66ef416b781fcf0fb357a738feea364e2bf755c8", "PPSA01462_00": "a3f27309b004e4a1b781f19a674111eba796017b9620e098708b298ef64ac630", "PPSA01489_00": "06ae9e45603539678147cefc63216e591cc8fdd770fd75b66c93a2d02cfaedf4", "PPSA01504_00": "63c8965aaa86c2b8c957cd9e1db33363cd9350c2ad02fc44d842b882d8029311", "PPSA01508_00": "95a20c13daba2418fd1879c1f5048ed82ccc0e7518472603a80634675b6346ec", "PPSA01735_00": "184ae659e9f2c2783d687221118b9411dd0eefe05fda4f087ae6f8775830ed42", "PPSA01922_00": "e391a7fb912bf5314c30cd61db3bf668f61a01046fdb4868d52ada9c0d04b81c", "PPSA01948_00": "04cd1785af0fd3f0615befc1d4be0409ce84f1bf2760e96613e9d8189718ec97", "PPSA02097_00": "d2f874895b276e43c96dc5dffe06d9e12d663e6ca015c2885c3f3994fd1fbab7", "PPSA02190_00": "38bff75087bfb0f8b3dce7572f9c463fa069f8621af6acf78799631c393c0e99", "PPSA02323_00": "c505f8d1b65f9e19a04eb62446f962f7e5b5ffd5eaf16b5b92c3152fdd684f2d", "PPSA01292_00": "f78a4f042090a16cdec7e5eea27032f90be76728a214995808494fba46b1fb50", "PPSA01397_00": "11a3dc6213af0f9ba056f554dfead07ee6f332db64737850b17498b4cfc5bb22", "PPSA01419_00": "737a070813cdbb1d10a35638676649dbc588f3dc29ed0066b701e1cb5828604f", "PPSA02048_00": "abd71f92f3e892cd4a76c163a3f312ab0f92132d4a78e629645ba3c4f0e10947", "PPSA02095_00": "c7ee82660bf76f931adc8e1627aea891d115f2d7691a493d33ef1efe980b36f0", "PPSA02112_00": "143f2ccaf9045232bf768d4a8f5deefb485986c5b1cb934be68e55af8cc988ca", "PPSA01363_00": "ccdcffc7d86b6d94b4e2f73cd3639c56309acb33905e64bce287e28efb2f024d", "PPSA01737_00": "788e81286d1217e617b6ce0c506ad040f056f948d3169dfb7c09ff626e402270", "PPSA01327_00": "2c0e7954b15628f4c32af1c8ae74caacc6f189936e516143b30e17838bc689ba", "PPSA01364_00": "83b37522659802b8b0fc0f3317f59d8660838f2c64105068e1dcb2f3ec413a9a", "PPSA01396_00": "a9c54c21a5c181f231d93b659fa657d221fdb840fa4101752c9d76a4d80227e2", "PPSA01411_00": "708f0bd01aba9c1dc94c6c53f1dcd41002778eda4b90bc0a16e22f20f505af5f", "PPSA01487_00": "11d9bc86aacda789a00696082c2e737d76700da847cc6d3951c96d142f1c27a7", "PPSA01491_00": "4a84d056fecbc5bc3439454c12cc53a5b94664faca02f522d4effa80195d0b23", "PPSA01507_00": "e55b012917eff025a72ea5d1707138d26249e15fab371cd27a47f1b922dc29ed", "PPSA01552_00": "4274b86a90e7a8c8524bb32beb5800ff9875751b656bce4e4581632b5db7519b", "PPSA01617_00": "da1a2eb37aaaf2145197e1d56fba9dba1a69e95bb166026c7c449a520e075d16", "PPSA01736_00": "a64f774fe43b2b81086fe57fc708025fddbaff9d3b802a7d7f27d9f25d696e0d", "PPSA01825_00": "7ca5007d9ff45d7ca9793e099cd92f7e42931d9fe864fa2878f798c62b8c425e", "PPSA01950_00": "645c925d35ba1767cdbee7228df8a0b2dcd01d46a200a1dfe496552f93789e62", "PPSA02110_00": "135d1850b6c1fe5feaf6e53c3fbddc89421b4313664edb820b59ad03d01d3d5b", "PPSA01326_00": "a62592dd11d72713e4f42d51209e7b70861ac18141c4e33aba0a41c953d3ab34", "PPSA01344_00": "1a7c015fc412be30c6ed801a187f807673f710ab8d759c9fa47fee94bb0f1a65", "PPSA01412_00": "254fb5cf0d997bff6d4609a4cc286fba261c44358fe56ce1c5d11b36be774a29", "PPSA01461_00": "d21fa8f46d714840f079f215696c5291547d3e059e7f6db80a8ba26b448c2026", "PPSA01463_00": "d1b383bdef69693691cf0836c647f5202208e6d1804efe17af1f8b3f92170f64", "PPSA01488_00": "d85e1077146685600871d1a3d940191365ca7dc409d61297c215a729c595bfc6", "PPSA01490_00": "d54f26b3ae0b2ddf984917b685ca01082e92cfe47c2f575efcf8e2f508598916", "PPSA01506_00": "73d8ee97378a16137de0cd2a574ab362a9e44299f54a2bb520f399efbbda82ae", "PPSA01551_00": "1f680b9f68c5b374109caeaedd989aba180312eca6aa107d7a1e03643d6ee762", "PPSA01619_00": "11409212b7d315c00e3e84d1cf73257d46c694969f5beb17c3bdc94d327aa9e9", "PPSA01826_00": "d5cff0cc22398c4e0e078881bef862b05ed2a17fe0af2063646f8b8f905d3840", "PPSA01861_00": "cc39c5ee8610dd957274845ac1c3d26e36f670be2ff6e8d6190faea8569c3076", "PPSA01862_00": "c7e813650b75fce42b02f6c4a97f7dbceef6fceb247fc0987154873c0dd86a86", "PPSA01923_00": "f5c8e495ae0565b4f0f2cee1068e98ae303e68a29c8238a36c5fad57512cc999", "PPSA01980_00": "19db4b6bf3b88079b1413f95d4cc6c4c91c8e388026156399700875b76f1f70b", "PPSA02049_00": "ea22957eba38538b7d1c14b18d738fc37550f10458c9d58b7a275637a20e9e28", "PPSA02329_00": "b3f667226f94dbce6acd641fef4fbcc125993c8570a7d98cefbf691aaeaa641b", "PPSA01430_00": "f571309e33b4f83d275669edc32bb601cd16c95be38964fc3523396a5a94374e"}
And from ps5_xml_update_checker.py:
Code:
#!/usr/bin/env python3
import os
import json
import urllib.request
import urllib.error
import hashlib
import sys
import datetime
import subprocess
import time
import ssl
import csv
ssl._create_default_https_context = ssl._create_unverified_context
def conver_date_format(CURRENT_LASTMODIFIED):
modified_yyyy = CURRENT_LASTMODIFIED[12:16]
modified_month = CURRENT_LASTMODIFIED[8:11]
if modified_month == 'Jan':
modified_mm = '01'
elif modified_month == 'Feb':
modified_mm = '02'
elif modified_month == 'Mar':
modified_mm = '03'
elif modified_month == 'Apr':
modified_mm = '04'
elif modified_month == 'May':
modified_mm = '05'
elif modified_month == 'Jun':
modified_mm = '06'
elif modified_month == 'Jul':
modified_mm = '07'
elif modified_month == 'Aug':
modified_mm = '08'
elif modified_month == 'Sep':
modified_mm = '09'
elif modified_month == 'Oct':
modified_mm = '10'
elif modified_month == 'Nov':
modified_mm = '11'
elif modified_month == 'Dec':
modified_mm = '12'
modified_dd = CURRENT_LASTMODIFIED[5:7]
modified_hh = CURRENT_LASTMODIFIED[17:19]
modified_mn = CURRENT_LASTMODIFIED[20:22]
modified_ss = CURRENT_LASTMODIFIED[23:25]
modified_mmdd = modified_mm + modified_dd
modified_hhmnss = modified_hh + modified_mn + modified_ss
return modified_yyyy + modified_mmdd + '_' + modified_hhmnss
def get_hash_value(data, algo='sha256'):
h = hashlib.new(algo)
h.update(data)
return h.hexdigest()
def wait_interval():
# チェック中(1) or 待機中(0)かをテキストに書き出し
with open('C:/Settings/running.txt', 'w') as f:
f.write('0')
print('waiting...')
count = 0
while count < 3600 * 1:
time.sleep(10)
count += 10
dt_now = datetime.datetime.now()
print(dt_now, '\r', end='')
# while True:
# time.sleep(10)
#
# dt_now = datetime.datetime.now()
# print(dt_now, '\r', end='')
# print()
# print(dt_now.strftime('%H'))
# if dt_now.strftime('%H') != '05':
# continue
# print()
# break
time.sleep(10) # スリープ復帰後だった場合のwait
with open('C:/Settings/running.txt', 'w') as f:
f.write('1')
def snoretoast(title='Snoretoast', comment='Comment', icon_path=''):
snoretoast_exe = 'C:/bin/snoretoast/snoretoast.exe'
if not os.path.isfile(snoretoast_exe):
raise
cmd = [snoretoast_exe, '-t', title, '-p', icon_path, '-m', comment, '-silent']
subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
def git_commit():
cmd = ['git', 'add', '.']
proc = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print(proc.stdout.decode('utf8'))
cmd = ['git', 'commit', '-a', '-m', 'Update xml']
proc = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print(proc.stdout.decode('utf8'))
cmd = ['git', 'push', 'origin', 'master']
proc = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print(proc.stdout.decode('utf8'))
def download_ps5_xml_tsv(url):
with urllib.request.urlopen(url) as res, open('PS5_XML.tsv', mode='wb') as f:
f.write(res.read())
def main():
print('waiting...')
time.sleep(10)
while True:
#download_ps5_xml_tsv(sys.argv[1])
xml_link_dict = {}
in_file = 'PS5_XML.tsv'
with open(in_file, encoding='utf-8') as f_in:
f_in.readline()
for row in csv.reader(f_in, delimiter='\t'):
title_id = f'{row[0][7:16]}_00'
title_name = row[1]
xml_link = row[2]
xml_link_dict[title_id] = {'XML_LINK': xml_link, 'TITLE_NAME': title_name}
in_file = 'XML_HASH.json'
with open(in_file) as f_in:
xml_hash_dict = json.load(f_in)
snoretoast('PS5 XML Check', 'チェック開始')
start = time.time()
for title_id in xml_link_dict:
xml_link = xml_link_dict[title_id]['XML_LINK']
xml_file_name = xml_link.split('/')[-1]
title_name = xml_link_dict[title_id]['TITLE_NAME']
try:
with urllib.request.urlopen(xml_link) as res:
headers = res.getheaders()
ps5_xml = res.read()
for i in headers:
if i[0] == 'Last-Modified':
xml_date = conver_date_format(i[1])
break
except urllib.error.HTTPError as err:
if err.code == 404:
print(f'error {err.code}')
continue
elif err.code == 403:
snoretoast('PS5 XML Check', f'ERROR! http_code: {err.code}')
sys.exit(-1)
except urllib.error.URLError as err:
print(f'error {err}')
print(f'xml link : {xml_link}')
print(f'file_name : {xml_file_name}')
print(f'title_name: {title_name}')
print(f'xml_date : {xml_date}')
print()
sha256_hash = get_hash_value(ps5_xml)
try:
if sha256_hash == xml_hash_dict[title_id]:
continue
except KeyError:
pass
xml_hash_dict[title_id] = sha256_hash
out_file = 'XML_HASH.json'
with open(out_file, mode='w') as f_out:
json.dump(xml_hash_dict, f_out)
os.makedirs(f'PS5_XML/{title_id}/{xml_date}_{sha256_hash}', exist_ok=True)
out_file = f'PS5_XML/{title_id}/{xml_date}_{sha256_hash}/{xml_file_name}'
with open(out_file, mode='wb') as f_out:
f_out.write(ps5_xml)
out_file = 'LOG/update_check.log'
with open(out_file, mode='a', encoding='utf-8') as f_out:
f_out.write(f'{xml_date} XML更新 {title_id} {title_name}\n' snoretoast('PS5 XML Check', f'XML 更新 {title_id} | {title_name}')
git_commit()
wait_interval()
if __name__ == '__main__':
main()
Feel free to share your findings with others on the PS5 Scene Forums, and remember everyone is also encouraged to contribute to both the PS5DevWiki and PS5Tools Github repository as more people are able to Obtain a PlayStation 5 Console to work with in coming months.