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 | |
| ######################################################################## | |
| # Author: Calum Hunter # | |
| # Date: 21/12/2016 # | |
| # Version: 0.7 # | |
| # Purpose: Fusion Drive Detection and general HD formatting before # | |
| # imaging tasks. # | |
| # # | |
| ######################################################################## |
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
| { | |
| "cache" => [ | |
| ] | |
| "dnsPublicAddressRanges" => [ | |
| ] | |
| "version" => 6 | |
| "serversRecentlySeen" => [ | |
| ] | |
| } | |
| sh-3.2# plutil -p /var/folders/yd/y87k7kk14494j_9c0y814r8c0000gp/C/com.apple.AssetCacheLocatorService/diskCache.plist |
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
| # Match our Model Identifier and determine eligibility based on what bundled software the machine came with | |
| case $getModel in | |
| iMac17,1|iMac16,2|iMac16,1|iMac15,1|iMac14,4|iMac14,3|iMac14,2|iMac14,1) # iMac's with iWork and iLife | |
| iwork=TRUE | |
| ilife=TRUE | |
| write_conditionals | |
| notify_success;; | |
| iMac13,1|iMac13,2|iMac12,1|iMac12,2) # iMacs with just iLife | |
| iwork=FALSE | |
| ilife=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 sqlite3 | |
| import sys | |
| import time | |
| import os | |
| import csv | |
| # Variables and paths | |
| DB_PATH = '/Library/Server/Alerts/alertData.db' |
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
| case $FIRST_CHAR in | |
| A) | |
| NUMBER=2 ;; | |
| B) | |
| NUMBER=3 ;; | |
| C) | |
| NUMBER=4 ;; | |
| D) | |
| NUMBER=5 ;; | |
| E) |
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 | |
| ## Start by loading up our ldap query variables | |
| SVC_ACCOUNT_NAME="Username" | |
| SVC_ACCOUNT_PASS="Password" | |
| DOMAIN="my.domain" | |
| LDAP_SERVER="dc.my.domain:389" | |
| SEARCH_BASE="OU=Users,DC=My,DC=Domain" | |
| ldapsearch -LLL -H ldap://$LDAP_SERVER -E pr=1000/noprompt -o ldif-wrap=no -x -D ${SVC_ACCOUNT_NAME}@$DOMAIN -w ${SVC_ACCOUNT_PASS} -b "${SEARCH_BASE}" \ |
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 | |
| DECODE_BASE64(){ | |
| # This function takes the encoded output from ldapsearch and decodes it | |
| # It then needs to be "hex-dumped" in order to get it into regular text | |
| # So that we can work with it | |
| OBJECT_ID="$1" | |
| BASE64_DECODED=$(echo $OBJECT_ID | base64 -D) | |
| G=($(echo ${BASE64_DECODED} | hexdump -e '16/1 " %02X"')) | |
| OBJECTGUID="${G[3]}${G[2]}${G[1]}${G[0]}-${G[5]}${G[4]}-${G[7]}${G[6]}-${G[8]}${G[9]}-${G[10]}${G[11]}${G[12]}${G[13]}${G[14]}${G[15]}" |
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 | |
| # | |
| # Author: Calum Hunter | |
| # Date: 28/11/2016 | |
| # Version: 1.0 | |
| # Purpose: To generate a Mac UID from the objectGUID attribute | |
| # (GeneratedUID) in AD. | |
| # This uses the same method that the Apple | |
| # AD Plugin uses |
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 | |
| # | |
| # Author: Calum Hunter | |
| # Date: 28/11/2016 | |
| # Version: 1.0 | |
| # Purpose: To generate a Mac UID from the objectGUID attribute | |
| # (GeneratedUID) in AD. | |
| # This uses the same method that the Apple | |
| # AD Plugin uses |