Skip to content

Instantly share code, notes, and snippets.

@ivanagui2
ivanagui2 / Check-Dbx.ps1
Created May 17, 2025 08:51 — forked from out0xb2/Check-Dbx.ps1
Parses signature data from the pk, kek, db, and dbx UEFI variables.
Write-Host "Checking for Administrator permission..."
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "Insufficient permissions to run this script. Open the PowerShell console as administrator and run this script again."
Break
} else {
Write-Host "Running as administrator — continuing execution..." -ForegroundColor Green
}
$patchfile = $args[0]
@ivanagui2
ivanagui2 / UEFISecDatabaseParser.ps1
Created May 17, 2025 08:51 — forked from mattifestation/UEFISecDatabaseParser.ps1
Parses signature data from the pk, kek, db, and dbx UEFI variables.
function Get-UEFIDatabaseSigner {
<#
.SYNOPSIS
Dumps signature or hash information for whitelisted ('db' variable) or blacklisted ('dbx' variable) UEFI bootloaders.
.DESCRIPTION
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
@ivanagui2
ivanagui2 / patchd.log
Created May 9, 2025 18:18 — forked from rickmark/patchd.log
Still no Root FS Ticket....
[13:16:09.0275-GMT]{3>6} CHECKPOINT NOTICE: Not image4 device: AP nonce not clearable
[13:16:09.0275-GMT]{3>6} CHECKPOINT NOTICE: Pre-existing NVRAM variable: auto-boot=true
[13:16:09.0276-GMT]{3>6} CHECKPOINT NOTICE: Pre-existing NVRAM variable: ota-uuid=C2211A17-2C6D-4D70-AD6D-E92BF312EFAC
[13:16:09.0276-GMT]{3>6} CHECKPOINT NOTICE: Pre-existing NVRAM variable: ota-outcome=initial_monitor
void clear_stale_ota_nvram(void)
executing /usr/sbin/nvram -d boot-breadcrumbs
Successfully deleted boot-breadcrumbsboot-breadcrumbs
executing /usr/sbin/nvram -d OTA-pre-conversion
Successfully deleted OTA-pre-conversionOTA-pre-conversion
executing /usr/sbin/nvram -d OTA-post-conversion
@ivanagui2
ivanagui2 / defang.md
Created May 4, 2025 08:26 — forked from macshome/defang.md
How to defang system protections on macOS

How to Defang macOS System Protections

If you want to change things on the root drive of a Mac you will need to take some steps to disable the built in security of the system. Most of these steps are the same regardless if you are on Intel or Apple Silicon. If there is a difference it is noted.

Note that all of these things put a Mac into an unsupported and less secure state.

Make sure you either perform these steps in a VM or that you reset the protections after you are done poking around

Protections and Terms

(This list is not exahustive on the details of each. Check the links at the end for more info.)

@ivanagui2
ivanagui2 / restart coreaudio daemon
Created March 16, 2025 22:43 — forked from felipecsl/restart coreaudio daemon
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@ivanagui2
ivanagui2 / .bash_aliases
Created December 29, 2024 13:21 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@ivanagui2
ivanagui2 / PythonColours.py
Created December 29, 2024 13:21 — forked from jrjhealey/PythonColours.py
Basics of python string colouring with ANSI codes
#Copy to a script and run in a terminal to see the codes and their results (this is not an exhaustive list)
print("\033[0;37;40m Normal text\n")
print("\033[2;37;40m Underlined text\033[0;37;40m \n")
print("\033[1;37;40m Bright Colour\033[0;37;40m \n")
print("\033[3;37;40m Negative Colour\033[0;37;40m \n")
print("\033[5;37;40m Negative Colour\033[0;37;40m\n")
print("\033[1;37;40m \033[2;37:40m TextColour BlackBackground TextColour GreyBackground WhiteText ColouredBackground\033[0;37;40m\n")
print("\033[1;30;40m Dark Gray \033[0m 1;30;40m \033[0;30;47m Black \033[0m 0;30;47m \033[0;37;41m Black \033[0m 0;37;41m")
print("\033[1;31;40m Bright Red \033[0m 1;31;40m \033[0;31;47m Red \033[0m 0;31;47m \033[0;37;42m Black \033[0m 0;37;42m")
@ivanagui2
ivanagui2 / README.md
Created December 9, 2024 10:11 — forked from zoilomora/README.md
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

@ivanagui2
ivanagui2 / mac_os_upgrade.md
Created August 3, 2024 11:59 — forked from DrTom/mac_os_upgrade.md
Migrate or Upgrade MacPorts etc after Mac OS Upgrade

Upgrade Mac OS and all related Development Tools

In short: reinsall everything which has been compiled in or linked against libraries the old system.

Upgrade Mac OS

  1. Upgrade OS
  2. Install or Upgrade XCode
@ivanagui2
ivanagui2 / macports_migration.sh
Created August 3, 2024 11:59 — forked from sauravag/macports_migration.sh
Macports migration script for when you update your OS, follows the instructions from https://trac.macports.org/wiki/Migration
#!/bin/bash
port -qv installed > myports.txt
sudo port -f uninstall installed
sudo rm -rf /opt/local/var/macports/build/*
curl -O https://svn.macports.org/repository/macports/contrib/restore_ports/restore_ports.tcl
chmod +x restore_ports.tcl
sudo ./restore_ports.tcl myports.txt