Documentation ¶
Overview ¶
Package session contains code to manage the interactive session, modules, environment, etc.
Index ¶
- Constants
- func AsTag(name string) string
- func Prompt(s *Session)
- type Configuration
- type Module
- type Session
- type SessionModule
- func (m *SessionModule) Debug(format string, args ...interface{})
- func (m *SessionModule) Error(format string, args ...interface{})
- func (m *SessionModule) Fatal(format string, args ...interface{})
- func (m *SessionModule) Important(format string, args ...interface{})
- func (m *SessionModule) Info(format string, args ...interface{})
- func (m *SessionModule) Warning(format string, args ...interface{})
Constants ¶
View Source
const (
InvalidCommand = "invalid option, enter help for assistance"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { Protocol string `json:"-"` InstrumentationPort int `json:"-"` SkipExtensions []string `json:"-"` // // Proxy rules // Proxy struct { Phishing string `json:"phishing"` Target string `json:"destination"` SkipContentType []string `json:"skipContentType"` Transform struct { Base64 struct { Enabled bool `json:"enabled"` Padding []string `json:"padding"` } `json:"base64"` Request struct { Header []string `json:"header"` } `json:"request"` Response struct { Header []string `json:"header"` Body struct { Universal [][]string `json:"universal"` Custom [][]string `json:"custom"` } `json:"body"` } `json:"response"` } `json:"transform"` Remove struct { Request struct { Header []string `json:"header"` } `json:"request"` Response struct { Header []string `json:"header"` } `json:"response"` } `json:"remove"` Drop []struct { Url string `json:"url"` RedirectTo string `json:"redirectTo"` } `json:"drop"` Log struct { Enabled bool `json:"enabled"` FilePath string `json:"filePath"` BufferedLogDelay time.Duration `json:"bufferedLogDelay"` } `json:"log"` } `json:"proxy"` // // TLS // TLS struct { Enabled bool `json:"enabled"` Expand bool `json:"expand"` Certificate string `json:"certificate"` CertificateFile string `json:"-"` Key string `json:"key"` KeyFile string `json:"-"` Root string `json:"root"` RootFile string `json:"-"` } `json:"tls"` Crawler struct { Enabled bool `json:"enabled"` Depth int `json:"depth"` UpTo int `json:"upto"` ExternalOriginPrefix string `json:"externalOriginPrefix"` ExternalOrigins []string `json:"externalOrigins"` OriginsMapping map[string]string `json:"-"` } `json:"crawler"` // // Necrobrowser // NecroBrowser struct { Enabled bool `json:"enabled"` Endpoint string `json:"endpoint"` Token string `json:"token"` Profile string `json:"profile"` Keywords []string `json:"keywords"` } `json:"necrobrowser"` // // Static Server // StaticServer struct { Enabled bool `json:"enabled"` Port int `json:"port"` LocalPath string `json:"localPath"` URLPath string `json:"urlPath"` } `json:"staticServer"` // // Tracking // Tracking struct { Enabled bool `json:"enabled"` Type string `json:"type"` Identifier string `json:"identifier"` Regex string `json:"regex"` Urls struct { Credentials []string `json:"credentials"` AuthSession []string `json:"authSession"` } `json:"urls"` Params []string `json:"params"` Patterns []struct { Label string `json:"label"` Matching string `json:"matching"` Start string `json:"start"` End string `json:"end"` } `json:"patterns"` } `json:"tracking"` }
Configuration struct for JSON configuration
type Session ¶
type Session struct { Options core.Options `json:"options"` Config *Configuration `json:"configuration"` Modules moduleList `json:"modules"` }
Session structure
func (*Session) GetConfiguration ¶
GetConfiguration returns the configuration object
func (*Session) UpdateConfiguration ¶
type SessionModule ¶
type SessionModule struct { Session *Session Name string // contains filtered or unexported fields }
func NewSessionModule ¶
func NewSessionModule(name string, s *Session) SessionModule
func (*SessionModule) Debug ¶
func (m *SessionModule) Debug(format string, args ...interface{})
func (*SessionModule) Error ¶
func (m *SessionModule) Error(format string, args ...interface{})
func (*SessionModule) Fatal ¶
func (m *SessionModule) Fatal(format string, args ...interface{})
func (*SessionModule) Important ¶
func (m *SessionModule) Important(format string, args ...interface{})
func (*SessionModule) Info ¶
func (m *SessionModule) Info(format string, args ...interface{})
func (*SessionModule) Warning ¶
func (m *SessionModule) Warning(format string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.