Skip to content

Instantly share code, notes, and snippets.

@b0gdanw
b0gdanw / disable.sh
Last active March 17, 2024 11:10
Disable bunch of #$!@ in Catalina
# Credit: pwnsdx https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21; nebular https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3#gistcomment-3019082
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to disable SIP: Reboot to Recovery, in Terminal csrutil disable
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# List disabled services: launchctl print-disabled user/501 |grep true & launchctl print-disabled system |grep true
@b0gdanw
b0gdanw / GetSysInfo.scpt
Last active December 9, 2021 13:59 — forked from clburlison/get_sys_info.scpt
macOS Mojave - get current system information
# 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"
@b0gdanw
b0gdanw / osx-software-update-urls-10.3-to-14.txt
Last active March 23, 2024 21:57 — forked from deltakhan/osx-software-update-urls.txt
URLs of the index files used by the software update client on OS X
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
@b0gdanw
b0gdanw / adblock_hosts.sh
Last active July 23, 2021 18:12 — forked from Dani3lSun/adblock_hosts.sh
Mac OS X adblock shell script using system hosts file (Block ads system wide)
#!/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