Skip to content

Instantly share code, notes, and snippets.

Avatar

Shea Craig sheagcraig

View GitHub Profile
@sheagcraig
sheagcraig / handle_voice_products
Created Jan 28, 2015
Down and dirty reposado Voice product cleansing
View handle_voice_products
#!/usr/bin/python
"""Down and dirty removal of deprecated voice products and addition of
new voice products for reposado. It makes a few mistakes (products that
have 'voice' in the title that aren't properly a Voice Product.
Don't just go and run this!
"""
import shlex
@sheagcraig
sheagcraig / FileUpload.py
Created Mar 10, 2015
IconUpload Issue with JSS >9.64
View FileUpload.py
#!/usr/bin/python
import urllib
import requests
# Obviously, our server name is swapped in for "ourjss".
# Policy ID 263 is Self Service policy installing Oracle Java 8 on our
# test server, running JSS v9.65
ICON_UPLOAD_URL_v965 = 'https://our965jss.org:8443/JSSResource/fileuploads/policies/id/263
@sheagcraig
sheagcraig / all_recipes.sh
Last active Aug 29, 2015
Do I have all of my recipes in my AutoPkg -l managed_software_list?
View all_recipes.sh
for i in $(basename ~/Developer/jss-recipes/*.jss.recipe | cut -d . -f 1-2); do echo $i; done | cat - ~/Desktop/managed_software_list.txt | sort | uniq -u
@sheagcraig
sheagcraig / ZipCloud.adf
Created Mar 31, 2015
ZipCloud Definition File
View ZipCloud.adf
# ZipCloud
/Users/*/Library/LaunchAgents/com.jdibackup.ZipCloud.autostart.plist
/Users/*/Library/LaunchAgents/com.jdibackup.ZipCloud.backupstart.plist
/Users/*/Library/LaunchAgents/com.jdibackup.ZipCloud.notify.plist
/Applications/ZipCloud.app
PROCESS: ZipCloud
# ZipCloud Finder services:
/Users/*/Library/Services/Add to Backup Selection.workflow
/Users/*/Library/Services/Instant Backup.workflow
@sheagcraig
sheagcraig / Apple-HT203987.adf
Last active Aug 29, 2015
SavingThrow ADF's
View Apple-HT203987.adf
<AdwareDefinition>
<Version>1.0</Version>
<DefinitionAuthor>Shea Craig</DefinitionAuthor>
<DefinitionSource>https://support.apple.com/en-us/ht203987</DefinitionSource>
<!-- Apple provided this list of files, and as such, they're not necessarily broken down neatly into products.-->
<Adware>
<AdwareName>Downlite, VSearch, Conduit, Trovi, MyBrand, Search Protect</AdwareName>
<File>/System/Library/Frameworks/v.framework</File>
<File>/System/Library/Frameworks/VSearch.framework</File>
<File>/Library/PrivilegedHelperTools/Jack</File>
View oldskool.py
#!/usr/bin/env python
"""oldskool.py
Generate character stats using old school methods.
"""
# I wanted to quickly generate some old school character stats. And I
# wanted to express each method as tersely as possible in python.
# As it turns out, this is pretty simple to do as one-liners, aside
@sheagcraig
sheagcraig / ThunderstrikeVulnerabilityEA.py
Last active Aug 29, 2015
ThunderstrikeVulnerabilityEA.py
View ThunderstrikeVulnerabilityEA.py
#!/usr/bin/python
# Culled from https://gist.github.com/arubdesu/05b4172890450fa2d9e6
# Given a list of FW models and Thunderstrike patched FW versions,
# report on whether a machine has been patched.
import subprocess
import plistlib
@sheagcraig
sheagcraig / update_warranty_expires_group.py
Last active Aug 29, 2015
UpdateWarrantyExpiresGroup.py
View update_warranty_expires_group.py
#!/usr/bin/python
# 2015 Shea G. Craig
# ____ ______ __
# / ___/ ___\ \/ /
# | | _\___ \\ /
# | |_| |___) / \
# \____|____/_/\_\
# NO WARRANTY FOR YOU!
@sheagcraig
sheagcraig / derFlounderTest.py
Last active Aug 29, 2015
Der Flounder Test
View derFlounderTest.py
#!/usr/bin/python
import ssl
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.contrib import pyopenssl
#import jss
@sheagcraig
sheagcraig / turn-ssh-roaming-off
Last active Jan 21, 2016
Munki pkginfo to solve CVE-0216-0777 and CVE-0216-0778
View turn-ssh-roaming-off
<?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>_metadata</key>
<dict>
<key>created_by</key>
<string>itadmn</string>
<key>creation_date</key>
<date>2016-01-15T14:29:44Z</date>
You can’t perform that action at this time.