Skip to content

Instantly share code, notes, and snippets.

View neilmartin83's full-sized avatar
🎯
Focusing

Neil Martin neilmartin83

🎯
Focusing
View GitHub Profile
% strings "/Applications/Utilities/Adobe Flash Player Install Manager.app/Contents/MacOS/Adobe Flash Player Install Manager"
/usr/sbin/lsof
/bin/ps
-p %d
-o command=
NSApplicationProcessIdentifier
Flash Player Install Manager application terminated.
FPIMFatalException
[FPIMApplicationManager _loadAndDisplayPanel:] did not obtain a valid view for placement.
#!/bin/bash
# Check a list of serial numbers for eligibility in the 2015 MacBook Pro battery replacement recall
# Returns only eligible serial numbers
# The text file must be formatted with Unix (LF) line breaks
#
# Usage: mbpserialcheck.sh /path/to/inputfile.txt
#
# To output directly to a CSV file: mbpserialcheck.sh /path/to/inputfile.txt > /path/to/outputfile.csv
#
@neilmartin83
neilmartin83 / import_departments_into_jss.sh
Created February 4, 2017 16:41
Import a list of Departments into your JSS from a text file
#!/bin/sh
# Import a text file containing a list of Departments into your JSS!
# The text file must be formatted with Unix (LF) line breaks
# Important note: if your text file contains & characters, replace them with &
# Change these for your environment
user="jssuser"
pass="jsspass"
jssurl="https://my.jss.org:8443"
<config>
<panel>
<name>AppsPanel</name>
<visible>false</visible>
</panel>
<panel>
<name>FilesPanel</name>
<masked>true</masked>
<visible>false</visible>
</panel>
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.apple.MCX</key>
#!/bin/bash
## mount the segmented DMG
hdiutil attach "/var/tmp/segmented-dmg.dmg"
## run the vendor's installer and do other stuff below this line
exit 0
{"publisher": "Microsoft", "currentVersion": "4.5.32.0", "requirements": [{"operator": "is", "and": true, "type": "recon", "name": "Application Bundle ID", "value": "com.microsoft.app.scep_gui"}], "name": "System Center Endpoint Protection", "appName": "System Center Endpoint Protection.app", "lastModified": "2018-05-05T13:14:45Z", "patches": [{"releaseDate": "2018-03-01T11:26:06Z", "killApps": [{"appName": "System Center Endpoint Protection.app", "bundleId": "com.microsoft.app.scep_gui"}], "version": "4.5.32.0", "components": [{"version": "4.5.32.0", "name": "System Center Endpoint Protection", "criteria": [{"operator": "is", "and": true, "type": "recon", "name": "Application Bundle ID", "value": "com.microsoft.app.scep_gui"}, {"operator": "is", "type": "recon", "name": "Application Version", "value": "4.5.32.0"}]}], "standalone": true, "minimumOperatingSystem": "10.5.0", "dependencies": [], "reboot": false, "capabilities": [{"operator": "greater than or equal", "type": "recon", "name": "Operating System Ver
#!/bin/bash
/Applications/System\ Center\ Endpoint\ Protection.app/Contents/MacOS/scep_set --section fac --set='action_av = "scan"'
sleep 1
launchctl unload /Library/LaunchDaemons/com.microsoft.scep_daemon.plist
sleep 1
launchctl load /Library/LaunchDaemons/com.microsoft.scep_daemon.plist
exit 0
#!/bin/bash
status=$(/Applications/System\ Center\ Endpoint\ Protection.app/Contents/MacOS/scep_daemon --status | grep RTPStatus | cut -d '=' -f 2)
echo "<result>$status</result>"
exit 0
<?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>Label</key>
<string>com.NT-Ware.UniFLOWMacClient</string>
<key>Program</key>
<string>/Applications/UniFLOW/MacClient.app/Contents/MacOS/MacClient</string>
<key>RunAtLoad</key>
<true/>