haypo / python-ptrace

python-ptrace is a debugger using ptrace (Linux, BSD and Darwin system call to trace processes) written in Python. python-ptrace is an opensource project (contribute!) written in Python under GNU GPLv2 license.

Clone this repository (size: 217.8 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/haypo/python-ptrace/

python-ptrace is a debugger using ptrace (Linux, BSD and Darwin system call to trace processes) written in Python.

python-ptrace is an opensource project (contribute!) written in Python under GNU GPLv2 license.

Features

  • High level Python object API : PtraceDebugger and PtraceProcess
  • Able to control multiple processes: catch fork events on Linux
  • Read/write bytes to arbitrary address: take care of memory alignment and split bytes to cpu word
  • Execution step by step using ptrace_singlestep() or hardware interruption 3
  • Can use distorm disassembler
  • Dump registers, memory mappings, stack, etc.
  • Syscall tracer and parser (strace.py command)

Download

Read INSTALL for the installation procedure.

Download development version using Subversion:

svn co http://python-ptrace.hachoir.org/svn/trunk python-ptrace

Browse python-ptrace source code

Status

Some important features are missing:

  • Symbols: it's not possible to break on a function or read a variable value
  • No C language support: debugger shows assembler code, not your C (C++ or other language) code!
  • No thread support

python-ptrace works on:

  • Linux version 2.6.20 on i386, x86_64 and PPC32 (may works on Linux 2.4.x and 2.6.x)
  • FreeBSD version 6.2 and 7.0 on i386 (may works on FreeBSD 5.x)

Pages

News

  • 2009-11-09: Release of python-ptrace 0.6.2
  • 2009-07-31: Project website moved to http://bitbucket.org/haypo/python-ptrace/
  • 2009-02-13: Release of python-ptrace 0.6
  • 2008-09-13: Release of python-ptrace 0.5
  • Parse socket syscalls for FreeBSD
  • Avoid creation of zombi process on FreeBSD
  • Most basic Windows support

Project using python-ptrace


This revision is from 2009-11-09 01:59