thebends.org/~allen

                           TABLE OF CONTENTS

1.  INTRODUCTION ..................................................... 1

2.  CODE ............................................................. 1

  2.1  Misc .......................................................... 1
  2.2  iPhone ........................................................ 2
  2.3  AVR ........................................................... 2 
  2.4  libnatpmp ..................................................... 2
  2.5  utunnel ....................................................... 2
  2.6  btunnel ....................................................... 2
  2.7  ythread ....................................................... 3 
  2.8  yhttp ......................................................... 3 
  2.9  ArpSpyX ....................................................... 3 
  2.10 jspng ......................................................... 3
  2.11 MotionScreen .................................................. 4 
  2.12 ramdisk ....................................................... 4
  2.13 memedit ....................................................... 4
  2.14 yprofile ...................................................... 4
  2.15 libypeer ...................................................... 4
  2.16 open-tracker .................................................. 4

3.  MUSIC PROJECTS ................................................... 3

  3.1  SYN | ACK ..................................................... 4 
  3.2  Circumvolve ................................................... 4 
  3.3  Mansion ....................................................... 4 
  3.4  Resolver ...................................................... 4
  3.5  Sincerity Principle ........................................... 5 

REFERENCES ........................................................... 4 

                                                                [Page i]
                            1. INTRODUCTION

  My name is Allen Porter and I'm a software engineer at Google. In my
  spare time I toy with unix / os x stuff, networking stuff, and
  music stuff.  Just business here, i'll leave the personal stuff for
  my facebook/myspace page.

jjjjjjjjttjjffEEWWWWWWWW##WWWWEELLjjjjjjjjjjjjjjjj
jjjjjjjjjjjjEEKKWWWWWWWWWWWWWWWWKKLLjjjjjjjjjjjjjj
jjjjjjjjLLKKKKWWWWWWWWWWWWWWWWWWWWKKjjjjjjjjjjjjjj
jjjjjjjjEEWWWWKKKKWWKKWWWWKKKKWW##WWLLjjjjjjjjjjjj
jjjjjjLLWWWWKKLLLLKKGGKKDDGGDDWWWW##KKLLjjjjjjjjjj
jjjjjjDDWW##DDffLLLLffffiijjLLGGDD##WWGGjjjjjjjjff
jjjjffKKWWWWLLttii..    ..;;iittLLWWWWKKjjffffffjj
jjjjffKKWWWWff;;....    ..,,;;iijjWWWWKKffffffffjj
jjjjLLKKWWWWffiittttiiiiiijjLLLLjjWW##WWffffffffff
jjjjffKK##WWLLGGGGDDLLiittDDKKGGLLEE##WWffffffffff
jjjjffEE##KKttLLDDDDLL,,ttGGDDGGLLGG##WWffffffffff
jjjjffKK##DDiiiittiiii,,iittiiiiiiffWWWWffffffffff
jjffffEEWWGGii;;..;;ii,,iiii,,,,;;jjWWKKffffffffff
jjffffGGEEGGii;;,,iiiiiittttiiiiiijjGGLLffffffffff
ffffffLLffLLiiiittttLLLLGGjjttjjjjjjjjttffffffffff
ffffffffjjffttttjjttttLLffjjjjffffffEEGGLLffffffff
ffffffffGGKKttttLLLLffjjjjLLDDjjttLLKKGGLLLLffffff
ffffffffLLGGLLttttLLLLttjjffffttjjLLGGGGLLLLLLLLff
ffffffffLLLLGGLLttiittttttjjttjjLLEEDDGGGGLLLLLLLL
ffffffLLLLLLGGLLttiittjjjjttiijjLLEEEEDDGGGGLLLLLL
ffffffLLLLLLEELLLLiiiiiiiiiittLLGGWWEEEEDDGGGGLLLL
ffffLLLLLLGGKKLLLLLLttttttjjLLGGLL##EEEEDDGGGGGGLL
ffffLLLLLLGGKKLLjjLLGGDDDDGGGGLLGGKKKKDDEEGGGGGGGG
LLLLGGGGGGLLEEGGttLLLLGGGGGGGGLLGGDDEEGGGGGGGGGGGG
LLLLGGGGGGLLGGGGttffLLLLLLGGGGGGGGGGGGGGGGDDEEGGGG
                                2. CODE

  I enjoy writing code, and have posted some of it here with the hopes
  that someone else may find it useful.  Feel free to do whatever you
  want with it, but let me know if you have any sugestions,
  improvements, or anything interesting on these subjects that you
  think I might be interested in.  See the REFERENCES section for
  code that I like that other people have written.

  Most of the code here was written for a proof of concept, and probably
  is more interesting to read than to run (it most likely won't do what
  you want right out of the box).

  Most of my code can now be found at googlecode.

