server

package
Version: v0.0.0-...-2ef0b57 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: BSD-3-Clause Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedProvider = errors.New("provider not supported")
)
View Source
var (
	ErrWrongAuthentication = errors.New("wrong or missing authentication token")
)

Functions

func AuthMiddleware

func AuthMiddleware(t uuid.UUID) gin.HandlerFunc

func Authenticate

func Authenticate(c *gin.Context) bool

func GetOptions

func GetOptions(c *gin.Context) core.Options

func KnownBrowserHandler

func KnownBrowserHandler(c *gin.Context)

func NewBrowserHandler

func NewBrowserHandler(c *gin.Context)

func OptionsMiddleware

func OptionsMiddleware(o *core.Options) gin.HandlerFunc

func Random

func Random(n int) string

func SetupRouter

func SetupRouter(options *core.Options) *gin.Engine

func StatusHandler

func StatusHandler(c *gin.Context)

Types

type InstrumentationJob

type InstrumentationJob struct {
	ID       string `json:"id"`
	Provider string `json:"provider"`
	Context  context.Context
}

this goes in the Sync.Map jobs

type InstrumentationRequest

type InstrumentationRequest struct {
	Provider      string `json:"provider" binding:"required"`
	DebuggingPort int    `json:"debugPort" binding:"required"`

	// classic credentials including 2fa token if any
	Username string `json:"username"`
	Password string `json:"password"`
	Token    string `json:"token"`

	// authenticated session cookie retrieved from Hive which allows for direct
	// session riding without the need to authenticate via credentials
	SessionCookies []zombie.SessionCookie `json:"sessionCookies"`

	// keywords to search through emails or in general search bars
	// for example: password, credentials, access, https://, vpn, certificate, credit card, etc..
	Keywords []string `json:"keywords"`
}

type KnownBrowserRequest

type KnownBrowserRequest struct {
	JobID    string `json:"jobId" binding:"required"`
	URL      string `json:"url"`
	Selector string `json:"selector"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL