From /System/Library/Security/authorization.plist:
<key>com.apple.uninstalld.uninstall</key>
<dict>
<key>class</key>
<string>rule</string>
import base64, hashlib | |
from ctypes import CDLL, POINTER, Structure, create_string_buffer, byref | |
from ctypes.util import find_library | |
Security = CDLL(find_library('Security')) | |
# Importing this via C because haven't figured out how to mix in pyObjc version yet | |
c_CoreFoundation = CDLL(find_library('CoreFoundation')) | |
class OpaqueType(Structure): | |
pass |
IFJS_IFDContext | |
IFJS: Package Authoring Error: system.run()/runOnce() require <options allow-external-scripts='yes'/> | |
IFJS: Path for embedded script %s not available | |
IFJS: Error while running task %s %s | |
IFJS: %s: Error getting process info for PSN %d:%d | |
IFJS: *** exception: %s | |
IFJS: choices delegate must respond to allChoices and choiceForIdentifier: | |
IFJS: Package Authoring Error: access to path "%s" requires <options allow-external-scripts='true'> | |
IFJS: Failed to stat root path %s (%s) | |
_IFJS_IFDCustomizationItemClassDefinition |
$TESTREG = "SOFTWARE\\Adobe\\Adobe ARM\\1.0\\ARM" | |
$TESTKEY = "iCheck" | |
$IPS = Get-Content 'C:\Users\yourname\Desktop\ips.txt' | |
$OUTPUT = 'C:\Users\yourname\Desktop\ips_log.txt' | |
function GetName($ipaddr) { | |
# Resolve a computer name if we can | |
try { | |
[System.Net.Dns]::GetHostByAddress($ipaddr).HostName | |
} catch [System.Exception] { |
https://twitter.com/macgirl84/status/529097548338692096
https://twitter.com/agerstein/status/529443019800711168
https://twitter.com/tvsutton/status/529600119730343936
https://twitter.com/grahamgilbert/status/529702244602888192
https://twitter.com/mikeymikey/status/529718389972156416
https://twitter.com/Sacrilicious/status/529720151743406082
https://twitter.com/Sacrilicious/status/529750604437291008
https://twitter.com/mikeymikey/status/529760228884348928
https://twitter.com/natewalck/status/529780724321091584
https://twitter.com/rtrouton/status/529998791022489600
# Variations on a theme. | |
# This first example uses a poorly documented trick in python regarding strings: | |
# | |
# https://docs.python.org/2/tutorial/introduction.html | |
# "Two or more string literals (i.e. the ones enclosed between quotes) next to each other | |
# are automatically concatenated." | |
# | |
# Then it's combined with the python implied line continuation by wrapping it in an outer | |
# set of parentheses. |
# You need python 2.7 for this | |
# FYI: There's a filepath hardcoded in this example at the end | |
# If you've got python installed, you can run this with: python prison_json.py | |
import re, mmap, collections, json, os | |
# These are special keys which should be treated as an array/list of values | |
multi_keys = ["Traits", "Reputation", "ReputationHigh"] | |
def dequote(keyname): |
import struct, hashlib | |
def hashStringForPath(cls, path): | |
hash_path = [None] * 28; | |
md5_digest_hex = hashlib.md5(path).digest(); | |
first_value = struct.unpack('>Q', md5_digest_hex[:8])[0]; | |
second_value = struct.unpack('>Q', md5_digest_hex[8:])[0]; | |
counter = 13; | |
while counter >= 0: |