vulinbox

package
v1.2.3-sp1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: AGPL-3.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionUDP       = "udp"
	ActionAck       = "ack"
	ActionDataback  = "databack"
	ActionSubscribe = "subscribe"
	ActionPing      = "ping"
)

Variables

This section is empty.

Functions

func Failed added in v1.2.3

func Failed(writer http.ResponseWriter, r *http.Request, msg string, items ...any)

func ForceEnsureCookie added in v1.2.3

func ForceEnsureCookie(writer http.ResponseWriter, r *http.Request, key, val string) bool

func LoadFromBodyJsonParams added in v1.2.3

func LoadFromBodyJsonParams(req *http.Request, name string) string

func LoadFromGetBase64JSONParam added in v1.2.3

func LoadFromGetBase64JSONParam(req *http.Request, containerName, name string) string

func LoadFromGetBase64Params added in v1.2.3

func LoadFromGetBase64Params(req *http.Request, name string) string

func LoadFromGetJSONParam added in v1.2.3

func LoadFromGetJSONParam(req *http.Request, paramsContainer, name string) string

func LoadFromGetParams added in v1.2.3

func LoadFromGetParams(req *http.Request, name string) string

func LoadFromPostBase64JSONParams added in v1.2.3

func LoadFromPostBase64JSONParams(req *http.Request, container, name string) string

func LoadFromPostBase64Params added in v1.2.3

func LoadFromPostBase64Params(req *http.Request, name string) string

func LoadFromPostJSONParams added in v1.2.3

func LoadFromPostJSONParams(req *http.Request, paramsContainer, name string) string

func LoadFromPostParams added in v1.2.3

func LoadFromPostParams(req *http.Request, name string) string

func MessageMux

func MessageMux(data []byte, ack func(ack *AckAction))

func NewVulinServer

func NewVulinServer(ctx context.Context, port ...int) (string, error)

func NewVulinServerEx added in v1.2.2

func NewVulinServerEx(ctx context.Context, noHttps, safeMode bool, host string, ports ...int) (string, error)

func NewVulinboxAgent added in v1.2.3

func NewVulinboxAgent(ctx context.Context, port ...int) (string, error)

Types

type AckAction

type AckAction struct {
	AgentProtocol
	Status string `json:"status"`
	Data   any    `json:"data"`
}

type AgentProtocol

type AgentProtocol struct {
	ActionId uint32 `json:"id"`
	Action   string `json:"action"`
}

type DatabackAction

type DatabackAction struct {
	AgentProtocol
	Type string `json:"type"`
	Data any    `json:"data"`
}

type PingAction

type PingAction struct {
	AgentProtocol
}

type Session added in v1.2.3

type Session struct {
	gorm.Model
	Uuid     string
	Username string
	Role     string
}

type SubscribeAction

type SubscribeAction struct {
	AgentProtocol
	Subscribe []string `json:"subscribe"`
}

type UDPAction

type UDPAction struct {
	AgentProtocol
	// base64 encoded content
	Content     string         `json:"content"`
	Target      netip.AddrPort `json:"target"`
	WaitTimeout time.Duration  `json:"wait_timeout"`
}

type VirtualYakExecServer

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

func NewVirtualYakExecServerWithMessageHandle

func NewVirtualYakExecServerWithMessageHandle(h func(result *ypb.ExecResult) error) *VirtualYakExecServer

func (*VirtualYakExecServer) Context

func (v *VirtualYakExecServer) Context() context.Context

func (*VirtualYakExecServer) RecvMsg

func (v *VirtualYakExecServer) RecvMsg(m interface{}) error

func (*VirtualYakExecServer) Send

func (v *VirtualYakExecServer) Send(result *ypb.ExecResult) error

func (*VirtualYakExecServer) SendHeader

func (v *VirtualYakExecServer) SendHeader(md grpcMetadata.MD) error

func (*VirtualYakExecServer) SendMsg

func (v *VirtualYakExecServer) SendMsg(m interface{}) error

func (*VirtualYakExecServer) SetHeader

func (v *VirtualYakExecServer) SetHeader(md grpcMetadata.MD) error

func (*VirtualYakExecServer) SetTrailer

func (v *VirtualYakExecServer) SetTrailer(md grpcMetadata.MD)

type VulinServer

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

type VulinUser

type VulinUser struct {
	gorm.Model

	Username string
	Password string
	Age      int

	Role string // 添加角色字段

	Remake string // 添加备注字段

}

func (*VulinUser) CreateSession added in v1.2.3

func (v *VulinUser) CreateSession(dbm *dbm) (session Session, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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