From bf7d709b49f7ce85ef36fe61a1e10905142c3b1a Mon Sep 17 00:00:00 2001 From: Midorica Date: Fri, 15 Dec 2023 22:22:36 -0500 Subject: [PATCH] chuni: fixing the network encryption for Sun Plus --- titles/chuni/index.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/titles/chuni/index.py b/titles/chuni/index.py index 434d22f..fa8a394 100644 --- a/titles/chuni/index.py +++ b/titles/chuni/index.py @@ -101,8 +101,14 @@ class ChuniServlet(BaseServlet): ] for method in method_list: method_fixed = inflection.camelize(method)[6:-7] - # number of iterations was changed to 70 in SUN - iter_count = 70 if version >= ChuniConstants.VER_CHUNITHM_SUN else 44 + # number of iterations was changed to 70 in SUN and then to 36 + if version == ChuniConstants.VER_CHUNITHM_SUN_PLUS: + iter_count = 36 + elif version == ChuniConstants.VER_CHUNITHM_SUN: + iter_count = 70 + else: + iter_count = 44 + hash = PBKDF2( method_fixed, bytes.fromhex(keys[2]),