Skip to content

Instantly share code, notes, and snippets.

@memega
memega / Reversing 10.13 RootGate, hands notes.md
Created February 20, 2021 20:26 — forked from ygini/Reversing 10.13 RootGate, hands notes.md
Work in progress, notes for the current state

Reversing 10.13 RootGate, hands notes

Inital discovery process

Original state of the root.plist

Dict {
    smb_sid = Array {
        S-1-5-18
@memega
memega / imessage
Created January 26, 2019 05:54 — forked from aktau/imessage
Send iMessage from the commandline
#!/bin/sh
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit
-- another way of waiting until an app is running
on waitUntilRunning(appname, delaytime)
repeat until my appIsRunning(appname)
tell application "Messages" to close window 1
delay delaytime
end repeat
@memega
memega / SLF0Parser.hs
Created December 21, 2017 11:59 — forked from yiding/SLF0Parser.hs
Xcode SLF0 serialization format parser (used in xcactivitylog)
{-# LANGUAGE OverloadedStrings #-}
{-|
Tokenizer for SLF0 serialization format, used by Xcode to, at the very least,
encode some log files.
For example, `.xcactivitylog` logs are gzipped files of this format,
serializing some objc classes which represent the build log.
This class tokenizes the raw byte stream into a flat list of tokens. The actual
@memega
memega / portable_endian.h
Created April 21, 2017 23:06 — forked from panzi/portable_endian.h
This provides the endian conversion functions form endian.h on Windows, Linux, *BSD, and Mac OS X. You still need to use -std=gnu99 instead of -std=c99 for gcc. The functions might actually be macros. Functions: htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, htobe64, htole64, be64toh, le64toh. License: I hereby put "port…
// "License": Public Domain
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it
// an example on how to get the endian conversion functions on different platforms.
#ifndef PORTABLE_ENDIAN_H__
#define PORTABLE_ENDIAN_H__
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
@memega
memega / endian.h
Created April 21, 2017 23:03 — forked from yinyin/endian.h
BSD/Linux-like <endian.h> for MacOS X
#ifndef __FINK_ENDIANDEV_PKG_ENDIAN_H__
#define __FINK_ENDIANDEV_PKG_ENDIAN_H__ 1
/** compatibility header for endian.h
* This is a simple compatibility shim to convert
* BSD/Linux endian macros to the Mac OS X equivalents.
* It is public domain.
* */
#ifndef __APPLE__
@memega
memega / .gitignore
Created April 19, 2017 11:56 — forked from DTrejo/.gitignore
How to Readline - an example and the beginnings of the docs
node_modules/
@memega
memega / gitcheats.txt
Created April 19, 2017 10:48 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# push changes to an empty git repository for the first time
git push --set-upstream origin master
# remove untracked files in a git repository
git status -su | cut -d' ' -f2- | tr '\n' '\0' | xargs -0 rm
# get most modified files and counts
@memega
memega / osx_automount_nfs.md
Created April 17, 2017 20:19 — forked from L422Y/osx_automount_nfs.md
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service