From 03d18d45e225ea008356c3ec0fe63e81e4586142 Mon Sep 17 00:00:00 2001 From: Yuuki Chan Date: Thu, 14 Nov 2024 17:18:52 +0900 Subject: [PATCH] Initial release. --- .gitignore | 3 +++ Clips/placeholder | 0 requirements.txt | Bin 0 -> 300 bytes run.py | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 Clips/placeholder create mode 100644 requirements.txt create mode 100644 run.py diff --git a/.gitignore b/.gitignore index ab3e8ce..d71db58 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,6 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +# Clips +Clips/* +!Clips/placeholder diff --git a/Clips/placeholder b/Clips/placeholder new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..a41ed54703982ba86f7529e77b2473013c76afc8 GIT binary patch literal 300 zcmYk1+YW+23`FPI#7~jH;_bzcLC{FDigHPaAFrMkNX(`imY$hTzn@YUwdz&tN}V`C zDYaFiBbD=7Yo$^*6_6c#uZ str: + req = requests.get(uri.format(pid)) + + if req.status_code == 200: + j = req.json() + return j['Products'][0]['LocalizedProperties'][0]['ProductTitle'] + else: + return 'Unknown Title' + + +def main(): + for lic in licenses: + clip = lic[lic.rfind('\\') + 1:] + data = json.loads(json.dumps(xparse(open(lic, 'r').read()), indent=4)) + signed_lic = json.loads(json.dumps(xparse(b64d(data['License']['SignedLicense']).decode()))) + custom_policy = json.loads(b64d(signed_lic['SignedLicense']['SVLicense']['CustomPolicies'].encode()).decode()) + content_id = custom_policy['packages'][0]['packageIdentifier'] + product_id = custom_policy['packages'][0]['productId'] + game = get_game_name(product_id) + + print(f'\033[91m{clip}\033[97m is for product: \033[91m{game}\033[97m ContentID: \033[91m{content_id}\033[99m') + + +if __name__ == '__main__': + colorama.init() + + main()