Skip to content

Instantly share code, notes, and snippets.

View nstrauss's full-sized avatar
💭
🐍 🏫 📡

Nathaniel Strauss nstrauss

💭
🐍 🏫 📡
View GitHub Profile
<?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>MultipleSessionEnabled</key>
<true/>
<key>PayloadDisplayName</key>
@nstrauss
nstrauss / loginwindow_events.py
Last active December 15, 2020 22:14 — forked from pudquick/loginwindow_events.py
Send polite Logout / "really" Logout / Restart / Shutdown Apple Events to loginwindow via python and pyObjC - Python 3
#!/usr/bin/python3
# Stolen entirely from Michael Lynn
# https://gist.github.com/pudquick/9683c333e73a82379b8e377eb2e6fc41
# Edited for Python 3
import struct
import objc
from Cocoa import NSAppleEventDescriptor
@nstrauss
nstrauss / mds_dep_enroll.log
Created August 10, 2020 17:30
Log file example for enrollment configuration helper script
Mon Aug 10 09:59:31 Starting enrollment configuration helper...
Mon Aug 10 09:59:31 Waiting for setup assistant...
Mon Aug 10 09:59:37 Setup assistant is up.
Mon Aug 10 09:59:37 OS version: 10.15.6
Mon Aug 10 09:59:37 OS build: 19G73
Mon Aug 10 09:59:37 Starting cycle 1...
Mon Aug 10 09:59:37 Checking power metrics...
Mon Aug 10 09:59:37 CPU thermal level: 60
Mon Aug 10 09:59:37 IO thermal level: 10
Mon Aug 10 09:59:38 Fan RPM: 3725.709961
## Where to find info and how to report on system extensions in macOS Catalina+
# Staged system extensions location in folder based on unique ID
/Library/SystemExtensions/
# Info on each
/Library/SystemExtensions/db.plist
Includes...
- state (enabled, activated, etc.)
- associated launchd plists
@nstrauss
nstrauss / PPPC_KEXT_MDM.txt
Last active January 4, 2021 20:04
PPPC and KEXT MDM policy locations
# Approved PPPC MDM overrides aggregated list
/Library/Application Support/com.apple.TCC/MDMOverrides.plist
# KEXT policies database
sudo sqlite3 /private/var/db/SystemPolicyConfiguration/KextPolicy
# Approved by MDM
SELECT team_id, bundle_id, allowed FROM kext_policy_mdm;
# Approved locally
@nstrauss
nstrauss / postinstall.sh
Created October 1, 2018 02:14
NoMAD Login AD postinstall example with KeychainAdd keys included
#!/bin/bash
# Preference key reference
# https://gitlab.com/orchardandgrove-oss/NoMADLogin-AD/wikis/Configuration/preferences
domain="domain.com"
background_image="/path/to/image.png"
keychain_add="TRUE"
logo="/path/to/logo.png"
# Set default AD domain
@nstrauss
nstrauss / postinstall.sh
Last active September 30, 2018 03:29
NoMAD Login AD postinstall example
#!/bin/bash
# Preference key reference
# https://gitlab.com/orchardandgrove-oss/NoMADLogin-AD/wikis/Configuration/preferences
domain="domain.com"
background_image="/path/to/image.png"
logo="/path/to/logo.png"
# Set default AD domain
defaults write /Library/Preferences/menu.nomad.login.ad.plist ADDomain "$domain"
@nstrauss
nstrauss / dacount.txt
Created June 12, 2018 21:41
iOS installed app count summer 2018
+---------------------------------------------------------------------------------------------------------------------------+----------+
| app_name | count(*) |
+---------------------------------------------------------------------------------------------------------------------------+----------+
| Self Service | 6241 |
| Drive | 5252 |
| NWEA Testing | 5191 |
| Book Creator | 5167 |
| TestNav
@nstrauss
nstrauss / console-ad
Created May 29, 2018 01:03
NoMAD Login authorization database mechanisms with KeychainAdd
<?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>class</key>
<string>evaluate-mechanisms</string>
<key>comment</key>
<string>Login mechanism based rule. Not for general use, yet.</string>
<key>created</key>
<real>520882179.73855001</real>