removed wmi to improve compatibility

This commit is contained in:
katboi01 2025-01-25 01:12:26 +01:00
parent 1a6e96ee47
commit c77290fd51
2 changed files with 3 additions and 8 deletions

View File

@ -16,7 +16,7 @@ args = parser.parse_args()
config_name = args.game + '.cfg' config_name = args.game + '.cfg'
if not os.path.exists(config_name): if not os.path.exists(config_name):
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"]) subprocess.check_call([sys.executable, "-m", "pip", "install", "beautifulsoup4", "PyPasser"])
config = { config = {
"game_id" : args.game, "game_id" : args.game,
"file_path" : input('Enter full file path to KF3 .exe: ').strip('\"'), "file_path" : input('Enter full file path to KF3 .exe: ').strip('\"'),
@ -48,9 +48,6 @@ def get_mac():
mac = getnode() mac = getnode()
return ':'.join(("%012X" % mac)[i:i+2] for i in range(0, 12, 2)).lower() return ':'.join(("%012X" % mac)[i:i+2] for i in range(0, 12, 2)).lower()
def get_motherboard():
return wmi.WMI().Win32_BaseBoard()[0].SerialNumber
def retrieve_login_token(session : requests.Session): def retrieve_login_token(session : requests.Session):
try: try:
print("Retrieving login form") print("Retrieving login form")
@ -125,7 +122,8 @@ def main(config):
use_proxy = config["use_proxy"] if "use_proxy" in config else False use_proxy = config["use_proxy"] if "use_proxy" in config else False
mac_addr = get_mac() mac_addr = get_mac()
hdd_serial = get_hash('') hdd_serial = get_hash('')
motherboard = get_hash(get_motherboard()) #actual moterboard serial is unknown, but this works
motherboard = get_hash(getnode())
with requests.Session() as session: with requests.Session() as session:
token = retrieve_login_token(session) token = retrieve_login_token(session)

View File

@ -1,3 +0,0 @@
beautifulsoup4
PyPasser
wmi