## Easy Fake DLC / DLC without Extra Data Generator
## Version 2.1.0 (24.07.20)
## NOW UPDATED TO USE OPEN SOURCED PKGTOOL.EXE (from LibOrbisPkg) AND WITH PSS URL SUPPORT
## Written in python 3.5 by TheRadziu
import os, os.path
import sys
import json
import urllib.request
import errno
import shutil
import datetime
current_dir = os.path.dirname(os.path.abspath(__file__))
gen_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
contentid = "EP0002-CUSA00000_00-0000000000000000"
name = "NO DLC NAME"
titleid = "CUSA00000"
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc:
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else: raise
def safe_open_w(path):
mkdir_p(os.path.dirname(path))
return open(path, 'w')
def parse_store_url(url):
url = url.replace("https://", "")
urls = url.split("/")
contentid = urls[3]
chihiro_url = 'https://store.playstation.com/store/api/chihiro/00_09_000/container/'+urls[1][-2:]+'/'+urls[1][:2]+'/999/'+urls[3]+'/'
chihiro_response = urllib.request.urlopen(chihiro_url)
chihiro_json = json.loads(chihiro_response.read().decode('utf-8'))
if...