This file contains hidden or 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 | |
from macholib import MachO | |
import macholib | |
import os | |
import sys | |
path = sys.argv[1] | |
for root, dirs, files in os.walk(path): |
This file contains hidden or 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
sudo /usr/libexec/PlistBuddy -x -c 'Print :ShadowHashData' /var/db/dslocal/nodes/Default/users/root.plist | awk '/\t[^\<]/{print $1}' | base64 -D | plutil -convert xml1 -o - -- - | python -c 'import plistlib; import sys; plist = plistlib.readPlistFromString(sys.stdin.read()); print plist["SALTED-SHA512-PBKDF2"]["iterations"]' |
This file contains hidden or 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
"./Library/Documentation/License.lpdf/Contents/Resources/Dutch.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/English.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/French.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/German.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/Italian.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/Japanese.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/Spanish.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/ar.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/ca.lproj/License.pdf" | |
"./Library/Documentation/License.lpdf/Contents/Resources/cs.lproj/License.pdf" |
This file contains hidden or 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
<?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>KeepAlive</key> | |
<dict> | |
<key>PathState</key> | |
<dict> | |
<key>/Library/Managed Preferences/org.my.push.plist</key> | |
<true/> |
This file contains hidden or 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 | |
import xml.etree.ElementTree as ET | |
import requests | |
import uuid | |
params = {'cup2hreq': 'foo', 'cup2key': 'bar'} | |
platform = 'mac' | |
os_version = '10.12' |
This file contains hidden or 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 hidden or 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 -x | |
# Wait for networking to be up, just in case | |
/usr/sbin/ipconfig waitall | |
# Loop on the presence of the standard Apple ruleset before proceeding | |
# This way we don't accidentally get overruled (SWIDT) if com.apple.pfctl | |
# happens to be loaded after myorg.pf. | |
count=0 | |
while [[ $(pfctl -sr 2>&1 | egrep "apple" | wc -l) -eq 0 && $count -lt 12 ]]; do |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>myorg.pf.plist</string> | |
<key>Program</key> | |
<string>/usr/local/bin/pfstart.sh</string> | |
<key>ProgramArguments</key> | |
<array> |
This file contains hidden or 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
anchor "myorg.pf" | |
load anchor "myorg.pf" from "/etc/pf.anchors/myorg.pf.rules" |
This file contains hidden or 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
# Allow trusted addresses to get to SSH and Apple remote desktop. | |
# Ports filtered - add more ports to allow more services as needed | |
# 22/tcp: ssh | |
# 3283/tcp: Apple Remote Desktop | |
# 3283/udp: Apple Remote Desktop | |
# 5900/tcp: Apple Remote Desktop/VNC | |
incoming_services_tcp = "{ 22, 3283, 5900 }" | |
incoming_services_udp = "{ 3283 }" |
NewerOlder