Skip to content

Instantly share code, notes, and snippets.

View rickmark's full-sized avatar
🔬
Decoding iOS Formats

Rick Mark rickmark

🔬
Decoding iOS Formats
View GitHub Profile
@rickmark
rickmark / ParseCommandLineArguments.js
Created February 18, 2010 17:38
Initial parse command for Narwhal
function parseArguments(arguments)
{
var startsWith = function(self, str) { return (self.match("^"+str.replace('\\', '\\\\'))==str) }
var endsWith = function(self, str) { return (self.match(str.replace('\\', '\\\\')+"$")==str) }
var results = [], quoteType = null, quotedElement = null;
arguments.split(' ').forEach(function(element) {
if (quoteType || endsWith(element, '\\') || startsWith(element, '\'') || startsWith(element, '"')) {
if (quoteType) {
if (endsWith(element, quoteType)) {
results.push(quotedElement + " " + element.substring(0, element.length - 1));
# monkey-patching SQLServerAdapter to support SQL Server 2005-style pagination
module ActiveRecord
module ConnectionAdapters
class SQLServerAdapter
def find_table_primary_key_columns(table_name)
@find_table_primary_key_columns_cache ||= {}
if @find_table_primary_key_columns_cache[table_name].nil?
table_name = table_name.split('.').last.delete("[]")
sql = "SELECT KU.COLUMN_NAME
USER_NAME='username'
USER_PASSWORD='Password'
USER_FULLNAME='Full Name'
# Initial server configuration template
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@rickmark
rickmark / gist:1894908
Created February 23, 2012 20:33
Base Ubuntu Configuration
# Standard Server Setup File
# Copyright 2012 Richard Mark - All Rights Reserved
# Set the locale to English - United States - UTF 8
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
# Use automatic configuration of the network settings
d-i netcfg/choose_interface select auto
@rickmark
rickmark / python-path-from-autconf.patch
Created July 25, 2014 01:08
Support multi-version python systems
From 3c168240772cdaaa837e110f1c71b7dec658bb1a Mon Sep 17 00:00:00 2001
From: Richard Mark <rickmark@outlook.com>
Date: Thu, 24 Jul 2014 16:19:52 -0700
Subject: [PATCH] Use the correct version of python from Autoconf for jhbuild
script
---
scripts/Makefile.am | 1 +
scripts/jhbuild.in | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
-----BEGIN CERTIFICATE-----
MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCB
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMTE5
MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR
6FSS0gpWsawNJN3Fz0RndJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8X
@rickmark
rickmark / install.log
Created August 16, 2017 00:18
MacBookPro13,3 Firmware Malware
Aug 15 13:18:36 localhost opendirectoryd[165]: opendirectoryd (build 417.50.4) launched - installer mode
Aug 15 13:18:36 localhost opendirectoryd[165]: Logging level limit changed to 'notice'
Aug 15 13:18:36 localhost opendirectoryd[165]: Initialize trigger support
Aug 15 13:18:37 localhost opendirectoryd[165]: created endpoint for mach service 'com.apple.private.opendirectoryd.rpc'
Aug 15 13:18:37 localhost opendirectoryd[165]: set default handler for RPC 'reset_cache'
Aug 15 13:18:37 localhost opendirectoryd[165]: set default handler for RPC 'reset_statistics'
Aug 15 13:18:37 localhost opendirectoryd[165]: set default handler for RPC 'show'
Aug 15 13:18:37 localhost opendirectoryd[165]: starting endpoint for service 'com.apple.private.opendirectoryd.rpc'
Aug 15 13:18:37 localhost opendirectoryd[165]: no dynamic data found at '/System/Library/OpenDirectory/DynamicData/Configure.plist'
Aug 15 13:18:37 localhost opendirectoryd[165]: Registered node with name '/Configure' as hidden
@rickmark
rickmark / lldb_log.out
Created August 17, 2017 06:01
Playing with MojoKDP
This file has been truncated, but you can view the full file.
Last login: Wed Aug 16 18:53:59 on ttys000
Ricks-MacBook-Pro:~ rickmark$ lldb -s <(echo 'gdb-remote localhost:52364')
(lldb) command source -s 0 '/dev/fd/63'
Executing commands in '/dev/fd/63'.
(lldb) gdb-remote localhost:52364
Kernel UUID: D3314D98-5D40-3CD8-98A4-F1DD46C20E03
Load Address: 0xffffff8018e00000
warning: 'kernel' contains a debug script. To run this script in this debug session:
@rickmark
rickmark / DIFF_EFI.md
Created October 17, 2017 23:24
DIFF_EFI
  1. Aquire Core Boot
  2. Build util/ifdtool
  3. Run ifdtool on the .fd file or output from eficheck
  4. Find region_1_bios.bin
  5. binwalk the file

To decode the region_2_intel_me.bin, use unhuffme

@rickmark
rickmark / keybase.md
Created October 25, 2017 08:51
keybase.md

Keybase proof

I hereby claim:

  • I am rickmark on github.
  • I am rickmark (https://keybase.io/rickmark) on keybase.
  • I have a public key ASAA8qLx_r4RcU2-sfF6-Rw8q5cjHoOpDxSaLofHrQjDTgo

To claim this, I am signing this object: