- We're debugging a dylib,
libhello.dylib
- The dylib is linked from
hello
- The exported function is
helloworld()
- We do not have source, but have reversed a struct from the library and created a hand-crafted header file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def params_to_dict(param_str): | |
splits = param_str.split(" ") | |
data = {} | |
prev_key = None | |
prev_val = None | |
for s in splits: | |
if "=" in s: | |
key, val = s.split("=") | |
if prev_key: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <netdb.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#define CANARY "in_the_coal_mine" | |
struct { | |
char buffer[1024]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Originally found here: http://jenders.vox.com/library/post/macports-workaround-for-installing-distcc-31-on-an-intel-mac.html | |
# | |
makefile=/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/distcc/work/distcc-3.1/Makefile | |
if test -e $makefile; then # user has a half completed installation | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
apt-get install automake avahi-daemon build-essential checkinstall db5.1-util db-util git-core libacl1-dev libavahi-client-dev libdb5.1-dev libgcrypt11 libgcrypt11-dev libpam0g-dev libtool pkg-config
cd /usr/src/
wget http://prdownloads.sourceforge.net/netatalk/netatalk-3.1.6.tar.gz
tar -xvzf netatalk-3.1.6.tar.gz