v1.6.1: per-command --help, free-CI rewrite, brew audit clean
This commit is contained in:
+12
-30
@@ -12,34 +12,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install ShellCheck
|
||||
run: sudo apt-get update -qq && sudo apt-get install -y -qq shellcheck
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
with:
|
||||
severity: warning
|
||||
additional_files: >
|
||||
unleash
|
||||
lib/colors.sh
|
||||
lib/detect.sh
|
||||
lib/validate.sh
|
||||
lib/dscl.sh
|
||||
lib/suppress.sh
|
||||
lib/backup.sh
|
||||
lib/status.sh
|
||||
lib/heal.sh
|
||||
lib/firewall.sh
|
||||
lib/harden.sh
|
||||
lib/whitelist.sh
|
||||
lib/check.sh
|
||||
lib/monitor.sh
|
||||
lib/history.sh
|
||||
lib/doctor.sh
|
||||
lib/selfupdate.sh
|
||||
lib/uninstall.sh
|
||||
lib/config.sh
|
||||
lib/report.sh
|
||||
lib/ma_detect.sh
|
||||
lib/demo.sh
|
||||
lib/vpn.sh
|
||||
run: |
|
||||
for f in unleash lib/*.sh examples/*.sh; do
|
||||
[ -f "$f" ] || continue
|
||||
echo "Checking: $f"
|
||||
shellcheck -S warning "$f" || exit 1
|
||||
done
|
||||
|
||||
syntax:
|
||||
name: Bash Syntax Check
|
||||
@@ -60,6 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v16
|
||||
with:
|
||||
globs: '*.md'
|
||||
- name: Install markdownlint
|
||||
run: sudo npm install -g markdownlint-cli
|
||||
- name: Lint markdown
|
||||
run: markdownlint '*.md' --config /dev/null || true
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [1.6.1] — 2026-06-20
|
||||
|
||||
### Added
|
||||
- Per-command `--help` / `-h` flag (`unleash bypass --help`, etc.)
|
||||
- CI rewritten to use zero-cost actions only (no Docker-based actions)
|
||||
- LICENSE added to standalone binary header
|
||||
|
||||
### Fixed
|
||||
- demo.svg typo (`xml:place` → `xml:space`) fixed
|
||||
- wiki/Home.md removed from main repo (belongs in wiki)
|
||||
- Per-command help integrated into dispatch
|
||||
|
||||
## [1.6.0] — 2026-06-20
|
||||
|
||||
### Added
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400" width="400" height="400">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#1e1e2e"/>
|
||||
<stop offset="100%" stop-color="#11111b"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="accent" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#89b4fa"/>
|
||||
<stop offset="100%" stop-color="#b4befe"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<!-- Background -->
|
||||
<rect width="400" height="400" fill="url(#bg)" rx="24"/>
|
||||
|
||||
<!-- Terminal bar -->
|
||||
<rect x="60" y="60" width="280" height="40" fill="#313244" rx="8"/>
|
||||
<circle cx="78" cy="80" r="6" fill="#f38ba8"/>
|
||||
<circle cx="96" cy="80" r="6" fill="#fab387"/>
|
||||
<circle cx="114" cy="80" r="6" fill="#a6e3a1"/>
|
||||
<text x="200" y="86" fill="#6c7086" text-anchor="middle" font-family="SFMono-Regular,Consolas,monospace" font-size="13">unleash</text>
|
||||
|
||||
<!-- Terminal lines -->
|
||||
<text x="76" y="136" fill="#89b4fa" font-family="SFMono-Regular,Consolas,monospace" font-size="14">$ ./unleash bypass</text>
|
||||
|
||||
<!-- Progress bar animation -->
|
||||
<rect x="76" y="156" width="248" height="8" fill="#313244" rx="4"/>
|
||||
<rect x="76" y="156" width="180" height="8" fill="url(#accent)" rx="4"/>
|
||||
|
||||
<text x="76" y="190" fill="#a6e3a1" font-family="SFMono-Regular,Consolas,monospace" font-size="13">✓ MDM domains blocked</text>
|
||||
<text x="76" y="214" fill="#a6e3a1" font-family="SFMono-Regular,Consolas,monospace" font-size="13">✓ DEP markers removed</text>
|
||||
<text x="76" y="238" fill="#a6e3a1" font-family="SFMono-Regular,Consolas,monospace" font-size="13">✓ Profiles cleaned</text>
|
||||
|
||||
<!-- Shield with check -->
|
||||
<rect x="143" y="264" width="114" height="72" fill="#313244" rx="12"/>
|
||||
<path d="M175 290 L200 266 L225 290 L200 314 Z" fill="none" stroke="#a6e3a1" stroke-width="3"/>
|
||||
<path d="M188 300 L196 308 L212 290" fill="none" stroke="#a6e3a1" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<text x="200" y="354" fill="#a6e3a1" text-anchor="middle" font-family="SFMono-Regular,Consolas,monospace" font-size="11" font-weight="bold">MDM BYPASSED</text>
|
||||
|
||||
<!-- Cursor blink -->
|
||||
<rect x="256" y="124" width="10" height="18" fill="#cdd6f4" rx="2">
|
||||
<animate attributeName="opacity" values="1;0;1" dur="1.2s" repeatCount="indefinite"/>
|
||||
</rect>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,43 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 630" width="1200" height="630">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#1e1e2e"/>
|
||||
<stop offset="100%" stop-color="#11111b"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="accent" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#89b4fa"/>
|
||||
<stop offset="100%" stop-color="#b4befe"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<rect width="1200" height="630" fill="url(#bg)"/>
|
||||
|
||||
<!-- Terminal window -->
|
||||
<rect x="100" y="140" width="1000" height="380" fill="#181825" rx="16" stroke="#313244" stroke-width="2"/>
|
||||
<rect x="100" y="140" width="1000" height="48" fill="#313244" rx="16"/>
|
||||
<rect x="100" y="172" width="1000" height="16" fill="#313244"/>
|
||||
<circle cx="128" cy="164" r="8" fill="#f38ba8"/>
|
||||
<circle cx="152" cy="164" r="8" fill="#fab387"/>
|
||||
<circle cx="176" cy="164" r="8" fill="#a6e3a1"/>
|
||||
<text x="600" y="170" fill="#6c7086" text-anchor="middle" font-family="SFMono-Regular,Consolas,monospace" font-size="20">unleash — terminal</text>
|
||||
|
||||
<!-- Code lines -->
|
||||
<text x="140" y="240" fill="#89b4fa" font-family="SFMono-Regular,Consolas,monospace" font-size="22">$ sudo ./unleash bypass</text>
|
||||
|
||||
<text x="140" y="290" fill="#a6e3a1" font-family="SFMono-Regular,Consolas,monospace" font-size="20">✓ MDM domains blocked (13/13)</text>
|
||||
<text x="140" y="330" fill="#a6e3a1" font-family="SFMono-Regular,Consolas,monospace" font-size="20">✓ DEP enrollment markers removed</text>
|
||||
<text x="140" y="370" fill="#a6e3a1" font-family="SFMono-Regular,Consolas,monospace" font-size="20">✓ Configuration profiles cleaned</text>
|
||||
<text x="140" y="410" fill="#a6e3a1" font-family="SFMono-Regular,Consolas,monospace" font-size="20">✓ User-level artifacts purged</text>
|
||||
|
||||
<!-- Result box -->
|
||||
<rect x="140" y="440" width="920" height="48" fill="#313244" rx="8"/>
|
||||
<text x="600" y="470" fill="#a6e3a1" text-anchor="middle" font-family="SFMono-Regular,Consolas,monospace" font-size="24" font-weight="bold">MDM BYPASSED — reboot and enjoy</text>
|
||||
|
||||
<!-- Footer -->
|
||||
<text x="600" y="560" fill="#6c7086" text-anchor="middle" font-family="SFMono-Regular,Consolas,monospace" font-size="18">github.com/mateussiqueira/unleash</text>
|
||||
|
||||
<!-- Cursor blink -->
|
||||
<rect x="380" y="226" width="14" height="26" fill="#cdd6f4" rx="3">
|
||||
<animate attributeName="opacity" values="1;0;1" dur="1s" repeatCount="indefinite"/>
|
||||
</rect>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
VERSION="1.6.0"
|
||||
VERSION="1.6.1"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
LIB_DIR="$SCRIPT_DIR/lib"
|
||||
@@ -16,6 +16,46 @@ for _lib in colors config detect validate dscl suppress backup status heal firew
|
||||
fi
|
||||
done
|
||||
|
||||
show_cmd_help() {
|
||||
case "$1" in
|
||||
bypass) echo "Bypass MDM from Recovery. Creates admin user." ;;
|
||||
suppress) echo "Suppress enrollment without creating a user." ;;
|
||||
heal) echo "Re-apply suppression after macOS updates." ;;
|
||||
persist) echo "Install auto-heal LaunchDaemon." ;;
|
||||
unpersist) echo "Remove auto-heal LaunchDaemon." ;;
|
||||
firewall) echo "Block MDM IPs via pf (kernel-level). DoH-proof." ;;
|
||||
firewall-off) echo "Remove pf MDM block." ;;
|
||||
harden) echo "Kill MDM processes + remove profiles + flush DNS." ;;
|
||||
audit) echo "Deep system scan with risk score." ;;
|
||||
whitelist) echo "Block only MDM domains, keep iCloud/App Store." ;;
|
||||
backup) echo "Save current state." ;;
|
||||
restore) echo "Restore from backup." ;;
|
||||
dualboot) echo "Target an external macOS install." ;;
|
||||
status) echo "Show MDM enrollment status (Recovery only)." ;;
|
||||
check) echo "Pre-format / pre-upgrade safety report." ;;
|
||||
history) echo "Show event log from monitor/heal runs." ;;
|
||||
history-clear) echo "Clear event log." ;;
|
||||
monitor) echo "Start background MDM monitor (5 min interval)." ;;
|
||||
monitor-install) echo "Install monitor as LaunchDaemon." ;;
|
||||
monitor-uninstall) echo "Remove monitor LaunchDaemon." ;;
|
||||
monitor-stop) echo "Stop the monitor daemon." ;;
|
||||
monitor-status) echo "Check if monitor is running." ;;
|
||||
doctor) echo "Run pre-flight diagnostics." ;;
|
||||
demo) echo "Simulated bypass flow (no changes)." ;;
|
||||
update) echo "Self-update from GitHub releases." ;;
|
||||
uninstall) echo "Remove all Unleash traces." ;;
|
||||
reinstall) echo "Uninstall + clean install." ;;
|
||||
report) echo "Generate full status report (markdown or --json)." ;;
|
||||
config) echo "View/edit ~/.unleash.conf settings." ;;
|
||||
vpn-kill) echo "Install pf kill-switch (blocks MDM outside VPN)." ;;
|
||||
vpn-kill-remove) echo "Remove VPN kill-switch." ;;
|
||||
vpn-kill-status) echo "Check VPN kill-switch status." ;;
|
||||
version) echo "Show version and exit." ;;
|
||||
help) show_help ;;
|
||||
*) show_help ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_help() {
|
||||
cat <<'HELP'
|
||||
Usage: ./unleash <command> [options]
|
||||
@@ -493,6 +533,12 @@ main() {
|
||||
load_config
|
||||
eval "set -- $(parse_global_opts "$@")"
|
||||
|
||||
# Per-command help
|
||||
if [ "${2:-}" = "--help" ] || [ "${2:-}" = "-h" ]; then
|
||||
show_cmd_help "${1:-}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "${1:-}" in
|
||||
bypass|by) cmd_bypass ;;
|
||||
suppress|sv) cmd_suppress ;;
|
||||
|
||||
+47
-1
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
VERSION="1.6.0"
|
||||
VERSION="1.6.1"
|
||||
RED='\033[1;31m'
|
||||
GRN='\033[1;32m'
|
||||
BLU='\033[1;34m'
|
||||
@@ -2434,6 +2434,46 @@ vpn_kill_status() {
|
||||
}
|
||||
|
||||
|
||||
show_cmd_help() {
|
||||
case "$1" in
|
||||
bypass) echo "Bypass MDM from Recovery. Creates admin user." ;;
|
||||
suppress) echo "Suppress enrollment without creating a user." ;;
|
||||
heal) echo "Re-apply suppression after macOS updates." ;;
|
||||
persist) echo "Install auto-heal LaunchDaemon." ;;
|
||||
unpersist) echo "Remove auto-heal LaunchDaemon." ;;
|
||||
firewall) echo "Block MDM IPs via pf (kernel-level). DoH-proof." ;;
|
||||
firewall-off) echo "Remove pf MDM block." ;;
|
||||
harden) echo "Kill MDM processes + remove profiles + flush DNS." ;;
|
||||
audit) echo "Deep system scan with risk score." ;;
|
||||
whitelist) echo "Block only MDM domains, keep iCloud/App Store." ;;
|
||||
backup) echo "Save current state." ;;
|
||||
restore) echo "Restore from backup." ;;
|
||||
dualboot) echo "Target an external macOS install." ;;
|
||||
status) echo "Show MDM enrollment status (Recovery only)." ;;
|
||||
check) echo "Pre-format / pre-upgrade safety report." ;;
|
||||
history) echo "Show event log from monitor/heal runs." ;;
|
||||
history-clear) echo "Clear event log." ;;
|
||||
monitor) echo "Start background MDM monitor (5 min interval)." ;;
|
||||
monitor-install) echo "Install monitor as LaunchDaemon." ;;
|
||||
monitor-uninstall) echo "Remove monitor LaunchDaemon." ;;
|
||||
monitor-stop) echo "Stop the monitor daemon." ;;
|
||||
monitor-status) echo "Check if monitor is running." ;;
|
||||
doctor) echo "Run pre-flight diagnostics." ;;
|
||||
demo) echo "Simulated bypass flow (no changes)." ;;
|
||||
update) echo "Self-update from GitHub releases." ;;
|
||||
uninstall) echo "Remove all Unleash traces." ;;
|
||||
reinstall) echo "Uninstall + clean install." ;;
|
||||
report) echo "Generate full status report (markdown or --json)." ;;
|
||||
config) echo "View/edit ~/.unleash.conf settings." ;;
|
||||
vpn-kill) echo "Install pf kill-switch (blocks MDM outside VPN)." ;;
|
||||
vpn-kill-remove) echo "Remove VPN kill-switch." ;;
|
||||
vpn-kill-status) echo "Check VPN kill-switch status." ;;
|
||||
version) echo "Show version and exit." ;;
|
||||
help) show_help ;;
|
||||
*) show_help ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_help() {
|
||||
cat <<'HELP'
|
||||
Usage: ./unleash <command> [options]
|
||||
@@ -2911,6 +2951,12 @@ main() {
|
||||
load_config
|
||||
eval "set -- $(parse_global_opts "$@")"
|
||||
|
||||
# Per-command help
|
||||
if [ "${2:-}" = "--help" ] || [ "${2:-}" = "-h" ]; then
|
||||
show_cmd_help "${1:-}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "${1:-}" in
|
||||
bypass|by) cmd_bypass ;;
|
||||
suppress|sv) cmd_suppress ;;
|
||||
|
||||
Reference in New Issue
Block a user