rename project to runaway

This commit is contained in:
2026-11-09 10:13:51 +08:00
parent 5857081832
commit c9feb8c05a
95 changed files with 1034 additions and 1034 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
BACKUP_DIR="$(dirname "$(dirname "$0")")/.unleash-backup"
BACKUP_DIR="$(dirname "$(dirname "$0")")/.runaway-backup"
check_disk_space() {
local data_mount="$1"
@@ -80,7 +80,7 @@ restore_state() {
success "launchd override restored"
fi
sed -i '' '/# Added by unleash/d' "$data_mount/private/etc/hosts" 2>/dev/null || true
sed -i '' '/# Added by runaway/d' "$data_mount/private/etc/hosts" 2>/dev/null || true
rm -f "$BACKUP_DIR/data_volume_path" "$BACKUP_DIR/timestamp"
success "Restore complete"
+13 -13
View File
@@ -56,20 +56,20 @@ run_preformat_check() {
step "Checking pf firewall status..."
if command -v pfctl &>/dev/null; then
if pfctl -a "com.unleash/mdm" -s rules 2>/dev/null | grep -q "block"; then
echo -e " ${GRN}Unleash pf firewall active${NC}"
if pfctl -a "com.runaway/mdm" -s rules 2>/dev/null | grep -q "block"; then
echo -e " ${GRN}Runaway pf firewall active${NC}"
else
echo -e " ${YEL}No Unleash pf firewall rules${NC}"
echo -e " ${YEL}No Runaway pf firewall rules${NC}"
fi
else
echo -e " ${YEL}pfctl not available${NC}"
fi
step "Checking persistence LaunchDaemon..."
if [ -f "/Library/LaunchDaemons/com.unleash.heal.plist" ]; then
echo -e " ${GRN}Unleash LaunchDaemon installed (auto-heal on boot)${NC}"
if [ -f "/Library/LaunchDaemons/com.runaway.heal.plist" ]; then
echo -e " ${GRN}Runaway LaunchDaemon installed (auto-heal on boot)${NC}"
else
echo -e " ${YEL}No Unleash LaunchDaemon${NC}"
echo -e " ${YEL}No Runaway LaunchDaemon${NC}"
fi
echo ""
@@ -78,12 +78,12 @@ run_preformat_check() {
echo -e "${CYAN}║${NC} ${GRN}SAFE TO FORMAT${NC} — No MDM enrollment detected ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} This Mac should not lock after a wipe. ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} If you want defense-in-depth anyway, run: ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} ${YEL}sudo ./unleash persist && sudo ./unleash firewall${NC} ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} ${YEL}sudo ./runaway persist && sudo ./runaway firewall${NC} ${CYAN}║${NC}"
else
echo -e "${CYAN}║${NC} ${RED}MDM DETECTED${NC} — This Mac WILL lock after format ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} Run from Recovery after wipe: ${YEL}./unleash bypass${NC} ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} Run from Recovery after wipe: ${YEL}./runaway bypass${NC} ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} To survive macOS updates (not full wipes): ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} ${YEL}sudo ./unleash persist && sudo ./unleash firewall${NC} ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} ${YEL}sudo ./runaway persist && sudo ./runaway firewall${NC} ${CYAN}║${NC}"
fi
echo -e "${CYAN}╚══════════════════════════════════════════════════════════════╝${NC}"
}
@@ -94,19 +94,19 @@ check_upgrade_safety() {
step "Checking if suppression will survive upgrade..."
local issues=0
if [ -f "/Library/LaunchDaemons/com.unleash.heal.plist" ]; then
if [ -f "/Library/LaunchDaemons/com.runaway.heal.plist" ]; then
echo -e " ${GRN}Persistence installed — heal runs after reboot${NC}"
else
echo -e " ${RED}No persistence — upgrade may restore MDM${NC}"
echo -e " ${YEL}Fix: sudo ./unleash persist${NC}"
echo -e " ${YEL}Fix: sudo ./runaway persist${NC}"
issues=$((issues + 1))
fi
if command -v pfctl &>/dev/null && pfctl -a "com.unleash/mdm" -s rules 2>/dev/null | grep -q "block"; then
if command -v pfctl &>/dev/null && pfctl -a "com.runaway/mdm" -s rules 2>/dev/null | grep -q "block"; then
echo -e " ${GRN}pf firewall active — survives upgrade${NC}"
else
echo -e " ${YEL}No pf firewall — upgrade may restore MDM connectivity${NC}"
echo -e " ${YEL}Fix: sudo ./unleash whitelist${NC}"
echo -e " ${YEL}Fix: sudo ./runaway whitelist${NC}"
issues=$((issues + 1))
fi
+8 -8
View File
@@ -1,4 +1,4 @@
CONFIG_FILE="$HOME/.unleash.conf"
CONFIG_FILE="$HOME/.runaway.conf"
load_config() {
[ -f "$CONFIG_FILE" ] || return 0
@@ -20,10 +20,10 @@ _rewrite_config() {
local tmp
[ -f "$CONFIG_FILE" ] || touch "$CONFIG_FILE"
tmp=$(mktemp "${CONFIG_FILE}.XXXXXX") || return 1
if ! UNLEASH_CONFIG_KEY="$key" UNLEASH_CONFIG_VALUE="$value" \
UNLEASH_CONFIG_OPERATION="${3:-set}" awk '
BEGIN { key=ENVIRON["UNLEASH_CONFIG_KEY"]; value=ENVIRON["UNLEASH_CONFIG_VALUE"];
operation=ENVIRON["UNLEASH_CONFIG_OPERATION"] }
if ! RUNAWAY_CONFIG_KEY="$key" RUNAWAY_CONFIG_VALUE="$value" \
RUNAWAY_CONFIG_OPERATION="${3:-set}" awk '
BEGIN { key=ENVIRON["RUNAWAY_CONFIG_KEY"]; value=ENVIRON["RUNAWAY_CONFIG_VALUE"];
operation=ENVIRON["RUNAWAY_CONFIG_OPERATION"] }
index($0, key "=")==1 { if (!found++ && operation=="set") print key "=" value; next }
{ print }
END { if (!found && operation=="set") print key "=" value }
@@ -56,7 +56,7 @@ cmd_config() {
local key="${3:-}"
local value="${4:-}"
[ -z "$key" ] || [ -z "$value" ] && {
info "Usage: ./unleash config set KEY VALUE"
info "Usage: ./runaway config set KEY VALUE"
info "Keys: WEBHOOK, LOG_LEVEL (verbose), LOG_FILE"
return 1
}
@@ -64,14 +64,14 @@ cmd_config() {
;;
unset)
local key="${3:-}"
[ -z "$key" ] && { info "Usage: ./unleash config unset KEY"; return 1; }
[ -z "$key" ] && { info "Usage: ./runaway config unset KEY"; return 1; }
if [ -f "$CONFIG_FILE" ]; then
_rewrite_config "$key" "" unset || return 1
success "Removed $key from config"
fi
;;
*)
info "Usage: ./unleash config {show|set KEY VALUE|unset KEY}"
info "Usage: ./runaway config {show|set KEY VALUE|unset KEY}"
;;
esac
}
+2 -2
View File
@@ -1,5 +1,5 @@
run_demo() {
header "Unleash Demo — Simulated MDM Bypass"
header "Runaway Demo — Simulated MDM Bypass"
local demo_dir
demo_dir=$(mktemp -d)
@@ -79,6 +79,6 @@ run_demo() {
echo -e "${CYAN}╔═══════════════════════════════════════════════╗${NC}"
echo -e "${CYAN}║${NC} ${GRN}Demo Complete${NC} ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} Commands used: suppress, heal ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} Try: ${YEL}sudo ./unleash doctor${NC} for real diagnostics ${CYAN}║${NC}"
echo -e "${CYAN}║${NC} Try: ${YEL}sudo ./runaway doctor${NC} for real diagnostics ${CYAN}║${NC}"
echo -e "${CYAN}╚═══════════════════════════════════════════════╝${NC}"
}
+4 -4
View File
@@ -1,5 +1,5 @@
DISCORD_BOT_DIR="/tmp/unleash-discord"
DISCORD_BOT_DIR="/tmp/runaway-discord"
DISCORD_BOT_SCRIPT="${DISCORD_BOT_DIR}/bot.sh"
DISCORD_BOT_PID="${DISCORD_BOT_DIR}/bot.pid"
@@ -22,7 +22,7 @@ cmd_discord_bot_install() {
cat > "$DISCORD_BOT_SCRIPT" <<- BOT
#!/bin/bash
# Unleash Discord Bot — monitors MDM and sends alerts
# Runaway Discord Bot — monitors MDM and sends alerts
TOKEN="$token"
CHANNEL_ID="$channel_id"
LAST_STATE=""
@@ -35,7 +35,7 @@ while true; do
curl -s -X POST "https://discord.com/api/v10/channels/\$CHANNEL_ID/messages" \
-H "Authorization: Bot \$TOKEN" \
-H "Content-Type: application/json" \
-d '{"content":"🚨 **Unleash Alert** — MDM enrollment detected on '"$(hostname)"'"}'
-d '{"content":"🚨 **Runaway Alert** — MDM enrollment detected on '"$(hostname)"'"}'
fi
LAST_STATE="\$STATE"
sleep 300
@@ -47,7 +47,7 @@ BOT
local pid=$!
echo "$pid" > "$DISCORD_BOT_PID"
success "Discord bot started (PID $pid)"
info "To stop: ./unleash discord-bot-stop"
info "To stop: ./runaway discord-bot-stop"
}
cmd_discord_bot_stop() {
+5 -5
View File
@@ -47,7 +47,7 @@ _network_diagnostics() {
run_doctor() {
if [ "${1:-}" = --network ]; then _network_diagnostics; return; fi
header "Unleash Doctor — Pre-Flight Check"
header "Runaway Doctor — Pre-Flight Check"
local errors=0 warnings=0
@@ -150,22 +150,22 @@ run_doctor() {
echo ""
step "Persistence status"
if [ -f "/Library/LaunchDaemons/com.unleash.heal.plist" ]; then
if [ -f "/Library/LaunchDaemons/com.runaway.heal.plist" ]; then
echo " heal LaunchDaemon: installed"
else
echo " heal LaunchDaemon: not installed"
fi
if [ -f "/Library/LaunchDaemons/com.unleash.monitor.plist" ]; then
if [ -f "/Library/LaunchDaemons/com.runaway.monitor.plist" ]; then
echo " monitor LaunchDaemon: installed"
else
echo " monitor LaunchDaemon: not installed"
fi
if [ -f "/etc/pf.anchors/com.unleash/mdm" ]; then
if [ -f "/etc/pf.anchors/com.runaway/mdm" ]; then
echo " pf firewall anchor: installed"
else
echo " pf firewall anchor: not installed"
fi
if [ -f "/etc/pf.anchors/com.unleash.selective" ]; then
if [ -f "/etc/pf.anchors/com.runaway.selective" ]; then
echo " pf selective anchor: installed"
else
echo " pf selective anchor: not installed"
+12 -12
View File
@@ -1,5 +1,5 @@
FIREWALL_ANCHOR="com.unleash/mdm"
FIREWALL_ANCHOR="com.runaway/mdm"
FIREWALL_CONF="/etc/pf.conf"
FIREWALL_ANCHOR_DIR="/etc/pf.anchors"
@@ -36,7 +36,7 @@ install_pf_mdm_block() {
mkdir -p "$anchor_dir"
cat > "$anchor_file" << 'ANCHOR'
# Unleash MDM block — Apple MDM infrastructure IP ranges
# Runaway MDM block — Apple MDM infrastructure IP ranges
# These ranges host deviceenrollment.apple.com, mdmenrollment.apple.com, etc.
# Blocking at pf level is immune to DNS-over-HTTPS bypass.
block drop out proto {tcp,udp} to {17.0.0.0/8}
@@ -50,15 +50,15 @@ ANCHOR
local load_line="load anchor \"${FIREWALL_ANCHOR}\" from \"${anchor_file}\""
if [ -f "$pf_conf" ]; then
if grep -q "com.unleash" "$pf_conf" 2>/dev/null; then
info "pf.conf already has Unleash anchor"
if grep -q "com.runaway" "$pf_conf" 2>/dev/null; then
info "pf.conf already has Runaway anchor"
else
printf '\n%s\n%s\n%s\n' "# Added by unleash — MDM block" "$anchor_line" "$load_line" >> "$pf_conf"
printf '\n%s\n%s\n%s\n' "# Added by runaway — MDM block" "$anchor_line" "$load_line" >> "$pf_conf"
success "pf.conf updated"
fi
else
cat > "$pf_conf" <<- EOF
# pf.conf — restored by unleash
# pf.conf — restored by runaway
#
# Default macOS pf.conf
scrub-anchor "com.apple/*"
@@ -69,11 +69,11 @@ ANCHOR
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
# Added by unleash — MDM block
# Added by runaway — MDM block
${anchor_line}
${load_line}
EOF
success "pf.conf created with Unleash anchor"
success "pf.conf created with Runaway anchor"
fi
step "Loading pf rules..."
@@ -96,7 +96,7 @@ remove_pf_mdm_block() {
local root=""
[ -n "$data_mount" ] && root="$data_mount"
step "Removing Unleash pf anchor..."
step "Removing Runaway pf anchor..."
local anchor_file="${root}${FIREWALL_ANCHOR_DIR}/${FIREWALL_ANCHOR}"
if [ -f "$anchor_file" ]; then
@@ -110,7 +110,7 @@ remove_pf_mdm_block() {
local tmp_conf
tmp_conf=$(mktemp "${pf_conf}.XXXXXX") || return 1
if ! cp -p "$pf_conf" "$tmp_conf" \
|| ! sed '/# Added by unleash/d; /com\.unleash/d' "$pf_conf" > "$tmp_conf" \
|| ! sed '/# Added by runaway/d; /com\.runaway/d' "$pf_conf" > "$tmp_conf" \
|| ! mv "$tmp_conf" "$pf_conf"; then
rm -f "$tmp_conf"
return 1
@@ -133,9 +133,9 @@ pf_status() {
pfctl -si 2>/dev/null | grep -E "Status|Enabled" || echo " pf not enabled"
echo ""
if pfctl -a "$FIREWALL_ANCHOR" -s rules 2>/dev/null; then
info "Unleash MDM anchor rules:"
info "Runaway MDM anchor rules:"
else
info "No Unleash MDM anchor loaded"
info "No Runaway MDM anchor loaded"
fi
else
warn "pfctl not available"
+10 -10
View File
@@ -73,13 +73,13 @@ install_persist_launchdaemon() {
local root
root="$(_persist_mount_root "$data_mount")"
local unleash_src
unleash_src=$(_launchd_script_path)
local runaway_src
runaway_src=$(_launchd_script_path)
step "Installing LaunchDaemon for boot-time persistence..."
local plist_dir="${root}/Library/LaunchDaemons"
local plist_path="${plist_dir}/com.unleash.heal.plist"
local plist_path="${plist_dir}/com.runaway.heal.plist"
mkdir -p "$plist_dir"
@@ -89,11 +89,11 @@ install_persist_launchdaemon() {
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.unleash.heal</string>
<string>com.runaway.heal</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>${unleash_src}</string>
<string>${runaway_src}</string>
<string>heal</string>
</array>
<key>RunAtLoad</key>
@@ -105,9 +105,9 @@ install_persist_launchdaemon() {
<key>KeepAlive</key>
<false/>
<key>StandardOutPath</key>
<string>/var/log/unleash-heal.log</string>
<string>/var/log/runaway-heal.log</string>
<key>StandardErrorPath</key>
<string>/var/log/unleash-heal.err</string>
<string>/var/log/runaway-heal.err</string>
</dict>
</plist>
PLIST
@@ -131,16 +131,16 @@ remove_persist_launchdaemon() {
local data_mount="$1"
local root
root="$(_persist_mount_root "$data_mount")"
local plist_path="${root}/Library/LaunchDaemons/com.unleash.heal.plist"
local plist_path="${root}/Library/LaunchDaemons/com.runaway.heal.plist"
if [ -f "$plist_path" ]; then
step "Removing Unleash LaunchDaemon..."
step "Removing Runaway LaunchDaemon..."
if command -v launchctl &>/dev/null; then
launchctl unload "$plist_path" 2>/dev/null || true
fi
rm -f "$plist_path"
success "LaunchDaemon removed"
else
info "No Unleash LaunchDaemon installed"
info "No Runaway LaunchDaemon installed"
fi
}
+5 -5
View File
@@ -1,8 +1,8 @@
show_history() {
header "Unleash Event History"
header "Runaway Event History"
local log_dir="${1:-/var/log}"
local logs=("$log_dir/unleash-monitor.log" "$log_dir/unleash-heal.log" "$log_dir/unleash-monitor.err")
local logs=("$log_dir/runaway-monitor.log" "$log_dir/runaway-heal.log" "$log_dir/runaway-monitor.err")
local found=false
for logfile in "${logs[@]}"; do
@@ -20,11 +20,11 @@ show_history() {
if [ "$found" = false ]; then
info "No event logs found."
info "Run 'sudo ./unleash monitor' or 'sudo ./unleash persist' first."
info "Run 'sudo ./runaway monitor' or 'sudo ./runaway persist' first."
fi
step "Backup records"
local backup_dir=".unleash-backup"
local backup_dir=".runaway-backup"
if [ -d "$backup_dir" ] && [ -f "$backup_dir/timestamp" ]; then
local ts
ts=$(cat "$backup_dir/timestamp")
@@ -36,7 +36,7 @@ show_history() {
clear_history() {
local log_dir="${1:-/var/log}"
local logs=("$log_dir/unleash-monitor.log" "$log_dir/unleash-heal.log" "$log_dir/unleash-monitor.err")
local logs=("$log_dir/runaway-monitor.log" "$log_dir/runaway-heal.log" "$log_dir/runaway-monitor.err")
for logfile in "${logs[@]}"; do
if [ -f "$logfile" ]; then
: > "$logfile"
+9 -9
View File
@@ -1,8 +1,8 @@
cmd_init() {
header "unleash init — Setup Wizard"
header "runaway init — Setup Wizard"
echo "This will walk you through setting up unleash for your Mac."
echo "This will walk you through setting up runaway for your Mac."
echo "Press Ctrl+C at any time to abort."
echo ""
@@ -46,7 +46,7 @@ cmd_init() {
if $root_ok; then
install_pf_mdm_block ""
else
info "Skipping firewall (needs root). Run: sudo ./unleash firewall"
info "Skipping firewall (needs root). Run: sudo ./runaway firewall"
fi
fi
@@ -57,7 +57,7 @@ cmd_init() {
if $root_ok; then
install_monitor_launchdaemon ""
else
info "Skipping monitor (needs root). Run: sudo ./unleash monitor-install"
info "Skipping monitor (needs root). Run: sudo ./runaway monitor-install"
fi
fi
@@ -68,9 +68,9 @@ cmd_init() {
if $root_ok && ! is_recovery; then
install_persist_launchdaemon ""
elif is_recovery; then
echo -e "${YEL}Run after reboot: sudo ./unleash persist${NC}"
echo -e "${YEL}Run after reboot: sudo ./runaway persist${NC}"
else
info "Skipping persist (needs root). Run: sudo ./unleash persist"
info "Skipping persist (needs root). Run: sudo ./runaway persist"
fi
fi
@@ -86,7 +86,7 @@ cmd_init() {
echo ""
success "Setup complete!"
info "Recommended next steps:"
info " - From Recovery: ./unleash bypass (full bypass)"
info " - From Recovery: ./unleash check (pre-format check)"
info " - After login: sudo ./unleash harden"
info " - From Recovery: ./runaway bypass (full bypass)"
info " - From Recovery: ./runaway check (pre-format check)"
info " - After login: sudo ./runaway harden"
}
+2 -2
View File
@@ -56,7 +56,7 @@ detect_configurator_enrollment() {
return 0
else
echo ""
echo -e "${YEL}Fix: re-run bypass from Recovery, then run 'sudo ./unleash harden'${NC}"
echo -e "${YEL}Fix: re-run bypass from Recovery, then run 'sudo ./runaway harden'${NC}"
return 1
fi
}
@@ -144,7 +144,7 @@ detect_migration_assistant() {
echo -e "$details" | sed '/^$/d'
echo ""
echo -e "${YEL}These user-level artifacts can re-enable MDM on every login.${NC}"
echo -e "${YEL}Fix: run 'sudo ./unleash harden' or './unleash suppress' from Recovery.${NC}"
echo -e "${YEL}Fix: run 'sudo ./runaway harden' or './runaway suppress' from Recovery.${NC}"
return 1
else
echo -e "${GRN}✓ No Migration Assistant artifacts found${NC}"
+19 -19
View File
@@ -3,13 +3,13 @@ install_monitor_launchdaemon() {
local root=""
[ -n "$data_mount" ] && root="$data_mount"
local unleash_src
unleash_src=$(_launchd_script_path)
local runaway_src
runaway_src=$(_launchd_script_path)
step "Installing monitor LaunchDaemon..."
local plist_dir="${root}/Library/LaunchDaemons"
local plist_path="${plist_dir}/com.unleash.monitor.plist"
local plist_path="${plist_dir}/com.runaway.monitor.plist"
mkdir -p "$plist_dir"
cat > "$plist_path" <<- PLIST
@@ -18,11 +18,11 @@ install_monitor_launchdaemon() {
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.unleash.monitor</string>
<string>com.runaway.monitor</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>${unleash_src}</string>
<string>${runaway_src}</string>
<string>monitor</string>
</array>
<key>RunAtLoad</key>
@@ -32,9 +32,9 @@ install_monitor_launchdaemon() {
<key>Nice</key>
<integer>1</integer>
<key>StandardOutPath</key>
<string>/var/log/unleash-monitor.log</string>
<string>/var/log/runaway-monitor.log</string>
<key>StandardErrorPath</key>
<string>/var/log/unleash-monitor.err</string>
<string>/var/log/runaway-monitor.err</string>
</dict>
</plist>
PLIST
@@ -55,7 +55,7 @@ uninstall_monitor_launchdaemon() {
local data_mount="$1"
local root=""
[ -n "$data_mount" ] && root="$data_mount"
local plist_path="${root}/Library/LaunchDaemons/com.unleash.monitor.plist"
local plist_path="${root}/Library/LaunchDaemons/com.runaway.monitor.plist"
if [ -f "$plist_path" ]; then
step "Removing monitor LaunchDaemon..."
@@ -73,16 +73,16 @@ monitor_mdm() {
header "MDM Monitor (continuous)"
if ! is_root; then
error_exit "Monitor requires sudo: sudo ./unleash monitor"
error_exit "Monitor requires sudo: sudo ./runaway monitor"
fi
local logfile="/var/log/unleash-monitor.log"
local pidfile="/tmp/unleash-monitor.pid"
local logfile="/var/log/runaway-monitor.log"
local pidfile="/tmp/runaway-monitor.pid"
local webhook="${DISCORD_WEBHOOK:-}"
if [ -f "$pidfile" ] && kill -0 "$(cat "$pidfile")" 2>/dev/null; then
echo -e "${YEL}Monitor already running (PID $(cat "$pidfile"))${NC}"
echo -e "${YEL}Run 'sudo ./unleash monitor-stop' to stop it${NC}"
echo -e "${YEL}Run 'sudo ./runaway monitor-stop' to stop it${NC}"
return 0
fi
@@ -132,11 +132,11 @@ monitor_mdm() {
if [ "$state" = "dirty" ] && [ $((now - last_notification)) -gt 3600 ]; then
last_notification=$now
if command -v osascript &>/dev/null; then
osascript -e "display notification \"$reason\" with title \"Unleash MDM Alert\" subtitle \"MDM enrollment detected\"" 2>/dev/null || true
osascript -e "display notification \"$reason\" with title \"Runaway MDM Alert\" subtitle \"MDM enrollment detected\"" 2>/dev/null || true
fi
if [ -n "$webhook" ]; then
local payload
payload=$(printf '{"content":"🚨 **Unleash Alert** — MDM enrollment detected: %s","username":"Unleash Monitor"}' "$reason")
payload=$(printf '{"content":"🚨 **Runaway Alert** — MDM enrollment detected: %s","username":"Runaway Monitor"}' "$reason")
curl -s -H "Content-Type: application/json" -d "$payload" "$webhook" 2>/dev/null || warn "Webhook failed"
fi
heal_suppress ""
@@ -152,11 +152,11 @@ monitor_mdm() {
if [ "$consecutive_failures" -ge 12 ]; then
echo "$(date) CRITICAL: 12 consecutive dirty checks" >> "$logfile"
if command -v osascript &>/dev/null; then
osascript -e "display dialog \"MDM keeps coming back after 12 attempts. Something is persistently re-enrolling.\" with title \"Unleash\" buttons {\"OK\"} default button \"OK\"" 2>/dev/null || true
osascript -e "display dialog \"MDM keeps coming back after 12 attempts. Something is persistently re-enrolling.\" with title \"Runaway\" buttons {\"OK\"} default button \"OK\"" 2>/dev/null || true
fi
if [ -n "$webhook" ]; then
curl -s -H "Content-Type: application/json" \
-d '{"content":"🚨 **Unleash CRITICAL** — 12 consecutive MDM detections. Persistent re-enrollment detected.","username":"Unleash Monitor"}' \
-d '{"content":"🚨 **Runaway CRITICAL** — 12 consecutive MDM detections. Persistent re-enrollment detected.","username":"Runaway Monitor"}' \
"$webhook" 2>/dev/null || true
fi
consecutive_failures=0
@@ -168,7 +168,7 @@ monitor_mdm() {
}
stop_monitor() {
local pidfile="${1:-/tmp/unleash-monitor.pid}"
local pidfile="${1:-/tmp/runaway-monitor.pid}"
if [ -f "$pidfile" ]; then
local pid
pid=$(cat "$pidfile")
@@ -185,10 +185,10 @@ stop_monitor() {
}
monitor_status() {
local pidfile="${1:-/tmp/unleash-monitor.pid}"
local pidfile="${1:-/tmp/runaway-monitor.pid}"
if [ -f "$pidfile" ] && kill -0 "$(cat "$pidfile")" 2>/dev/null; then
echo -e "${GRN}Monitor running (PID $(cat "$pidfile"))${NC}"
tail -5 /var/log/unleash-monitor.log 2>/dev/null || echo " (no log entries yet)"
tail -5 /var/log/runaway-monitor.log 2>/dev/null || echo " (no log entries yet)"
else
echo -e "${YEL}Monitor not running${NC}"
fi
+3 -3
View File
@@ -1,6 +1,6 @@
cmd_predict() {
header "unleash predict — Serial Number Lookup"
header "runaway predict — Serial Number Lookup"
local serial=""
serial=$(ioreg -rd1 -c IOPlatformExpertDevice 2>/dev/null | grep -i "IOPlatformSerialNumber" | awk -F'"' '{print $4}' || echo "")
@@ -12,7 +12,7 @@ cmd_predict() {
read -r -p "Enter serial number (or press Enter to skip): " serial
fi
if [ -z "$serial" ]; then
info "No serial provided. Run: ./unleash predict <serial>"
info "No serial provided. Run: ./runaway predict <serial>"
return 0
fi
@@ -44,7 +44,7 @@ ORGS
org_name=$(echo "$match" | cut -d: -f2)
echo -e "${YEL}⚠ Predicted enrollment: $org_name${NC}"
info "This serial prefix is commonly associated with $org_name-managed devices."
info "Remediation: sudo ./unleash remediate"
info "Remediation: sudo ./runaway remediate"
else
info "No known association for this serial prefix."
info "The device may be from a smaller org or not organizationally enrolled."
+1 -1
View File
@@ -14,7 +14,7 @@ ORGS
}
cmd_remediate() {
header "unleash remediate — Per-Org MDM Cleanup"
header "runaway remediate — Per-Org MDM Cleanup"
local org="${1:-auto}"
+16 -16
View File
@@ -3,7 +3,7 @@ generate_report() {
generate_report_json
return
fi
header "Unleash System Report"
header "Runaway System Report"
local ts
ts=$(date '+%Y-%m-%d %H:%M:%S')
@@ -46,29 +46,29 @@ generate_report() {
if command -v pfctl &>/dev/null; then
pfctl -si 2>/dev/null | grep -E "Status|Enabled" || echo " pf not enabled"
echo ""
pfctl -a "com.unleash/mdm" -s rules 2>/dev/null \
&& echo " Unleash MDM anchor: active" \
|| echo " Unleash MDM anchor: not loaded"
pfctl -a "com.unleash.selective" -s rules 2>/dev/null \
&& echo " Unleash selective anchor: active" \
|| echo " Unleash selective anchor: not loaded"
pfctl -a "com.runaway/mdm" -s rules 2>/dev/null \
&& echo " Runaway MDM anchor: active" \
|| echo " Runaway MDM anchor: not loaded"
pfctl -a "com.runaway.selective" -s rules 2>/dev/null \
&& echo " Runaway selective anchor: active" \
|| echo " Runaway selective anchor: not loaded"
fi
echo ""
step "Persistence"
[ -f "/Library/LaunchDaemons/com.unleash.heal.plist" ] \
[ -f "/Library/LaunchDaemons/com.runaway.heal.plist" ] \
&& echo " heal LaunchDaemon: installed" \
|| echo " heal LaunchDaemon: not installed"
[ -f "/Library/LaunchDaemons/com.unleash.monitor.plist" ] \
[ -f "/Library/LaunchDaemons/com.runaway.monitor.plist" ] \
&& echo " monitor LaunchDaemon: installed" \
|| echo " monitor LaunchDaemon: not installed"
[ -f "/tmp/unleash-monitor.pid" ] \
[ -f "/tmp/runaway-monitor.pid" ] \
&& echo " monitor process: running" \
|| echo " monitor process: not running"
echo ""
step "Recent Events"
for logfile in /var/log/unleash-monitor.log /var/log/unleash-heal.log; do
for logfile in /var/log/runaway-monitor.log /var/log/runaway-heal.log; do
if [ -f "$logfile" ] && [ -s "$logfile" ]; then
echo " From $(basename "$logfile"):"
tail -3 "$logfile" | sed 's/^/ /'
@@ -125,11 +125,11 @@ generate_report_json() {
report="${report} \"installed_profiles\": $profile_count,\n"
local heal_installed="false"
[ -f "/Library/LaunchDaemons/com.unleash.heal.plist" ] && heal_installed="true"
[ -f "/Library/LaunchDaemons/com.runaway.heal.plist" ] && heal_installed="true"
local monitor_installed="false"
[ -f "/Library/LaunchDaemons/com.unleash.monitor.plist" ] && monitor_installed="true"
[ -f "/Library/LaunchDaemons/com.runaway.monitor.plist" ] && monitor_installed="true"
local monitor_running="false"
[ -f "/tmp/unleash-monitor.pid" ] && monitor_running="true"
[ -f "/tmp/runaway-monitor.pid" ] && monitor_running="true"
report="${report} \"persistence\": {\n"
report="${report} \"heal_launchdaemon\": $heal_installed,\n"
report="${report} \"monitor_launchdaemon\": $monitor_installed,\n"
@@ -137,11 +137,11 @@ generate_report_json() {
report="${report} },\n"
local fw_active="false"
if command -v pfctl &>/dev/null && pfctl -a "com.unleash/mdm" -s rules 2>/dev/null | grep -q "block"; then
if command -v pfctl &>/dev/null && pfctl -a "com.runaway/mdm" -s rules 2>/dev/null | grep -q "block"; then
fw_active="true"
fi
local selective_active="false"
if command -v pfctl &>/dev/null && pfctl -a "com.unleash.selective" -s rules 2>/dev/null | grep -q "block"; then
if command -v pfctl &>/dev/null && pfctl -a "com.runaway.selective" -s rules 2>/dev/null | grep -q "block"; then
selective_active="true"
fi
report="${report} \"firewall\": {\n"
+8 -8
View File
@@ -1,4 +1,4 @@
GPG_KEY_URL="https://raw.githubusercontent.com/mateussiqueira/unleash/main/.github/unleash.gpg"
GPG_KEY_URL="https://raw.githubusercontent.com/mateussiqueira/runaway/main/.github/runaway.gpg"
import_gpg_key() {
local tmp_key
@@ -30,13 +30,13 @@ verify_gpg_signature() {
}
do_self_update() {
header "Unleash Update"
header "Runaway Update"
if ! command -v curl &>/dev/null; then
error_exit "curl required for update"
fi
local repo="mateussiqueira/unleash"
local repo="mateussiqueira/runaway"
local api_url="https://api.github.com/repos/${repo}/releases/latest"
local tmp_dir
tmp_dir=$(mktemp -d)
@@ -62,11 +62,11 @@ do_self_update() {
info "Updating from v$VERSION to v$latest_tag..."
begin "Downloading latest unleash"
local dl_url="https://raw.githubusercontent.com/${repo}/main/unleash"
begin "Downloading latest runaway"
local dl_url="https://raw.githubusercontent.com/${repo}/main/runaway"
local sig_url="${dl_url}.sig"
local tmp="$tmp_dir/unleash"
local sig_tmp="$tmp_dir/unleash.sig"
local tmp="$tmp_dir/runaway"
local sig_tmp="$tmp_dir/runaway.sig"
if curl -sL "$dl_url" -o "$tmp" && [ -s "$tmp" ]; then
curl -sL "$sig_url" -o "$sig_tmp" 2>/dev/null || true
end_ok
@@ -87,7 +87,7 @@ do_self_update() {
end_fail; error_exit "Downloaded script has syntax errors"
fi
local target="${0:-unleash}"
local target="${0:-runaway}"
if [ ! -w "$target" ]; then
info "$target not writable, trying sudo..."
cp "$tmp" "$target" 2>/dev/null || sudo cp "$tmp" "$target" 2>/dev/null || {
+6 -6
View File
@@ -1,6 +1,6 @@
cmd_suggest() {
header "unleash suggest — Risk-Based Recommendations"
header "runaway suggest — Risk-Based Recommendations"
local score=0
local recommendations=""
@@ -14,8 +14,8 @@ cmd_suggest() {
recommendations="$recommendations\n - Run 'check' for pre-format safety report"
else
info "System is booted normally"
recommendations="$recommendations\n - Run 'sudo ./unleash heal' to check MDM state"
recommendations="$recommendations\n - Run 'sudo ./unleash audit' for deep scan"
recommendations="$recommendations\n - Run 'sudo ./runaway heal' to check MDM state"
recommendations="$recommendations\n - Run 'sudo ./runaway audit' for deep scan"
fi
local cfg_dir="/private/var/db/ConfigurationProfiles/Settings"
@@ -33,11 +33,11 @@ cmd_suggest() {
else
echo -e "${YEL}⚠ MDM domains not blocked${NC}"
score=$((score + 5))
recommendations="$recommendations\n - Run 'sudo ./unleash firewall' for pf-level block"
recommendations="$recommendations\n - Run 'sudo ./runaway firewall' for pf-level block"
fi
if command -v pfctl &>/dev/null; then
if pfctl -a "com.unleash/mdm" -s rules 2>/dev/null | grep -q "block"; then
if pfctl -a "com.runaway/mdm" -s rules 2>/dev/null | grep -q "block"; then
echo -e "${GRN}✓ pf firewall active${NC}"
fi
fi
@@ -46,7 +46,7 @@ cmd_suggest() {
local ma_result=$?
if [ "$ma_result" -ne 0 ]; then
score=$((score + 8))
recommendations="$recommendations\n - Run 'sudo ./unleash harden' to clean user artifacts"
recommendations="$recommendations\n - Run 'sudo ./runaway harden' to clean user artifacts"
fi
detect_configurator_enrollment
+6 -6
View File
@@ -6,7 +6,7 @@ _restore_rosetta_hosts() {
local hosts="$1" tmp_hosts
tmp_hosts=$(mktemp "${hosts}.XXXXXX") || return 1
if ! cp -p "$hosts" "$tmp_hosts" || ! awk '
$0=="# Added by unleash — DEP enrollment block" { owned=1; print; next }
$0=="# Added by runaway — DEP enrollment block" { owned=1; print; next }
owned && /^(0[.]0[.]0[.]0|::)[[:space:]]+configuration[.]apple[.]com[[:space:]]*$/ { next }
owned && $0 !~ /^(0[.]0[.]0[.]0|::)[[:space:]]+[[:alnum:]_.-]+[[:space:]]*$/ { owned=0 }
{ print }
@@ -18,11 +18,11 @@ _restore_rosetta_hosts() {
rm -f "$tmp_hosts"
return 0
fi
if [ ! -e "$hosts.unleash-rosetta.bak" ]; then
cp -p "$hosts" "$hosts.unleash-rosetta.bak" || { rm -f "$tmp_hosts"; return 1; }
if [ ! -e "$hosts.runaway-rosetta.bak" ]; then
cp -p "$hosts" "$hosts.runaway-rosetta.bak" || { rm -f "$tmp_hosts"; return 1; }
fi
mv "$tmp_hosts" "$hosts" || { rm -f "$tmp_hosts"; return 1; }
info "Removed old Unleash Rosetta blocks; backup: $hosts.unleash-rosetta.bak"
info "Removed old Runaway Rosetta blocks; backup: $hosts.runaway-rosetta.bak"
}
suppress_enrollment() {
@@ -59,9 +59,9 @@ suppress_enrollment() {
step "Blocking enrollment domains (Data volume hosts)..."
[ -f "$hosts" ] || { mkdir -p "$(dirname "$hosts")"; touch "$hosts"; }
_restore_rosetta_hosts "$hosts" || error_exit "Could not repair old Rosetta hosts blocks."
grep -q "Added by unleash" "$hosts" 2>/dev/null || {
grep -q "Added by runaway" "$hosts" 2>/dev/null || {
echo "" >>"$hosts"
echo "# Added by unleash — DEP enrollment block" >>"$hosts"
echo "# Added by runaway — DEP enrollment block" >>"$hosts"
}
local domains=(
+3 -3
View File
@@ -1,5 +1,5 @@
TELEMETRY_FILE="$HOME/.unleash-telemetry"
TELEMETRY_FILE="$HOME/.runaway-telemetry"
telemetry_opt_in() {
local val="${1:-}"
@@ -13,7 +13,7 @@ telemetry_opt_in() {
local current="disabled"
[ -f "$TELEMETRY_FILE" ] && current="enabled"
info "Telemetry: $current"
info "Usage: sudo ./unleash telemetry on|off"
info "Usage: sudo ./runaway telemetry on|off"
fi
}
@@ -26,7 +26,7 @@ telemetry_send() {
telemetry_is_enabled || return 0
local event="$1"
local data="${2:-{}}"
local url="https://unleash-telemetry.mateussiqueira.workers.dev/event"
local url="https://runaway-telemetry.mateussiqueira.workers.dev/event"
local payload
payload=$(printf '{"event":"%s","version":"%s","arch":"%s","os":"%s","data":%s}' \
"$event" "$VERSION" "$(uname -m)" "$(uname -s)" "$data")
+14 -14
View File
@@ -1,12 +1,12 @@
do_uninstall() {
header "Unleash — Full Uninstall"
header "Runaway — Full Uninstall"
if ! is_root; then
error_exit "Uninstall needs sudo: sudo ./unleash uninstall"
error_exit "Uninstall needs sudo: sudo ./runaway uninstall"
fi
begin "Removing heal LaunchDaemon"
local plist="/Library/LaunchDaemons/com.unleash.heal.plist"
local plist="/Library/LaunchDaemons/com.runaway.heal.plist"
if [ -f "$plist" ]; then
launchctl unload "$plist" 2>/dev/null || true
rm -f "$plist"
@@ -16,7 +16,7 @@ do_uninstall() {
fi
begin "Removing monitor LaunchDaemon"
plist="/Library/LaunchDaemons/com.unleash.monitor.plist"
plist="/Library/LaunchDaemons/com.runaway.monitor.plist"
if [ -f "$plist" ]; then
launchctl unload "$plist" 2>/dev/null || true
rm -f "$plist"
@@ -26,17 +26,17 @@ do_uninstall() {
fi
begin "Cleaning pf anchors"
local anchors=("/etc/pf.anchors/com.unleash/mdm" "/etc/pf.anchors/com.unleash.selective")
local anchors=("/etc/pf.anchors/com.runaway/mdm" "/etc/pf.anchors/com.runaway.selective")
for a in "${anchors[@]}"; do
[ -f "$a" ] && rm -f "$a"
done
for anchor_name in "com.unleash/mdm" "com.unleash.selective"; do
for anchor_name in "com.runaway/mdm" "com.runaway.selective"; do
pfctl -a "$anchor_name" -F all 2>/dev/null || true
done
local pf_conf="/etc/pf.conf"
if [ -f "$pf_conf" ]; then
sed -i '' '/# Added by unleash/d' "$pf_conf" 2>/dev/null || true
sed -i '' '/com\.unleash/d' "$pf_conf" 2>/dev/null || true
sed -i '' '/# Added by runaway/d' "$pf_conf" 2>/dev/null || true
sed -i '' '/com\.runaway/d' "$pf_conf" 2>/dev/null || true
fi
pfctl -f /etc/pf.conf 2>/dev/null || true
end_ok
@@ -44,7 +44,7 @@ do_uninstall() {
begin "Cleaning hosts entries"
local hosts="/private/etc/hosts"
if [ -f "$hosts" ]; then
sed -i '' '/# Added by unleash/d' "$hosts" 2>/dev/null || true
sed -i '' '/# Added by runaway/d' "$hosts" 2>/dev/null || true
local domains=("iprofiles.apple.com" "deviceenrollment.apple.com" "mdmenrollment.apple.com")
for d in "${domains[@]}"; do
sed -i '' "/[[:space:]]$d/d" "$hosts" 2>/dev/null || true
@@ -68,7 +68,7 @@ do_uninstall() {
fi
begin "Removing backup directory"
local backup=".unleash-backup"
local backup=".runaway-backup"
if [ -d "$backup" ]; then
rm -rf "$backup" 2>/dev/null || true
end_ok
@@ -77,15 +77,15 @@ do_uninstall() {
fi
begin "Removing config file"
if [ -f "$HOME/.unleash.conf" ]; then
rm -f "$HOME/.unleash.conf"
if [ -f "$HOME/.runaway.conf" ]; then
rm -f "$HOME/.runaway.conf"
end_ok
else
end_fail; echo " Not found"
fi
begin "Stopping monitor if running"
local pidfile="/tmp/unleash-monitor.pid"
local pidfile="/tmp/runaway-monitor.pid"
if [ -f "$pidfile" ]; then
kill "$(cat "$pidfile")" 2>/dev/null || true
rm -f "$pidfile"
@@ -97,5 +97,5 @@ do_uninstall() {
echo ""
success "Uninstall complete"
info "Your system is back to its original state."
info "The unleash script itself was not removed."
info "The runaway script itself was not removed."
}
+10 -10
View File
@@ -1,11 +1,11 @@
VPN_RULES_ANCHOR="com.unleash/vpn-kill"
VPN_RULES_FILE="/etc/pf.anchors/com.unleash/vpn-kill"
VPN_RULES_ANCHOR="com.runaway/vpn-kill"
VPN_RULES_FILE="/etc/pf.anchors/com.runaway/vpn-kill"
vpn_kill_install() {
header "VPN Kill-Switch — MDM Leak Protection"
if ! is_root; then
error_exit "VPN kill-switch needs sudo: sudo ./unleash vpn-kill"
error_exit "VPN kill-switch needs sudo: sudo ./runaway vpn-kill"
fi
local vpn_if=""
@@ -15,7 +15,7 @@ vpn_kill_install() {
interfaces=$(ifconfig 2>/dev/null | grep -E "^utun[0-9]+:" | sed 's/:.*//' || true)
if [ -z "$interfaces" ]; then
warn "No VPN interfaces detected"
info "You can specify manually: sudo ./unleash vpn-kill --interface utunX"
info "You can specify manually: sudo ./runaway vpn-kill --interface utunX"
info "Common VPN interfaces: utun0-9 (WireGuard), utun10+ (OpenVPN), ppp0 (L2TP)"
else
for iface in $interfaces; do
@@ -33,16 +33,16 @@ vpn_kill_install() {
if [ -z "$vpn_if" ]; then
warn "No active VPN detected. Installing kill-switch anyway (no default route)."
info "Usage: sudo ./unleash vpn-kill --interface utunX"
info "Usage: sudo ./runaway vpn-kill --interface utunX"
return 1
fi
step "Installing pf rules for VPN kill-switch..."
local anchor_dir="/etc/pf.anchors/com.unleash"
local anchor_dir="/etc/pf.anchors/com.runaway"
mkdir -p "$anchor_dir"
cat > "$VPN_RULES_FILE" << RULES
# Unleash VPN kill-switch
# Runaway VPN kill-switch
# Only allow MDM traffic through VPN interface $vpn_if
block drop out proto {tcp,udp} to {17.0.0.0/8, 17.128.0.0/10}
pass out proto {tcp,udp} to {17.0.0.0/8, 17.128.0.0/10} no state
@@ -58,7 +58,7 @@ RULES
if grep -q "vpn-kill" "$pf_conf" 2>/dev/null; then
info "pf.conf already has VPN kill-switch anchor"
else
printf '\n%s\n%s\n%s\n' "# Added by unleash — VPN kill-switch (prevents MDM leaks)" "$anchor_line" "$load_line" >> "$pf_conf"
printf '\n%s\n%s\n%s\n' "# Added by runaway — VPN kill-switch (prevents MDM leaks)" "$anchor_line" "$load_line" >> "$pf_conf"
fi
if pfctl -e -f "$pf_conf" 2>/dev/null; then
@@ -81,7 +81,7 @@ vpn_kill_remove() {
header "Remove VPN Kill-Switch"
if ! is_root; then
error_exit "Needs sudo: sudo ./unleash vpn-kill-remove"
error_exit "Needs sudo: sudo ./runaway vpn-kill-remove"
fi
if [ -f "$VPN_RULES_FILE" ]; then
@@ -91,7 +91,7 @@ vpn_kill_remove() {
local pf_conf="/etc/pf.conf"
if [ -f "$pf_conf" ]; then
sed -i '' '/# Added by unleash — VPN kill-switch/d' "$pf_conf" 2>/dev/null || true
sed -i '' '/# Added by runaway — VPN kill-switch/d' "$pf_conf" 2>/dev/null || true
sed -i '' '/vpn-kill/d' "$pf_conf" 2>/dev/null || true
success "pf.conf cleaned"
fi
+8 -8
View File
@@ -8,7 +8,7 @@ install_selective_block() {
step "Installing selective pf rules (block MDM only, allow Apple services)..."
local anchor_dir="${root}/etc/pf.anchors"
local anchor_file="${anchor_dir}/com.unleash.selective"
local anchor_file="${anchor_dir}/com.runaway.selective"
mkdir -p "$anchor_dir"
: > "$anchor_file"
@@ -26,14 +26,14 @@ install_selective_block() {
success "Selective anchor written: $anchor_file"
local pf_conf="${root}/etc/pf.conf"
local anchor_line="anchor \"com.unleash.selective\""
local load_line="load anchor \"com.unleash.selective\" from \"${anchor_file}\""
local anchor_line="anchor \"com.runaway.selective\""
local load_line="load anchor \"com.runaway.selective\" from \"${anchor_file}\""
if [ -f "$pf_conf" ]; then
if grep -q "com.unleash.selective" "$pf_conf" 2>/dev/null; then
if grep -q "com.runaway.selective" "$pf_conf" 2>/dev/null; then
info "pf.conf already has selective anchor"
else
printf '\n%s\n%s\n%s\n' "# Added by unleash — selective MDM block (iCloud-safe)" "$anchor_line" "$load_line" >> "$pf_conf"
printf '\n%s\n%s\n%s\n' "# Added by runaway — selective MDM block (iCloud-safe)" "$anchor_line" "$load_line" >> "$pf_conf"
success "pf.conf updated with selective rules"
fi
else
@@ -45,7 +45,7 @@ dummynet-anchor "com.apple/*"
fwd-anchor "com.apple/*"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
# Added by unleash — selective MDM block (iCloud-safe)
# Added by runaway — selective MDM block (iCloud-safe)
${anchor_line}
${load_line}
EOF
@@ -67,7 +67,7 @@ restore_hosts_based_block() {
[ -n "$data_mount" ] && root="$data_mount"
local hosts="${root}/private/etc/hosts"
if [ -f "$hosts" ] && grep -q "Added by unleash" "$hosts" 2>/dev/null; then
info "unleash hosts entries intact"
if [ -f "$hosts" ] && grep -q "Added by runaway" "$hosts" 2>/dev/null; then
info "runaway hosts entries intact"
fi
}