Jdi_hook is a project mainly written in Ruby, it's free.
JRuby based scriptable Java debugger using the JDI interface.
jdi_hook by Eric Monti http://github.com/emonti/jdi_hook
== DESCRIPTION:
JdiHook is a ruby-scriptable Java debugger based on and around Sun's Java Debugging Interface (JDI) API.
== FEATURES/PROBLEMS:
JdiHook aims to provide a scriptable engine around Sun's Java Debugging Interface (JDI) using JRuby. The uses of such an engine are intentionally open-ended, but the initial rationale was the need for custom instrumentation and dynamic analysis tools for Java applications with a reverse engineering and vulnerability testing mindset.
You already use JAD or JODE for class decompiling, but you need a quick and painless way to observe call trees, hit traces, and other target behaviors during runtime. Create bespoke Java runtime debugging scripts just like you would using PyDbg or Ragweed on a native target.
== SYNOPSIS:
require 'rubygems' require 'jdi_hook'
vm = JdiHook.command_line_launch("HelloWorld")
dbg = JdiHook::MethodTracer.new vm, :redirect_stdio => true
en_proc = lambda {|this, evt| puts " [] " << this.notify_entry(evt.method) } ex_proc = lambda {|this, evt| puts " [] " << this.notify_exit(evt.method) }
dbg.meth_hooks = { /.main$/ => { :on_entry => en_proc, :on_exit => ex_proc }, /.*/ => { :on_entry => en_proc }, }
dbg.go
== REQUIREMENTS:
== INSTALL:
== LICENSE:
(The MIT License)
Copyright (c) 2008 Eric Monti - Matasano Security
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.