From 92e46a56f546d38ff0f95dd2d05d582337089183 Mon Sep 17 00:00:00 2001 From: katboi01 Date: Mon, 10 Mar 2025 23:37:34 +0100 Subject: [PATCH] added game type parameter --- dmmBypass.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dmmBypass.py b/dmmBypass.py index 69a9e29..86668cf 100644 --- a/dmmBypass.py +++ b/dmmBypass.py @@ -4,7 +4,6 @@ import json import hashlib import pathlib import argparse -import requests import subprocess import urllib.parse from uuid import getnode @@ -12,6 +11,7 @@ from datetime import datetime, timedelta parser = argparse.ArgumentParser(description='DMM bypass script') parser.add_argument('-g', '--game', type=str, help="DMM code name of the game", default="kfp2g") +parser.add_argument('-t', '--type', help="DMM game type (ACL/GCL)", default="GCL") parser.add_argument('-u', '--update', help="Check for game update before launching", action='store_true') args = parser.parse_args() @@ -40,7 +40,9 @@ else: print(f'Loaded settings from {config_name}') config["update_game"] = args.update +config["game_type"] = args.type +import requests import dmmUpdater from bs4 import BeautifulSoup from pypasser import reCaptchaV3 @@ -118,10 +120,10 @@ def agree_to_game_terms(game_id, use_proxy): print("Failed to accept terms of use:", e) return False -def retrieve_launch_params(game_id, mac_addr, hdd_serial, motherboard, login_secure, login_session, use_proxy, update_game): +def retrieve_launch_params(game_id, game_type, mac_addr, hdd_serial, motherboard, login_secure, login_session, use_proxy, update_game): try: print("Retrieving launch arguments") - data = {"product_id":game_id,"game_type":"GCL","game_os":"win","launch_type":"LIB","mac_address":mac_addr,"hdd_serial":hdd_serial,"motherboard":motherboard,"user_os":"win"} + data = {"product_id":game_id,"game_type":game_type,"game_os":"win","launch_type":"LIB","mac_address":mac_addr,"hdd_serial":hdd_serial,"motherboard":motherboard,"user_os":"win"} headers = {"User-Agent": "DMMGamePlayer5-Win/5.3.12 Electron/32.1.0", "Client-App": "DMMGamePlayer5", "Client-version": "5.3.12", "Content-Type": "application/json"} cookies = {"login_secure_id":login_secure, "login_session_id":login_session} if update_game: @@ -150,6 +152,7 @@ def retrieve_launch_params(game_id, mac_addr, hdd_serial, motherboard, login_sec def main(config): #required arguments game_id = config["game_id"] + game_type = config["game_type"] exe_location = config["file_path"] login = urllib.parse.quote_plus(config["dmm_login"]) password = urllib.parse.quote_plus(config["dmm_password"]) @@ -193,7 +196,7 @@ def main(config): if not use_proxy: input("Enable VPN now and press Enter") #execute_args, file_list_url, file_access_params - launch_data : dict = retrieve_launch_params(game_id, mac_addr, hdd_serial, motherboard, login_secure, login_session, use_proxy, update_game) + launch_data : dict = retrieve_launch_params(game_id, game_type, mac_addr, hdd_serial, motherboard, login_secure, login_session, use_proxy, update_game) execute_args : str = launch_data.get("execute_args", None) if execute_args == None: