mkdir -p /opt/scripts
mkdir -p /var/log/custom
mkdir -p /var/root/Library/LaunchAgents
curl 'https://gist.githubusercontent.com/heywoodlh/0295135b9e24ec0729571497c9ab5a77/raw/b3032d9a563c956f574176c39cb2a5382f8c579c/auth-log.sh' -o /opt/scripts/auth-log.sh
chmod +x /opt/scripts/auth-log.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Requires passlib: pip install passlib | |
from passlib.hash import pbkdf2_sha512 | |
from passlib.util import ab64_decode | |
from biplist import * | |
# Checksum size must be 128 bytes for use as OS X password hash! | |
pbkdf2_sha512.checksum_size = 128 | |
hash = pbkdf2_sha512.encrypt("password", rounds=38000, salt_size=32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAKE := make --no-print-directory | |
DESCRIBE := $(shell git describe --match "v*" --always --tags) | |
DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE)) | |
VERSION_TAG := $(word 1,$(DESCRIBE_PARTS)) | |
COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS)) | |
VERSION := $(subst v,,$(VERSION_TAG)) | |
VERSION_PARTS := $(subst ., ,$(VERSION)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# User path | |
/usr/bin/getconf DARWIN_USER_DIR | |
# Temp directory | |
# Note - $TMPDIR is the same as this | |
/usr/bin/getconf DARWIN_USER_TEMP_DIR | |
# Cache directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#kcpasswordEncode (20210911) Copyright (c) 2021 Joel Bruner (https://github.com/brunerd) | |
#Licensed under the MIT License | |
#given a string creates data for /etc/kcpassword | |
function kcpasswordEncode { | |
#ascii string | |
local thisString="${1}" | |
local i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import objc | |
from Foundation import NSBundle | |
IOKit_bundle = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit') | |
functions = [ | |
("IORegistryEntryFromPath", b"II*"), | |
("IORegistryEntryCreateCFProperty", b"@I@@I"), | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
## -----------------------------=[ WARNING ]=-------------------------------- ## | |
# | |
# This script is now woefully out of date due to which accounts ESXi allows to | |
# ssh into the box as well as sticky folders/file flags. | |
# I've since ported the whole thing to python with a lot of bells and whistles | |
# and if i get around to making it public, i'll put a link here. | |
# | |
## -------------------------------=[ Info ]=--------------------------------- ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/munki/munki-python | |
import plistlib, os.path, os, logging, pprint | |
# Based off of https://forums.developer.apple.com/message/6741 | |
# and http://apple.stackexchange.com/a/136976 | |
# Downloaded from https://gist.github.com/pudquick/349f063c242239952a2e | |
log_fmt = "[%(asctime)s] [%(levelname)-8s] %(message)s" | |
logging.basicConfig(format=log_fmt, level=logging.DEBUG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# As written, this requires the following: | |
# - OS X 10.6+ (tested on 10.12.6 and 10.14.3) | |
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6) | |
# - pyObjC (as such, recommended to be used with native OS X python install) | |
# Run with root | |
import objc, ctypes.util, os.path, collections |
Current version: 1.0.15 (as of last document update)
NewerOlder