gui_main.py: Add warning to serial spoofing

This commit is contained in:
Mykola Grymalyuk
2022-07-03 12:57:34 -06:00
parent b06822ec57
commit 885a1efbdc
2 changed files with 6 additions and 0 deletions

View File

@@ -2779,6 +2779,10 @@ class wx_python_gui:
self.constants.custom_board_serial_number = self.smbios_board_serial_textbox.GetValue()
def generate_new_serials_clicked(self, event):
# Throw pop up warning about misusing this feature
dlg = wx.MessageDialog(self.frame_modal, "Please take caution when using serial spoofing. This should only be used on machines that were legally obtained and require reserialization.\n\nNote: new serials are only overlayed through OpenCore and are not permanently installed into ROM.\n\nMisuse of this setting can break power management and other aspects of the OS if the system does not need spoofing\n\nDortania does not condone the use of our software on stolen devices.", "Warning", wx.YES_NO | wx.ICON_WARNING)
if dlg.ShowModal() == wx.ID_NO:
return
macserial_output = subprocess.run([self.constants.macserial_path] + f"-g -m {self.constants.custom_model or self.computer.real_model} -n 1".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
macserial_output = macserial_output.stdout.decode().strip().split(" | ")
if len(macserial_output) == 2:

View File

@@ -1181,6 +1181,8 @@ class BuildOpenCore:
self.config["UEFI"]["ProtocolOverrides"]["DataHub"] = True
self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = self.constants.custom_serial_number
self.config["PlatformInfo"]["Generic"]["MLB"] = self.constants.custom_board_serial_number
self.config["PlatformInfo"]["Generic"]["MaxBIOSVersion"] = False
self.config["PlatformInfo"]["Generic"]["SystemProductName"] = self.spoofed_model
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-SN"] = self.constants.custom_serial_number
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-MLB"] = self.constants.custom_board_serial_number