-
Notifications
You must be signed in to change notification settings - Fork 0
/
testt.py
29 lines (22 loc) · 944 Bytes
/
testt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
from pathlib import Path
filename = "windows 10.vmx" or "windows 10 x64.vmx" or "windows 10 x32.vmx"
onedrive_path = Path.home() / "OneDrive"
if onedrive_path.exists():
onedrive_documents_path = onedrive_path / "Documents"
documents_path = onedrive_documents_path if onedrive_documents_path.exists() else Path.home() / "Documents"
else:
documents_path = Path.home() / "Documents"
file_path = next(documents_path.glob(f"**/{filename}"), None)
if file_path is not None:
with open(file_path, "r") as file:
file_text = file.read()
if 'SMBIOS.reflectHost = "True"' in file_text:
print("You have run the bypass before, you do not need to run it again.")
else:
with open(file_path, "a") as file:
file.write('\nSMBIOS.reflectHost = "True"')
print("bypass completed successfully.")
else:
print("File not found")
input("Press any key to close the program...")