Skip to content

Instantly share code, notes, and snippets.

@opragel
opragel / ea_get_chrome_extensions_and_permissions.py
Last active October 27, 2018 00:17
ea_get_chrome_extensions_and_permissions.py
#!/usr/bin/python
## Script: #!/usr/bin/python
## Script: get_chrome_extensions_and_permissions.py
## Author: Modifications by Owen Pragel. Written for most by part by Christopher Collins (christophercollins@livenation.com).
###########################################
## Description: This script searches the last logged in user's installed extensions and the permissions of those extensions.
import os
@opragel
opragel / ea_loaded_non_apple_kexts.sh
Created November 17, 2017 19:42
ea_loaded_non_apple_kexts.sh
#!/bin/bash
loadedNonAppleKexts=$(/usr/sbin/kextstat -l | awk '!/com.apple/ { print $6 }')
printf "<result>%s</result>" "$loadedNonAppleKexts"
@opragel
opragel / forcefully_remove_mdm_1015.sh
Last active August 2, 2022 19:39
forcefully_remove_mdm_1015.sh
#!/bin/bash
# Seriously there still apparently aren't enough warning labels
# If you don't understand the consequences don't do it
REMOVE_PATHS=( # "/var/db/ConfigurationProfiles/.passcodePolicesAreInstalled"
# "/var/db/ConfigurationProfiles/.cloudConfigHasActivationRecord"
# "/var/db/ConfigurationProfiles/.cloudConfigNoActivationRecord"
# "/var/db/ConfigurationProfiles/.cloudConfigProfileObtained"
# "/var/db/ConfigurationProfiles/.cloudConfigRecordFound"
# "/var/db/ConfigurationProfiles/.profilesAreInstalled"
@opragel
opragel / google_drive_sync_update_checker.py
Created September 18, 2017 20:40
google_drive_sync_update_checker.py
#!/usr/bin/python
import xml.etree.ElementTree as ET
import requests
import uuid
params = {'cup2hreq': 'foo', 'cup2key': 'bar'}
platform = 'mac'
os_version = '10.12'
@opragel
opragel / ea_google_drivefs_usage.sh
Last active August 29, 2017 21:24
ea_google_drivefs_usage.sh
#!/bin/bash
currentUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')
currentUserHomeDirectory=$(dscl . -read "/users/$currentUser" NFSHomeDirectory | cut -d " " -f 2)
if [ -d "$currentUserHomeDirectory/Library/Application Support/Google/DriveFS" ]; then
driveFSSize=$(du -sm "$currentUserHomeDirectory/Library/Application Support/Google/DriveFS" | grep -o '[0-9]*')
eaResult="$driveFSSize MB"
else
eaResult="N/A"
fi
@opragel
opragel / is_pritunl_connected.py
Created June 25, 2017 23:38
is_pritunl_connected.py
#!/usr/bin/python
# Shout to @nmcspadden for the all the original/good code in this
import platform
"""
is_vpn_connected()
checks to see if any interface is conected to an internal IP
"""
def is_vpn_connected():
"""
@opragel
opragel / google_drivefs_update_checker.py
Last active October 4, 2017 22:55 — forked from bruienne/google_chrome_update_checker.py
Fork of Chrome update query for DriveFS
#!/usr/bin/python
import xml.etree.ElementTree as ET
import requests
import uuid
params = {'cup2hreq': 'foo', 'cup2key': 'bar'}
platform = 'mac'
os_version = '10.12'

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@opragel
opragel / sad_mdm.sh
Last active March 31, 2017 18:17
sad_mdm.sh
#!/bin/bash
# dangerous, your funeral
# shoutout to rtrouton for jss comm checks
jamf_binary=$(/usr/bin/which jamf)
jss_comm_chk=$("$jamf_binary" checkJSSConnection > /dev/null; echo $?)
if [[ "$jss_comm_chk" -gt 0 ]]; then
/usr/bin/printf "Machine cannot connect to the JSS. Exiting."
elif [[ "$jss_comm_chk" -eq 0 ]]; then
@opragel
opragel / remove_pritunl_osx.sh
Last active August 23, 2020 17:42
remove_pritunl_osx.sh
#!/bin/bash
# Disclaimer: it's your funeral
APP_PROCESS_NAME="Pritunl"
DAEMON_PATHS=( "/Library/LaunchAgents/com.pritunl.client.plist" \
"/Library/LaunchDaemons/com.pritunl.service.plist" \
"/Library/LaunchDaemons/net.sf.tuntaposx.tap.plist" \
"/Library/LaunchDaemons/net.sf.tuntaposx.tun.plist" )