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 | |
# | |
# Mac OSX Adblocker Script for IPv4 | |
# Description: Blocks ads using system hosts file /private/etc/hosts, Ad-Domains would be redirected to 0.0.0.0 | |
# Author: Daniel Hochleitner | |
# Created: 10.09.2015 | |
# Use: sudo ./adblock_hosts.sh | |
# Get original hosts file from /private/etc/hosts |
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
10.3 (Panther): | |
https://swscan.apple.com/scanningpoints/scanningpointX.xml | |
10.4 (Tiger): | |
https://swscan.apple.com/content/catalogs/index.sucatalog | |
https://swscan.apple.com/content/catalogs/index-1.sucatalog | |
10.5 (Leopard): | |
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog |
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
OSX 10.9 Mavericks | |
https://apps.apple.com/app/id675248567 | |
OS X 10.10 Yosemite | |
https://apps.apple.com/app/id915041082 | |
OS X 10.11 El Capitan | |
https://apps.apple.com/app/id1147835434 | |
macOS 10.12 Sierra |
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
#iTunes 12.6.5.3 https://support.apple.com/HT208079 | |
#iTunes 12.8.2 https://support.apple.com/kb/dl1977 | |
set theDMG to choose file with prompt "Please select iTunes dmg file:" of type {"dmg"} | |
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG | |
do shell script "pkgutil --expand /Volumes/iTunes/Install\\ iTunes.pkg ~/tmp" | |
do shell script "hdiutil unmount /Volumes/iTunes/" | |
do shell script "cd ~/tmp/iTunesX.pkg;" & "cat Payload | gunzip -dc |cpio -i;" & "ditto ~/tmp/iTunesX.pkg/Applications/iTunes.app ~/tmp/iTunes.app;" | |
do shell script "plutil -replace CFBundleGetInfoString -string 'iTunes 13.6.5.3' ~/tmp/iTunes.app/Contents/Info.plist" | |
do shell script "plutil -replace CFBundleShortVersionString -string 13.6.5 ~/tmp/iTunes.app/Contents/Info.plist" |
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
set theAPP to choose file with prompt "Please select iTunes app:" of type {"app"} | |
do shell script "mkdir ~/tmp" | |
do shell script "ditto " & POSIX path of theAPP & " ~/tmp/iTunes.app" with administrator privileges | |
do shell script "plutil -replace CFBundleGetInfoString -string 'iTunes 13.9.5.5' ~/tmp/iTunes.app/Contents/Info.plist" with administrator privileges | |
do shell script "plutil -replace CFBundleShortVersionString -string 13.9.5 ~/tmp/iTunes.app/Contents/Info.plist" with administrator privileges | |
do shell script "plutil -replace CFBundleVersion -string 13.9.5 ~/tmp/iTunes.app/Contents/Info.plist" with administrator privileges | |
do shell script "plutil -replace CFBundleVersion -string 'iTunes 13.9.5.5' ~/tmp/iTunes.app/Contents/version.plist" with administrator privileges | |
do shell script "plutil -replace CFBundleShortVersionString -string 13.9.5 ~/tmp/iTunes.app/Contents/version.plist" with administrator privileges | |
do shell script "pkgbuild --component ~/tmp/iTunes.app --install-location /Applications ~/Deskto |
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
# Download Java for OS X 2017-001 https://support.apple.com/kb/DL1572 | |
set theDMG to choose file with prompt "Please select javaforosx.dmg:" of type {"dmg"} | |
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG & " -noverify -nobrowse" | |
do shell script "pkgutil --expand /Volumes/Java\\ for\\ macOS\\ 2017-001/JavaForOSX.pkg ~/tmp" | |
do shell script "hdiutil unmount /Volumes/Java\\ for\\ macOS\\ 2017-001/" | |
do shell script "sed -i '' 's/return false/return true/g' ~/tmp/Distribution" | |
do shell script "pkgutil --flatten ~/tmp ~/Desktop/Java.pkg" | |
do shell script "rm -rf ~/tmp" | |
display dialog "Modified Java.pkg saved on desktop" buttons {"Ok"} |
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
mv /Volumes/Macintosh\ HD/System/Library/LaunchAgents/com.apple.followupd.plist /Volumes/Macintosh\ HD/System/Library/LaunchAgents/com.apple.followupd.bak | |
defaults delete com.apple.systempreferences AttentionPrefBundleIDs; killall Dock |
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
sudo softwareupdate --ignore 'macOS Catalina' | |
defaults delete com.apple.systempreferences AttentionPrefBundleIDs | |
rm ~/Library/Preferences/com.apple.preferences.softwareupdate.plist | |
killall Dock |
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
# https://macadmins.slack.com/archives/general/p1449604450017318 | |
# https://gist.github.com/clburlison/db6aaf4a717eb8ef3545 | |
# https://www.jamf.com/jamf-nation/feature-requests/5158/built-in-inventory-fields-for-os-x-macos-security-and-malware-protection-systems | |
# https://www.jamf.com/jamf-nation/discussions/19111/xprotect-status-extension-attribute | |
set MacOSVers to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion" | |
set MacOSBuild to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductBuildVersion" | |
set XProtectVers to do shell script "defaults read /System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist Version" | |
set XProtectDate to do shell script "GetFileInfo -d /System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist" |
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
# https://macadmins.slack.com/archives/general/p1449604450017318 | |
# https://gist.github.com/clburlison/db6aaf4a717eb8ef3545 | |
# https://www.jamf.com/jamf-nation/feature-requests/5158/built-in-inventory-fields-for-os-x-macos-security-and-malware-protection-systems | |
# https://www.jamf.com/jamf-nation/discussions/19111/xprotect-status-extension-attribute | |
set MacOSName to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductName" | |
set MacOSVers to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion" | |
set MacOSBuild to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductBuildVersion" | |
set XProtectVers to do shell script "defaults read /Library/Apple/System/Library/CoreServices/XProtect.bundle/Contents/version.plist CFBundleShortVersionString" |
OlderNewer