gopwntools

package module
v0.0.0-...-333df34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2025 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG int = iota
	INFO
	WARNING
	ERROR
	CRITICAL
)

Variables

This section is empty.

Functions

func Asm

func Asm(shellcode string) (sc []byte)

func B64d

func B64d(e string) []byte

B64d Base64-decodes a string

func B64e

func B64e(d []byte) string

B64e Base64-encodes a string

func Critical

func Critical(format string, v ...any)

func Debug

func Debug(format string, v ...any)

func Error

func Error(format string, v ...any)

func Failure

func Failure(format string, v ...any)

func Hex

func Hex(b []byte) string

Hex creates a hex-string from a byte slice

func Info

func Info(format string, v ...any)

func P8

func P8(v uint8) []byte

P8 packs an 8-bit unsigned integer

func P16

func P16(v uint16) []byte

P16 packs a 16-bit unsigned integer

func P32

func P32(v uint32) []byte

P32 packs a 32-bit unsigned integer

func P64

func P64(v uint64) []byte

P64 packs a 64-bit unsigned integer

func Progress

func Progress(title string) progressBar

func SetContext

func SetContext(c Context)

func Success

func Success(format string, v ...any)

func U8

func U8(b []byte) uint8

U8 unpacks an 8-bit unsigned integer

func U16

func U16(b []byte) uint16

U16 unpacks a 16-bit unsigned integer

func U32

func U32(b []byte) uint32

U32 unpacks a 32-bit unsigned integer

func U64

func U64(b []byte) uint64

U64 unpacks a 64-bit unsigned integer

func UnHex

func UnHex(h string) []byte

UnHex hex-decodes a string

func Warning

func Warning(format string, v ...any)

func Xor

func Xor(a []byte, b ...[]byte) []byte

Xor applies a byte-wise XOR operation to the byte slices passed as arguments

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func Listen

func Listen[V number](port V) *Conn

func ListenWithConf

func ListenWithConf[V number](port V, conf ListenConf) *Conn

func Process

func Process(command string, args ...string) *Conn

func ProcessWithConf

func ProcessWithConf(argv []string, conf ProcessConf) *Conn

func Remote

func Remote[V number](host string, port V) *Conn

func RemoteWithConf

func RemoteWithConf[V number](host string, port V, conf RemoteConf) *Conn

func (*Conn) Close

func (conn *Conn) Close()

func (*Conn) Interactive

func (conn *Conn) Interactive(prompt ...string)

func (*Conn) Recv

func (conn *Conn) Recv(n ...int) []byte

func (*Conn) RecvLine

func (conn *Conn) RecvLine() []byte

func (*Conn) RecvLineContains

func (conn *Conn) RecvLineContains(pattern []byte) (recv []byte)

func (*Conn) RecvLineContainsS

func (conn *Conn) RecvLineContainsS(pattern []byte) string

func (*Conn) RecvLineS

func (conn *Conn) RecvLineS() string

func (*Conn) RecvN

func (conn *Conn) RecvN(n int) []byte

func (*Conn) RecvNS

func (conn *Conn) RecvNS(n int) string

func (*Conn) RecvS

func (conn *Conn) RecvS(max ...int) string

func (*Conn) RecvUntil

func (conn *Conn) RecvUntil(pattern []byte, drop ...bool) (recv []byte)

func (*Conn) RecvUntilS

func (conn *Conn) RecvUntilS(pattern []byte, drop ...bool) string

func (*Conn) Send

func (conn *Conn) Send(data []byte) int

func (*Conn) SendAfter

func (conn *Conn) SendAfter(pattern, data []byte) []byte

func (*Conn) SendAfterS

func (conn *Conn) SendAfterS(pattern, data string) []byte

func (*Conn) SendLine

func (conn *Conn) SendLine(data []byte) int

func (*Conn) SendLineAfter

func (conn *Conn) SendLineAfter(pattern, data []byte) []byte

func (*Conn) SendLineAfterS

func (conn *Conn) SendLineAfterS(pattern, data string) []byte

func (*Conn) SendLineS

func (conn *Conn) SendLineS(data string) int

func (*Conn) SendS

func (conn *Conn) SendS(data string) int

type Context

type Context struct {
	LogLevel int
}

type ListenConf

type ListenConf struct {
	Ip       string
	Protocol string
}

type ProcessConf

type ProcessConf struct {
	Env       []string
	IgnoreEnv bool
	Cwd       string
}

type RemoteConf

type RemoteConf struct {
	Protocol string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL