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
SELECT 1 FROM ( | |
SELECT value from kolide_ioreg where c = 'IOPlatformExpertDevice' and d = 1 and r=1 and key = 'model' | |
UNION | |
SELECT value from kolide_ioreg where c = 'IOPlatformExpertDevice' and d = 1 and r=1 and key = 'board-id' | |
UNION | |
SELECT value from kolide_ioreg where c = 'IOPlatformExpertDevice' and d = 1 and r=1 and key = 'bridge-model' | |
) WHERE (value like 'iMac18,1' | |
or value like 'iMac18,2' | |
or value like 'iMac18,3' | |
or value like 'iMac19,1' |
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 = [("IOServiceGetMatchingService", b"II@"), | |
("IOServiceMatching", b"@*"), | |
("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
### Munki LaunchDaemon - LogoutHelper | |
launchd 'com.pinterest.chef.CPE.managedsoftwareupdate-logouthelper' do | |
label 'com.googlecode.munki.logouthelper' | |
program_arguments ['/usr/local/munki/logouthelper'] | |
run_at_load false | |
type 'daemon' | |
action :enable | |
end | |
### Munki LaunchDaemon - App Usage |
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 | |
# Credit to frogor for the objc | |
from Foundation import NSBundle | |
import json | |
import objc | |
import os | |
import plistlib | |
import subprocess |
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
let subsystem = "com.steipete.LoggingTest" | |
func getLogEntries() throws -> [OSLogEntryLog] { | |
// FB8269189: OSLogStore does not work iOS. | |
let logStore = try OSLogStore(scope: .currentProcessIdentifier) | |
let oneHourAgo = logStore.position(date: Date().addingTimeInterval(-3600)) | |
#if os(macOS) | |
let allEntries = try logStore.getEntries(at: oneHourAgo) | |
#else |
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 | |
# For mojave only | |
# In order for this to work, you will need to go to System Preferences in Mojave -> Security & Privacy -> Privacy -> Full Disk Access and grant Terminal.app permissions | |
import sqlite3 | |
conn = sqlite3.connect('/var/db/SystemPolicyConfiguration/KextPolicy') | |
c = conn.cursor() | |
query = 'SELECT * FROM kext_policy' | |
c.execute(query) |
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
<script type="text/javascript"> | |
var currentSlide = 0, playing = 1 | |
function slides(){ | |
return document.querySelectorAll('div.stage>img') | |
} | |
function showSlide(slideNumber){ | |
theSlides = slides() | |
for (c=0; c<theSlides.length; c++) { |
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 | |
# In order for this to work, you will need to go to System Preferences in Mojave -> Security & Privacy -> Privacy -> Full Disk Access and grant Terminal.app permissions | |
import sqlite3 | |
conn = sqlite3.connect('/Library/Application Support/com.apple.TCC/TCC.db') | |
c = conn.cursor() | |
query = 'SELECT * FROM access' | |
c.execute(query) | |
allowed_binaries = c.fetchall() |
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
Last login: Mon Jul 7 20:44:06 on ttys001 | |
ASIO-OTUS:pyobjc$ cd /tmp | |
ASIO-OTUS:tmp$ bpython | |
>>> import objc | |
>>> from PyObjCTools import AppHelper | |
>>> import Foundation | |
>>> import AppKit | |
>>> import ColorPicker | |
>>> ColorPicker | |
<module 'ColorPicker' from '/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/ColorPicker.so'> |
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
<?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>autoremove</key> | |
<false/> | |
<key>catalogs</key> | |
<array> | |
<string>production</string> | |
</array> |
NewerOlder