diff --git a/titles/cxb/index.py b/titles/cxb/index.py index 54e2401..c243c15 100644 --- a/titles/cxb/index.py +++ b/titles/cxb/index.py @@ -77,7 +77,7 @@ class CxbServlet(BaseServlet): return True def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]: - if not self.core_cfg.server.is_using_proxy and Utils.get_title_port_ssl(self.core_cfg) != 443: + if not self.core_cfg.server.is_using_proxy and Utils.get_title_port_ssl(self.core_cfg): return ( f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}", "", diff --git a/titles/ongeki/index.py b/titles/ongeki/index.py index edb06ba..c97778b 100644 --- a/titles/ongeki/index.py +++ b/titles/ongeki/index.py @@ -132,10 +132,10 @@ class OngekiServlet(BaseServlet): proto = "https" if self.game_cfg.server.use_https and game_ver >= 120 else "http" if proto == "https": - t_port = f":{title_port_ssl_int}" if title_port_ssl_int != 443 and not self.core_cfg.server.is_using_proxy else "" + t_port = f":{title_port_ssl_int}" if title_port_ssl_int and not self.core_cfg.server.is_using_proxy else "" else: - t_port = f":{title_port_int}" if title_port_int != 80 and not self.core_cfg.server.is_using_proxy else "" + t_port = f":{title_port_int}" if title_port_int and not self.core_cfg.server.is_using_proxy else "" return ( f"{proto}://{self.core_cfg.title.hostname}{t_port}/{game_code}/{game_ver}/", @@ -252,7 +252,7 @@ class OngekiServlet(BaseServlet): zipped = zlib.compress(json.dumps(resp, ensure_ascii=False).encode("utf-8")) - if not encrtped or version < 120: + if not encrtped and version < 120: return zipped padded = pad(zipped, 16) @@ -263,4 +263,4 @@ class OngekiServlet(BaseServlet): bytes.fromhex(self.game_cfg.crypto.keys[internal_ver][1]), ) - return crypt.encrypt(padded) + return crypt.encrypt(padded) \ No newline at end of file diff --git a/titles/sao/index.py b/titles/sao/index.py index 63ad3f7..5bbdc7e 100644 --- a/titles/sao/index.py +++ b/titles/sao/index.py @@ -76,7 +76,7 @@ class SaoServlet(BaseServlet): return True def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]: - if not self.core_cfg.server.is_using_proxy and self.core_cfg.title.port_ssl: + if not self.core_cfg.server.is_using_proxy and Utils.get_title_port_ssl(self.core_cfg): return ( f"https://{self.core_cfg.title.hostname}:{self.core_cfg.title.port_ssl}/", f"{self.core_cfg.title.hostname}/",