Skip to content

Instantly share code, notes, and snippets.

View jhbush's full-sized avatar

Jason Bush jhbush

  • Coffee Cats Consulting
  • San Francisco Bay Area
  • 23:08 (UTC -08:00)
  • LinkedIn in/bushjason
View GitHub Profile
@knightsc
knightsc / XProtect_2116_hashes.txt
Created March 20, 2020 11:09
Hashes matching yara rules from XProtect 2116
XProtect_MACOS_c592675:060bd0a09a691faa3067a12fbcde5f451b16bd7315cd238a86c9c8b9a333c477
XProtect_MACOS_c592675:08c8d9abe018454a183bfb0728a13f636f03fde01d01ab0ef5d4b6d1a4f8b42a
XProtect_MACOS_c592675:3def33ba228d576e67d09b6190fd5f58af469f81a4a705649535d362fd2e3300
XProtect_MACOS_c592675:89e5969a9afecb010748b085256e1759e633cf002639b4ac48a2e7dc0bc523ed
XProtect_MACOS_c592675:a609bd94f385cbe30bffa47c32bc6033775d2101824c4c434eb118482809c065
XProtect_MACOS_c592675:b4738580705c0d7fd1eaeeff1868abd2d5f613183df198e62feca5bd05979911
XProtect_MACOS_c592675:f8abf262193194089906623461957c308be579cfb542f4658b31cc35bc3979fc
<?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>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDisplayName</key>
<string>ManagedClient logging</string>
<key>PayloadEnabled</key>
@scriptingosx
scriptingosx / pkgAndNotarize.sh
Created September 10, 2019 12:46
Script that builds, packages and notarizes an Xcode command line tool.
#!/bin/zsh
# pkgAndNotarize.sh
# 2019 - Armin Briegel - Scripting OS X
# place a copy of this script in in the project folder
# when run it will build for installation,
# create a pkg from the product,
# upload the pkg for notarization and monitor the notarization status
@talkingmoose
talkingmoose / Set Computer PreStage Scope.bash
Last active February 4, 2025 02:05
As of Jamf Pro 10.14, the Jamf Pro API (/uapi) allows access to create and update scopes for computer PreStage Enrollments. Edit the information at the top and include a list of computer serial numbers for the COMPLETE scope. (The script replaces the scope list; it doesn't update.) Be sure to leave the opening and closing parentheses.
#!/bin/bash
# server connection information
URL="https://talkingmoose.jamfcloud.com"
username="API-Editor"
password="P@55w0rd"
# provide the Jamf Pro ID of the PreStage Enrollment; look in the URL when viewing the PreStage Enrollment
prestageID="1"
@stevemoser
stevemoser / IncompatibleAppsList.plist
Created June 20, 2019 19:38
List of 235 apps incompatible with macOS Catalina 10.15
<?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>
<key>IncompatiblePaths</key>
<array>
<dict>
<key>Application Name</key>
<string>Sxs Memory Card Driver</string>
<key>Blurb</key>
@scriptingosx
scriptingosx / bash_prompt.sh
Last active June 23, 2022 19:13
Sample code for dynamic bash prompt that shows exit codes.
# PROMPT
# default macOS prompt is: \h:\W \u\$
# assemble the prompt string PS1
# inspired from: https://stackoverflow.com/a/16715681
function __build_prompt {
local EXIT="$?" # store current exit code
# define some colors
#!/usr/bin/python
"""
this code will run through all installed apps, which are locally installed
and generate a CSV file on your desktop listing all 32bit apps
"""
import subprocess
import plistlib
import csv
#!/bin/bash
# This script requires jq to run, you can install it via "brew install jq"
# This script uses the Bearer token authentication scheme which is only available in Jamf Pro 10.8 or later
# If used with a version of Jamf Pro Prior to 10.8 replace "Bearer" with "jamf-token"
# Postman collection: The three requests below are availalbe in a postman collection.
# they can be imported to Postman via copying the link and clicking the "import" button
# in the top left of Postman. https://www.getpostman.com/collections/d5fc7ae84e9471817539
@haircut
haircut / tcc-reset.py
Last active December 17, 2024 16:38
Completely reset TCC services database in macOS
#!/usr/bin/python
"""
Completely reset TCC services database in macOS
Note: Both the system and individual users have TCC databases; run the script as both
a user and as root to completely reset TCC decisions at all levels.
2018-08-15: Resetting the 'Location' service fails; unknown cause
2018-08-16: Confirmed the 'All' service does not really reset _all_
services, so individual calls to each service is necessary.