Documentation ¶
Overview ¶
*
## ## ######## ## ## ####### ######## ######## ######## ######## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ###### ## ## ## ## ## ######## ## ## ###### ######## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ### ### ####### ## ## ######## ######## ## ##
"NewOrder" - Reverse Proxy SE "CHANGE THE WORLD..." Copyright 2022 (C) NEMESIS. neworder@tutamail.com. All rights reserved.
*
Package session contains code to manage the interactive session, modules, environment, etc.
*
## ## ######## ## ## ####### ######## ######## ######## ######## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ###### ## ## ## ## ## ######## ## ## ###### ######## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ### ### ####### ## ## ######## ######## ## ##
"NewOrder" - Reverse Proxy SE "CHANGE THE WORLD..." Copyright 2022 (C) NEMESIS. neworder@tutamail.com. All rights reserved.
*
*
## ## ######## ## ## ####### ######## ######## ######## ######## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ###### ## ## ## ## ## ######## ## ## ###### ######## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ### ### ####### ## ## ######## ######## ## ##
"NewOrder" - Reverse Proxy SE "CHANGE THE WORLD..." Copyright 2022 (C) NEMESIS. neworder@tutamail.com. All rights reserved.
*
Index ¶
- Constants
- Variables
- func AsTag(name string) string
- func DoModulePrompt(module string, items []string) (result string, err error)
- func Prompt(s *Session)
- type Configuration
- type Module
- type Session
- func (s *Session) GetConfiguration() (err error)
- func (s *Session) GetModuleNames() (mods []string)
- func (s *Session) InitRedis() error
- func (s *Session) Module(name string) (mod Module, err error)
- func (s *Session) Register(mod Module, err error)
- func (s *Session) UpdateConfiguration(domains *[]string) (err error)
- type SessionModule
- func (m *SessionModule) Debug(format string, args ...interface{})
- func (m *SessionModule) Err(error error)
- 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) Raw(format string, args ...interface{})
- func (m *SessionModule) Warning(format string, args ...interface{})
Constants ¶
const ( DefaultIP = "127.0.0.1" DefaultListener = "tcp" DefaultHTTPPort = 80 DefaultHTTPSPort = 443 )
const (
InvalidCommand = "invalid option, enter help for assistance"
)
Variables ¶
var (
RedisPool *redis.Pool
)
Functions ¶
func DoModulePrompt ¶
DoModulePrompt generates a prompt for a specific module
Types ¶
type Configuration ¶
type Configuration struct { Protocol string `toml:"-"` SkipExtensions []string `toml:"-"` // // Proxy rules // Proxy struct { Phishing string `toml:"phishing"` Target string `toml:"destination"` IP string `toml:"IP"` Listener string `toml:"listener"` Port int `toml:"port"` PortMap string `toml:"portmapping"` HTTPtoHTTPS struct { Enabled bool `toml:"enabled"` HTTPport int `toml:"HTTPport"` } `toml:"HTTPtoHTTPS"` } `toml:"proxy"` // // Transforming rules // Transform struct { Base64 struct { Enabled bool `toml:"enabled"` Padding []string `toml:"padding"` } `toml:"base64"` SkipContentType []string `toml:"skipContentType"` Request struct { Headers []string `toml:"headers"` } `toml:"request"` Response struct { Headers []string `toml:"headers"` Custom [][]string `toml:"content"` } `toml:"response"` } `toml:"transform"` // // Wiping rules // Remove struct { Request struct { Headers []string `toml:"headers"` } `toml:"request"` Response struct { Headers []string `toml:"headers"` } `toml:"response"` } `toml:"remove"` // // Crafting rules // TODO: Merge this with Wiping rule in some standard approach // Craft struct { Add struct { Request struct { Headers []struct { Name string `toml:"name"` Value string `toml:"value"` } `toml:"headers"` } `toml:"request"` Response struct { Headers []struct { Name string `toml:"name"` Value string `toml:"value"` } `toml:"headers"` } `toml:"response"` } `toml:"add"` } `toml:"craft"` // // Redirection rules // Drop []struct { Path string `toml:"path"` RedirectTo string `toml:"redirectTo"` } `toml:"drop"` // // Logging // Log struct { Enabled bool `toml:"enabled"` FilePath string `toml:"filePath"` } `toml:"log"` // // DB (Redis) // Redis struct { Host string `toml:"host"` Port int `toml:"port"` Password string `toml:"password"` } `toml:"redis"` // // TLS // TLS struct { Enabled bool `toml:"enabled"` Expand bool `toml:"expand"` Certificate string `toml:"certificate"` Key string `toml:"key"` Root string `toml:"root"` CertificateContent string `toml:"-"` KeyContent string `toml:"-"` RootContent string `toml:"-"` // Minimum supported TLS version: SSL3, TLS1, TLS1.1, TLS1.2, TLS1.3 MinVersion string `toml:"minVersion"` PreferServerCipherSuites bool `toml:"preferServerCipherSuites"` SessionTicketsDisabled bool `toml:"SessionTicketsDisabled"` InsecureSkipVerify bool `toml:"insecureSkipVerify"` RenegotiationSupport string `toml:"renegotiationSupport"` } `toml:"tls"` Crawler struct { Enabled bool `toml:"enabled"` Depth int `toml:"depth"` UpTo int `toml:"upto"` ExternalOriginPrefix string `toml:"externalOriginPrefix"` ExternalOrigins []string `toml:"externalOrigins"` OriginsMapping map[string]string `toml:"-"` } `toml:"crawler"` // // Necrobrowser // NecroBrowser struct { Enabled bool `toml:"enabled"` Endpoint string `toml:"endpoint"` Profile string `toml:"profile"` Keepalive struct { Enabled bool `toml:"enabled"` Minutes int `toml:"minutes"` } `toml:"keepalive"` Trigger struct { Type string `toml:"type"` Values []string `toml:"values"` Delay int `toml:"delay"` } `toml:"trigger"` } `toml:"necrobrowser"` // // Static Server // StaticServer struct { Enabled bool `toml:"enabled"` Port int `toml:"port"` LocalPath string `toml:"localPath"` URLPath string `toml:"urlPath"` } `toml:"staticServer"` // // Watchdog // Watchdog struct { Enabled bool `toml:"enabled"` Dynamic bool `toml:"dynamic"` Rules string `toml:"rules"` GeoDB string `toml:"geoDB"` } `toml:"watchdog"` // // Tracking // Tracking struct { Enabled bool `toml:"enabled"` Type string `toml:"type"` Identifier string `toml:"identifier"` Header string `toml:"header"` Landing string `toml:"landing"` Domain string `toml:"domain"` IPSource string `toml:"ipSource"` Regex string `toml:"regex"` RedirectTo string `toml:"redirectTo"` Urls struct { Credentials []string `toml:"credentials"` AuthSession []string `toml:"authSession"` } `toml:"urls"` Patterns []struct { Label string `toml:"label"` Matching string `toml:"matching"` Start string `toml:"start"` End string `toml:"end"` } `toml:"patterns"` } `toml:"tracking"` }
Configuration
type Session ¶
type Session struct { Options core.Options Config *Configuration Modules moduleList }
Session structure
func (*Session) GetConfiguration ¶
GetConfiguration returns the configuration object
func (*Session) GetModuleNames ¶
GetModuleNames returns a list of available modules
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) Err ¶
func (m *SessionModule) Err(error error)
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) Raw ¶
func (m *SessionModule) Raw(format string, args ...interface{})
func (*SessionModule) Warning ¶
func (m *SessionModule) Warning(format string, args ...interface{})