From 885a1efbdc344b7d4a64847ff0db84fe9d63a77a Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sun, 3 Jul 2022 12:57:34 -0600 Subject: [PATCH] gui_main.py: Add warning to serial spoofing --- gui/gui_main.py | 4 ++++ resources/build.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gui/gui_main.py b/gui/gui_main.py index d42ce245c..249a751ae 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -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: diff --git a/resources/build.py b/resources/build.py index f0bc531ef..2cacdcbc2 100644 --- a/resources/build.py +++ b/resources/build.py @@ -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