Skip to content

Instantly share code, notes, and snippets.

@sheagcraig
sheagcraig / AdwareCheckExtensionAttribute.py
Last active November 27, 2021 23:51
Check for Adware per Apple Kbase article
#!/usr/bin/python
"""Identify or remove files known to be involved in Adware/Malware
infection.
Most of the code applies to building a list of malware files. Thus,
both extension attribute and removal handling are included.
Cleans files as a Casper script policy; thus, it expects four total
arguments, the first three of which it doesn't use, followed by
--remove
@chemxboy
chemxboy / AskForPackage.sh
Last active January 24, 2019 19:37
This is how we use CocoaDialog (http://mstratman.github.io/cocoadialog/) in DeployStudio (http://deploystudio.com) workflows. CocoaDialog should be added to the scripts directory. This particular example will popup a choice and set the response in a variable. A later workflow item uses that variable in its logic to install the chosen package.
#!/bin/sh
#
# This script uses cocoaDialog to bring up a GUI dialog requesting which package to install. It will set a variable to be used later in the workflow.
# Set the 891 variable
P_891=""
# Path to the cocoaDialog tool
POPUP=`dirname "$0"`/cocoaDialog.app/Contents/MacOS/cocoaDialog