vulinbox

package
v0.0.0-...-9a26220 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: AGPL-3.0 Imports: 69 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Login []byte
View Source
var MallGroup *mux.Router
View Source
var VulinBoxTables = []any{
	&VulinUser{},
	&Session{},
	&UserOrder{},
	&UserCart{},
}

Functions

func BlockContent

func BlockContent(i ...string) string

func DefaultRender

func DefaultRender(innerHtml any, writer http.ResponseWriter, request *http.Request, paramIns ...map[string]any)

func DefaultRenderEx

func DefaultRenderEx(override bool, innerHtml any, writer http.ResponseWriter, request *http.Request, paramIns ...map[string]any)

func Failed

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

func ForceEnsureCookie

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

func GetSensitiveFile

func GetSensitiveFile(name string) []byte

func LoadFromBodyJsonParams

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

func LoadFromGetBase64JSONParam

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

func LoadFromGetBase64Params

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

func LoadFromGetJSONParam

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

func LoadFromGetParams

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

func LoadFromPostBase64JSONParams

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

func LoadFromPostBase64Params

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

func LoadFromPostJSONParams

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

func LoadFromPostParams

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

func NewVulinServer

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

func NewVulinServerEx

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

func NewVulinboxAgent

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

func Pipeline

func Pipeline(ctx context.Context, port int) error

func Smuggle

func Smuggle(ctx context.Context, port int) error

func UnsafeRender

func UnsafeRender(title string, data []byte) []byte

Types

type EvFunc

type EvFunc func([]byte) (any, error)

type GroupedRoutes

type GroupedRoutes struct {
	GroupName string
	SafeStyle string
	VulInfos  []*VulInfo
}

type JsonParser

type JsonParser func(data string) (map[string]any, error)

type Session

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

type UserCart

type UserCart struct {
	gorm.Model
	UserID          int     `gorm:"column:UserID"`          //用户ID
	ProductName     string  `gorm:"column:ProductName"`     //商品名称
	Description     string  `gorm:"column:Description"`     //商品描述
	ProductPrice    float64 `gorm:"column:ProductPrice"`    //商品价格
	ProductQuantity int     `gorm:"column:ProductQuantity"` //商品数量
	TotalPrice      float64 `gorm:"column:TotalPrice"`      //商品总价
}

type UserOrder

type UserOrder struct {
	gorm.Model
	UserID         int     `gorm:"column:UserID"`         //用户ID
	ProductName    string  `gorm:"column:ProductName"`    //商品名称
	Quantity       int     `gorm:"column:Quantity"`       //数量
	TotalPrice     float64 `gorm:"column:TotalPrice"`     //总价
	DeliveryStatus string  `gorm:"column:DeliveryStatus"` //发货状态

}

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 VulInfo

type VulInfo struct {
	Handler      func(http.ResponseWriter, *http.Request) `json:"-"`
	Path         string
	DefaultQuery string
	// 名称
	Title string
	// 是否期望检出 Risk
	RiskDetected bool
	Headers      []*ypb.KVPair
	// 具体期望结果
	ExpectedResult map[string]int
}

func (*VulInfo) GetHandler

func (v *VulInfo) GetHandler() http.HandlerFunc

func (*VulInfo) GetPath

func (v *VulInfo) GetPath() string

type VulInfoIf

type VulInfoIf interface {
	Path() string
	Handler() http.HandlerFunc
}

type VulinServer

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

func (*VulinServer) GetGroupVulInfos

func (s *VulinServer) GetGroupVulInfos(group string) []*VulInfo

func (*VulinServer) RegisterUserHandler

func (s *VulinServer) RegisterUserHandler(writer http.ResponseWriter, request *http.Request)

type VulinUser

type VulinUser struct {
	gorm.Model

	Username string
	Password string
	Age      int

	Role string // 添加角色字段

	Remake string // 添加备注字段

}

func (*VulinUser) CreateSession

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