Skip to content

Instantly share code, notes, and snippets.

x56 /
Created Mar 19, 2016
IDAPython script to name and create structs for all CFLString objects
import idaapi
import idc
#import idautils
import sys
#NOTE: may have to run this a few times to get to the end of the IDB, haven't bothered fixing this
def add_struct_to_idb(name):
idc.Til2Idb(-1, name)
x56 /
Created Mar 19, 2016
Script for downloading all available AirPort device firmwares
#!/usr/bin/env python
import errno
import os
import plistlib
import sys
import urllib
def makedirs_if_absent(path):
View env_test.c
#include <stdio.h>
int main(int argc, char *argv[], char *envp[])
int i = 0;
char *env = NULL;
while ((env = envp[i++]) != NULL) {
printf("%s\n", env);
#!/usr/bin/env python
# usage: ./ blah
import argparse
parser = argparse.ArgumentParser()
mut_ex_group = parser.add_mutually_exclusive_group()
x56 / serial_keyboard_init.S
Created Jul 13, 2015
View serial_keyboard_init.S
/* refer to osfmk/console/serial_general.c */
.globl _cereal64
/* do the important parts of serial_keyboard_init() */
stp x20, x19, [sp, #-0x20]!
stp x29, x30, [sp, #0x10]
add x29, sp, #0x20
sub sp, sp, #0x10
View gist:e1808df161a5b02af646
"0": {
"comm": "\nSection .text\n\nRange 0x0 - 0x4000 (16384 bytes)\nFile offset 65536 (16384 bytes)\n",
"icom": null,
"name": "BOOTROM_BASE",
"seg": 0
"148": {
"comm": null,
"icom": null,
x56 /
Last active Aug 29, 2015
PPAlgorithm encodeResource
#!/usr/bin/env python
# public domain
import sys
if len(sys.argv) != 3:
print " [input file] [output file]"
x56 / silly.grc
Created Dec 8, 2014
GRC sound effects generator
View silly.grc
<?xml version='1.0' encoding='ASCII'?>
<?grc format='1' created='3.7.6'?>
<timestamp>Sun Dec 7 22:19:00 2014</timestamp>
x56 / gist:6801541
Created Oct 2, 2013
Arduino sketch to go with pyCraft fork
View gist:6801541
int incomingByte = 0;
void setup() {
pinMode(2, OUTPUT);
pinMode(13, OUTPUT);
void loop() {
if (Serial.available() > 0) {