qsnetcat

package
v0.0.8-beta Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const SHELL = "/bin/bash -il"

Variables

View Source
var (
	PtyHeight int = 39
	PtyWidth  int = 157
)
View Source
var (
	ErrQsocketSessionEnd = errors.New("QSocket session has ended")
	ErrTtyFailed         = errors.New("TTY initialization failed")
	ErrUntrustedCert     = errors.New("Certificate fingerprint mismatch")
)

Functions

func AttachToPipe

func AttachToPipe(conn *qsocket.QSocket, opts *config.Options) error

func AttachToSocket

func AttachToSocket(conn *qsocket.QSocket, interactive bool) error

func Connect

func Connect(opts *config.Options) error

func CreateOnConnectPipe

func CreateOnConnectPipe(qs *qsocket.QSocket, addr string) error

func ExecCommand

func ExecCommand(conn *qsocket.QSocket, specs *SessionSpecs) error

func GetPeerTag

func GetPeerTag(opts *config.Options) qsocket.SocketType

func ProbeQSRN

func ProbeQSRN(opts *config.Options) error

func SendSessionSpecs

func SendSessionSpecs(qs *qsocket.QSocket, opts *config.Options) error

func ServeToLocal

func ServeToLocal(qs *qsocket.QSocket, opts *config.Options)

Types

type SessionSpecs

type SessionSpecs struct {
	Command     string
	ForwardAddr string
	TermSize    Winsize
	Interactive bool
}

func RecvSessionSpecs

func RecvSessionSpecs(qs *qsocket.QSocket, opts *config.Options) (*SessionSpecs, error)

type Winsize

type Winsize struct {
	Rows uint16 // ws_row: Number of rows (in cells)
	Cols uint16 // ws_col: Number of columns (in cells)
	X    uint16 // ws_xpixel: Width in pixels
	Y    uint16 // ws_ypixel: Height in pixels
}

Winsize describes the terminal window size

func GetCurrentTermSize

func GetCurrentTermSize() (*Winsize, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