httpshellserver

package
v1.48.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// The HTTP address to bind to
	HTTPAddr string
	// The HTTP port to bind to
	HTTPPort int
	// Set to the Server field in HTTP response
	ServerField string
	// Indicates if TLS should be enabled
	TLS bool
	// The file path to the user provided private key (if provided)
	PrivateKeyFile string
	// The file path to the user provided certificate (if provided)
	CertificateFile string
	// Loaded certificate
	Certificate tls.Certificate
	// Allows us to track if a connection has been received during the life of the server
	Success bool
	// Randomly generated during init, gives some sense of security where there is otherwise none.
	// This should appear in a header with the name VC-Auth
	AuthHeader string
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *Server

A basic singleton interface for the c2.

func (*Server) Channel added in v1.43.0

func (httpServer *Server) Channel() *channel.Channel

Get the underlying C2 channel with metadata and session information.

func (*Server) CreateFlags

func (httpServer *Server) CreateFlags()

User options for serving a file over HTTP as the "c2".

func (*Server) Init

func (httpServer *Server) Init(channel *channel.Channel) bool

func (*Server) Run

func (httpServer *Server) Run(timeout int)

start the HTTP server and listen for incoming requests for `httpServer.FileName`.

func (*Server) Shutdown added in v1.43.0

func (httpServer *Server) Shutdown() bool

Shutdown the C2 server and cleanup all the sessions.

Jump to

Keyboard shortcuts

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