Skip to content

Instantly share code, notes, and snippets.

@danzimm
danzimm / mach_list_services.c
Last active August 29, 2015 13:58
List the mach services on your computer, or at least all the ones up the default bootstrap chain!
#include <stdio.h>
#include <mach/mach.h>
#include <bootstrap_priv.h>
#include <stdlib.h>
void error(int a, int r, const char *str) {
const char *err = bootstrap_strerror(r);
fprintf(stderr, "%s (%#02x) %s\n", str, r, err);
exit(a);
}
@danzimm
danzimm / bit.s
Created June 3, 2012 01:46
get your intel processor branding string whoop whoop
.globl start
.cstring
l:
.ascii "%s\n\0"
.text
start:
push %rbp
mov %rsp, %rbp
sub $0x30, %rsp