Skip to content

Instantly share code, notes, and snippets.

eholtam poundbangbash

Block or report user

Report or block poundbangbash

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@poundbangbash
poundbangbash / secure_token_list.py
Created Mar 9, 2019
Secure Token user list for munkireport
View secure_token_list.py
#!/usr/bin/python
"""
Devtools for munkireport.
Will return array of strings of users with Secure Tokens
"""
import subprocess
import os
import plistlib
@poundbangbash
poundbangbash / isMDMEnrolled.py
Created Feb 11, 2019
Munki fact to check if MDM is Enrolled
View isMDMEnrolled.py
#!/usr/bin/python
import platform
import plistlib
import subprocess
from distutils.version import LooseVersion
def get_os_version():
'''Return OS version.'''
return LooseVersion(platform.mac_ver()[0])
@poundbangbash
poundbangbash / isMDMInstalled.py
Created Feb 11, 2019
Munki fact to check if MDM is Installed
View isMDMInstalled.py
'''Check MDM install status'''
import subprocess
import plistlib
import sys
def fact():
'''Check MDM install status'''
cmd = ['/usr/bin/profiles', '-C', '-o', 'stdout-xml']
run = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@poundbangbash
poundbangbash / isFileVaultActive.py
Created Feb 11, 2019
Munki fact to check FileVault Status
View isFileVaultActive.py
'''Check if FileVault is Active'''
import subprocess
def fact():
'''Check if FileVault is Active'''
cmd = ['/usr/bin/fdesetup', 'isactive']
run = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, err = run.communicate()
try:
@poundbangbash
poundbangbash / com.microsoft.word
Last active Apr 19, 2017
MS example Word profile for version 15.32+
View com.microsoft.word
<?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.microsoft.Word</key>
@poundbangbash
poundbangbash / com.microsoft.office.mobileconfig
Last active Mar 6, 2018
com.microsoft.office preference management mobileconfig for Office 15.33+
View com.microsoft.office.mobileconfig
<?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.microsoft.office</key>
@poundbangbash
poundbangbash / manifestutil
Created Oct 21, 2016
manifestutil with refresh-cache subcommand attempt
View manifestutil
#!/usr/bin/python
# encoding: utf-8
#
# Copyright 2011-2016 Greg Neagle.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
View OUIWhatsNewLastShownLink-values.sh
View Write custom hosts entries
#!/bin/bash
#Delete all custom CUSTOMPHRASE additions every time this is run
awk '!/#CUSTOMPHRASE/' /etc/hosts > /tmp/hosts && cp -f /tmp/hosts /etc/hosts
sleep 1
#Add current CUSTOMPHRASE custom additions to /etc/hosts
echo "#CUSTOMPHRASE Location File Server Header" >> /etc/hosts
echo "192.168.0.1 myserver.example.com #CUSTOMPHRASE" >> /etc/hosts
echo "192.168.0.2 herserver.example.com #CUSTOMPHRASE" >> /etc/hosts
View Office 2016 default save location discovery notes
Database located at ~/Library/Group\ Containers/UBF8T346G9.Office/MicrosoftRegistrationDB.reg
- Created on first launch
Table HKEY_CURRENT_USER_VALUES:
node_id 626*
name OpenSaveLocally
type 4
value 1
Table HKEY_CURRENT_USER:
You can’t perform that action at this time.