Quick and dirty process to get PDB up and running on OS X:
- Step 0 - clean out bleeding edge cruft
- Step 1 - rbconfig.rb is broken by default in Tiger. Fix it.
- Step 3 - where, oh where is ruby.h?
ln -s /usr/lib/ruby/1.8/universal-darwin8.0/* /usr/lib/ruby/1.8/powerpc-darwin8.0/
Now we're ready to get to business with PDB...
The 'pdb' executable is actually a little shell script that has functions for adding/deleting ipfw divert rules and running pdb (nee iledit). I wanted to do a little simple testing with a clear text protocol so I changed the divert rules to accomodate passive FTP:
~/tools/src/pdb-0.0.1.bleeding-edge$sudo ./pdb
==> Adding ipfw divert rules...
00242 divert 4642 tcp from any to any dst-port 21 out
00243 divert 4642 tcp from any 21 to any in
==> Running pdb...
hi pdb-ruby.bundle
hi ip.bundle
(pdb) c
45 10 00 38 20 c5 40 00 E..8..@.
40 06 00 00 c0 a8 01 03 @.......
81 80 05 bf c0 60 00 15 .....`..
98 d3 dd f7 82 18 d1 3c .......<
50 18 ff ff 54 5f 00 00 P...T_..
55 53 45 52 20 61 6e 6f USER.ano
6e 79 6d 6f 75 73 0d 0a nymous..
..SNIP..
(pdb) exit
I am slain!
==> Removing ipfw divert rule...
~/tools/src/pdb-0.0.1.bleeding-edge$
Excellent! More experimenting to come... time to read some code.
