Skip to content

Instantly share code, notes, and snippets.

View n0kovo's full-sized avatar
💭
I'm not an AI-bro, I swear!

n0kovo n0kovo

💭
I'm not an AI-bro, I swear!
View GitHub Profile
@n0kovo
n0kovo / dbgsign.sh
Last active September 8, 2026 00:45
Allow debugging binaries on macOS
#!/usr/bin/env zsh
_dbgsign_ents() { # $1 = target, $2 = output plist, uses $ents
print -u2 -- "\nCleaning quarantine and extracting entitlements for: $1"
codesign -d --entitlements - --xml "$1" > "$2"
if [[ ! -s $2 ]] || ! /usr/libexec/PlistBuddy -c Print "$2"; then
print -r -- '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict/></plist>' > "$2"
fi