5T33Z0 / OC-Anonymizer

Random script to censor sensitive fields in OpenCore's config.plist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macOS

OC Anonymizer – remove sensitive data from your config.plist

About

Python Script for removing sensitive data from OpenCore's config.plist. Useful if you plan to share your Config/EFI online.

Features

The script comes in two flavors: "full" and "lite" which provide different feature-sets (listed below).

Full version

Changes the following Settings/Parameters in the config.plist:

  • Removes MLB, ROM, Serials from PlatformInfo/Generic:
    • PlatformInfo/Generic/MLB
    • PlatformInfo/Generic/ROM
    • PlatformInfo/Generic/SystemSerialNumber
    • PlatformInfo/Generic/SystemUUID
  • Security Settings:
    • Misc/Security/ApECID = 0 → ApECID has to be generated in the target system itself!
    • Misc/Security/ScanPolicy = 0 → So the system checks for all supported device types and file systems.
    • Misc/Security/SecureBootModel = Disabled⚠️ Disables Apple Secure Boot hardware model to avoid issues during Installation. Re-enable it in Post-Install so System Updates work when using an SMBIOS of a Mac model with a T2 Security Chip!
    • Misc/Security/Vault = Optional → Has to be created on the target system itself!
  • Other Settings:
    • Changes Boter/Quirks/ResizeAppleGpuBars to -1 → Disables Resizable BAR in macOS. Just in case the next user's GPU doesn't support it or it is disabled in BIOS.
    • Changes UEFI/Quirks/ResizeGpuBars to -1 → Disables Resizable BAR in UEFI for the same reason.
    • Changes Misc/Boot/LauncherOption to Disabled → To avoid changing boot menu entries on the target system's Firmware/BIOS.
    • Removes custom entries from Misc/BlessOverride → These overrides have to be created on the target system.
    • Removes custom boot loader entries from Misc/Entries
    • Changes Misc/Debug/Target to 3 (Default)
    • UEFI/APFS: Changes MinDate and MinVersion to -1 to maximize macOS compatibility. Otherwise the APFS driver isn't loaded in macOS 10.15 or older so you won't see any entries of APFS drives in OpenCore's Boot Menu.

Lite version

The lite version of this script will only anonymize SMBIOS and change 2 other settings:

  • Anonymizes entries in PlatformInfo/Generic:
    • PlatformInfo/Generic/MLB
    • PlatformInfo/Generic/ROM
    • PlatformInfo/Generic/SystemSerialNumber
    • PlatformInfo/Generic/SystemUUID
  • Other Settings:
    • Misc/Security/ScanPolicy = 0 → So the system checks for all supported device types and file systems.
    • UEFI/APFS: Changes MinDate and MinVersion to -1 to maximize macOS compatibility. Otherwise the APFS driver isn't loaded in macOS 10.15 or older so you won't see any entries of APFS drives in OpenCore's Boot Menu.

Usage

  • Install Python if you haven't already
  • Click on "Code" > "Download ZIP" and unpack it.
  • Run Terminal
  • Enter:
    cd ~/Downloads/OC-Anonymizer-master
  • Next, enter
    python3 oc_anonymizer_full.py PATH_TO_CONFIG.plist (or drag and drop your config into the terminal window after ".py")
  • For running the Lite Version, enter
    python3 oc_anonymizer_lite.py PATH_TO_CONFIG.plist
  • Hit ENTER

This will create a censored_config.plist in the oc_anonymizer folder without sensitive data and changed settings as described. Rename the file to config.plist and place it in the EFI folder you want to share with the world.

Issues

If you encounter any issue, please file a bug report here

Credits and Resources

About

Random script to censor sensitive fields in OpenCore's config.plist

License:GNU General Public License v3.0


Languages

Language:Python 100.0%