2.1.  Misc

  I have a pile of misc code snippets, that cover the following topics:

  Networking

    Some code dealing with sniffing or munging packets.  Topics include
    AIM sniffing, arp packet creation/sniffng, bounjour tunneling,
    playing with icmp.

                                                                [Page 1]

  Mach-O

    A few examples of playing with Mach-O binary formats such as
    parsing, looking at vm space used, and stuff data into new
    sections.

  Other

    Other misc Mac OS X code such as displaying network interfaces,
    querying i2c devices, querying spotlight, and playing with the
    mach api and tasks.

2.2.  iPhone

  The iPhone is a realy fun (and powerful) platform for mobile
  application development.  Too bad apple didn't release an SDK
  for the iphone (the web one doesn't count); the developers had to
  make their own.  Hey, apple finally released their SDK!. See my
  iphone page which has details about the pre-SDK iPhone projects I
  worked on, including (iPhoneDisk the MacFUSE plugin, and
  MobileTerminal).

  Ok, so I now have a few legit projects too.  See mobilesynth.

2.3.  AVR

  I like playing with Atmel AVR microcontrollers, especially when
  mixing them with networks.  See my AVR page for more details,
  including some photos and links to code I've written related to
  serial I/O and networking.

2.4.  libnatpmp

  NAT-PMP is a protocol for routers to allow internal clients to
  create port forwarding entries dynamically.  I wrote a library
  for speaking nat-pmp, and a few tools to go along with it.
  Someone else wrote a library called libnatpmp
  after I did, but isn't interested in changing the name.  They
  also plastered it all over the web.  Too bad for me, I guess.

2.5.  utunnel

  Written using libnet and pcap, utunnel allows you to tunnel IP
  traffic over udp.  Only tested on BSD based unixes, it may be a
  little rough around the edges, so use at your own risk.

2.6.  btunnel

  A work in progress, btunnel (bonjour tunnel) is a tool for
  tunneling bonjour packets between networks.  While bonjour and
  mDNS are usually LAN based, Its not clear if other methods that
  I haven't read enough about yet might work better, using
  existing protocols.  I think I would rather expose my zero
  configuration services to my trusted friends only.

[Page 2]

2.7.  ythread

  ythread is a simple C++ thread/mutex library that wraps the
  pthread library.  I wanted a simple way to create threads from my
  C++ applications and thought maybe someone might find this simple
  set of classes useful.

2.8.  yhttp

  HTTP is everywhere, so why not link an HTTP server into all of your
  long running processes?  yhttp is a very basic HTTP server library.
  I like the idea of ditching the bloated standalone HTTP server +
  server side code in favor of a small binaries that do one thing,
  and do it well.  You probably already always have a web browser
  open, so exposing status of your long running applications over
  HTTP seems more useful than stdout.  (I'm not claiming credit for
  coming up with this idea, but I think its something I would like
  to see more of).

  This library is the result of a weekend of work and is nowhere near
  complete (it doesn't support all of the protocol, for example),
  but I was able to get a hello world out of it.

2.9.  ArpSpyX

  ArpSpyX is an arp packet sniffer for OS X that I found useful for
  surveying my little home network.  It was also an excuse to dabble
  in Objective-C / Cocoa.  Also see arpdropper for injecting
  arbitrary arp request and arp reply packets.

2.10. jspng

  jspng is a library to create PNG images written entirely
  in javascript, mostly as a proof of concept.  I'm not aware of any
  other similar libraries, which is a shame (though I understand,
  because it seems a bit slow to make anything that looks good).
  To create an image, you just need to give it an array of pixels.
  It renders the image with src="data:image/png;base64,...", where
  the base64 encoded png is created on the fly.  See the unit tests
  for implementation details.

  I would love to hear from any javascript experts who can speed it
  up.  Also, let me know if you use the code for anything useful,
  or if you end up doing the work to make it support color, etc.
  Mostly, i'm curious if anyone else found the RFC as hard to
  understand as I did!

                                                                [Page 3]

2.11. MotionScreen

  MotionScreen is an OS X application that uses an iSight camera to
  transpose foreground images on some background.  See a screenshot
  to get an idea.  You first select a background image, then a take
  a reference snapshot and jump in front of the camera.  Using motion
  or differences from a scene seemed like a good way to make a quick
  and dirty "green screen".   See the code and disk image.

2.12. ramdisk

  Just for fun, a MacFUSE based ramdisk.

2.13. memedit

  A tool for manipulating memory of a running process.  Uses the mach
  API and zone introspection to iterate over regions of heap memory
  allocated to a running task, as well as a mode for reading and
  writing these regions (using mach_vm_read/mach_vm_write).  Have a
  look at the source.

2.14. yprofile

  A simple memory profile, currently supporting the ability to
  report memory leaks.  This library overrides  malloc and free
  to track memory allocation and reports memory leaks on shutdown.
  Browse the source.

2.15. libypeer

  Why not use public bittorrent trackers for finding peers for
  things other than filesharing?  They seem pretty reliable and
  have a nice peer discovery mechanism (a shared secret).  The
  libypeer library is written in C++ and does just that.  Go
  check out the source.

2.16. open-tracker

  I needed a server to test out libypeer, so open-tracker was born.
  This tracker was built on Google's App Engine infrastructure,
  written in python.  Go post a torrent, but keep it legal.  Also,
  feel free to use it for non-torrent projects.  The announce url:

  http://tracker.thebends.org/announce

                            3. MUSIC PROJECTS

  I like to play and record music, and sometimes play and record with
  others.  See the REFERENCES section for music projects that I
  am a fan of.

3.1.  SYN|ACK

  In my spare time I work on SYN|ACK.  Stay tuned, this still a work
  in progress.

3.2.  Circumvolve

  Check out Circumvolve.

3.3.  Mansion

  You can hear Mansion at myspace.com.  Mansion is also known to play
  shows on occasion and is rumored to have some newer recordings
  floating around somewhere.

[Page 4]

3.4.  Resolver

  Resolver is no longer an active project, but you can still hear
  some music and see some photos on resolvermusic.com.  See Lily White
  to hear what some of the other members are up to these days (they
  rock).

3.4.  Sincerity Principle

  Sincerity Principle hasn't had much action in a while, but I hear
  that something new music might be in the making.

                               REFERENCES

  Here you will find a collection of references that I have found
  interesting useful, or enjoyable.  Consider this my "now reading"
  or "currently listening to" section, as these references should
  change often (hopefully).

  Feeds

  [1] Google Hot Trends (feed)
  [2] Allen's Shared Items (feed)
  [3] Pownce: Allen P. (feed)
  [4] del.icio.us (feed)
  [5] Twitter / allenporter (feed)

  Computing

  [1] Distributed Hash Table
  [2] nologin - code
  [3] make_evil.py
  [4] Interposing
  [5] iPhone Toolchain Installation
  [6] iphone-binuils
  [7] SWF/FLV File Format Specification
  [8] Apple Accessory Protocol
  [9] RFC 2131 - Dynamic Host Configuration Protocol
  [10] EDTP Electronics
  [11] Phrack 64
  [12] Abusing Mach on Mac OS X

  Music

  [1] Jucifer: A Partridge In A Pear Tree (DVD)
  [2] Lily White
  [3] First Wave Hello
  [4] Japanese Sunday
  [5] Frank Records
  [6] Hans Keller
  [7] Sleeping People

  Periodicals

  [1] Official blog of the metasploit project
  [2] Uninformed
  [3] jacobian.org : Article Archive
  [4] NPR: Intelligence Squarred
  [5] Diggnation
  [6] Techdirt
  [7] Worse than Failure
  [8] tales from the red shed