Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TmuxTerminal = terminal{"tmux", "splitw", "-h"} XtermTerminal = terminal{"xterm", "-e"} GnomeTerminal = terminal{"gnome-terminal", "--"} )
var (
ErrTerminalNotFound = errors.New("can't get terminal")
)
Functions ¶
func Debug ¶
Debug starts a gdb debugging session for the given client. It returns an error if the client is not a *conn or if the underlying process is not a *bin. The function also returns an error if it can't spawn a terminal to attach to the process or if the process hasn't attached to gdb after the given timeout.
The function try to use terminals of different types (tmux, xterm, gnome-terminal)
func WithTerminal ¶
func WithTerminal(term terminal) func(*debugger)
WithTerminal returns an option that sets the terminal to use when spawning gdb to attach to the process. If this option is not used, the terminal is tried to be determined automatically.
Types ¶
type Client ¶
type Client interface {
io.ReadWriteCloser
ReadAll() (out []byte, n int, err error)
ReadUntil(data []byte) (out []byte, err error)
ReadLine() (out []byte, err error)
WriteLine(b []byte) error
WriteStringLine(s string) error
Interactive()
}
Client is an interface that represents a pwn client (binary, tcp, udp, etc).
func NewBinary ¶
NewBinary creates a new binary client given a path to a binary. It returns a new client from the given binary. Function panics on error.