🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️
🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️🟧⬛️
- Currently this vaporizes Pages, Keynote, Numbers, etc.1
Footnotes
-
LOL ↩
#!/bin/zsh | |
# ! THIS WAS WRITTEN BY THE ROBOT ! # | |
# it has some bricking potential | |
# i am going to run it | |
# This script is for educational purposes only and is not intended to be run on a live system. | |
# It assumes that a proper backup of important data has been made. | |
# Function for logging | |
log() { | |
# ANSI color codes | |
local RED='\033[0;31m' | |
local GREEN='\033[0;32m' | |
local YELLOW='\033[1;33m' | |
local NC='\033[0m' # No Color | |
# Timestamp | |
local TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S") | |
# Select the color based on log level | |
local COLOR="$NC" | |
case $1 in | |
"error") COLOR=$RED ;; | |
"warning") COLOR=$YELLOW ;; | |
"success") COLOR=$GREEN ;; | |
esac | |
# Print the message with the selected color and a timestamp | |
echo -e "${COLOR}[$TIMESTAMP] $2${NC}" | |
} | |
# Check for root privileges | |
if [[ $(id -u) -ne 0 ]]; then | |
log "error" "This script must be run as root." | |
exit 1 | |
fi | |
log "warning" "Starting the user data removal process." | |
# Placeholder for the commands to remove non-standard files | |
# This is highly specific to the system and requires detailed knowledge of what should be removed. | |
# log "info" "Identifying and removing non-standard installation files..." | |
# Removing all user accounts except the current admin | |
# List all users except system users and the current user | |
for user in $(dscl . list /Users | grep -v '^\_.*\|daemon\|nobody\|root\|$(whoami)'); do | |
# Remove user home directories | |
if [[ -d "/Users/$user" ]]; then | |
rm -rf "/Users/$user" | |
log "success" "Removed user directory for: $user" | |
fi | |
# Delete user accounts | |
sysadminctl -deleteUser $user -secure | |
if [[ $? -eq 0 ]]; then | |
log "success" "Removed user account: $user" | |
else | |
log "error" "Failed to remove user account: $user" | |
fi | |
done | |
log "success" "User data removal process completed." |
#!/bin/zsh | |
# Check if the script is run with superuser privileges | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
# Function for logging with ANSI colors | |
log() { | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
case $2 in | |
"error") | |
COLOR=$RED | |
;; | |
"success") | |
COLOR=$GREEN | |
;; | |
*) | |
COLOR=$NC | |
;; | |
esac | |
echo -e "${COLOR}$1${NC}" | |
} | |
# Check for dependency installation (e.g., pv for a progress bar) | |
if ! command -v pv &> /dev/null | |
then | |
log "Installing pv for progress visualization..." "info" | |
brew install pv | |
fi | |
# WARNING: The following command will erase all data on the specified disk | |
# Replace 'diskX' with the appropriate disk identifier | |
# Use `diskutil list` to identify the disk. | |
read "disk?Enter disk identifier to erase (e.g., disk2): " | |
# Confirmation prompt | |
read "response?Are you sure you want to erase all data on $disk? This action cannot be undone. (y/n): " | |
if [[ $response =~ ^[Yy]$ ]] | |
then | |
diskutil eraseDisk JHFS+ MacintoshHD /dev/$disk | pv -p | log "Erasing disk /dev/$disk..." "info" | |
log "Disk /dev/$disk erased successfully." "success" | |
else | |
log "Operation cancelled." "error" | |
exit 1 | |
fi |