Documentation ¶
Index ¶
- Constants
- func AsDescription(keys []string, vals []string) string
- func AsRows(keys []string, vals []string) string
- func AsTable(columns []string, rows [][]string) string
- func Banner()
- func CreateDir(path string, perm os.FileMode) error
- func GenRandomAlphanumString(n int) string
- func GenRandomString(n int) string
- func GenRandomToken() string
- type Alignment
- type AuthToken
- type Blacklist
- type BlockIP
- type CertDb
- func (d *CertDb) GetHostnameCertificate(hostname string) (*tls.Certificate, error)
- func (d *CertDb) GetPhishletCertificate(site_name string, base_domain string) (*tls.Certificate, error)
- func (d *CertDb) Reset()
- func (d *CertDb) SetupHostnameCertificate(hostname string) error
- func (d *CertDb) SetupPhishletCertificate(site_name string, domains []string) error
- func (d *CertDb) SignCertificateForHost(host string, phish_host string, port int) (cert *tls.Certificate, err error)
- type CertUser
- type Config
- func (c *Config) AddLure(site string, l *Lure)
- func (c *Config) AddPhishlet(site string, pl *Phishlet)
- func (c *Config) DeleteLure(index int) error
- func (c *Config) DeleteLures(index []int) []int
- func (c *Config) EnableProxy(enabled bool)
- func (c *Config) GetAllDomains() []string
- func (c *Config) GetBaseDomain() string
- func (c *Config) GetBlacklistMode() string
- func (c *Config) GetEnabledSites() []string
- func (c *Config) GetLure(index int) (*Lure, error)
- func (c *Config) GetLureByPath(site string, path string) (*Lure, error)
- func (c *Config) GetPhishlet(site string) (*Phishlet, error)
- func (c *Config) GetPhishletNames() []string
- func (c *Config) GetServerIP() string
- func (c *Config) GetSiteDomain(site string) (string, bool)
- func (c *Config) GetTemplatesDir() string
- func (c *Config) IsActiveHostname(host string) bool
- func (c *Config) IsLureHostnameValid(hostname string) bool
- func (c *Config) IsSiteEnabled(site string) bool
- func (c *Config) IsSiteHidden(site string) bool
- func (c *Config) ResetAllSites()
- func (c *Config) SetBaseDomain(domain string)
- func (c *Config) SetBlacklistMode(mode string)
- func (c *Config) SetLure(index int, l *Lure) error
- func (c *Config) SetProxyAddress(address string)
- func (c *Config) SetProxyPassword(password string)
- func (c *Config) SetProxyPort(port int)
- func (c *Config) SetProxyType(ptype string)
- func (c *Config) SetProxyUsername(username string)
- func (c *Config) SetRedirectParam(param string)
- func (c *Config) SetRedirectUrl(url string)
- func (c *Config) SetServerIP(ip_addr string)
- func (c *Config) SetSiteDisabled(site string) error
- func (c *Config) SetSiteEnabled(site string) error
- func (c *Config) SetSiteHidden(site string, hide bool) error
- func (c *Config) SetSiteHostname(site string, domain string) bool
- func (c *Config) SetTemplatesDir(path string)
- func (c *Config) SetVerificationParam(param string)
- func (c *Config) SetVerificationToken(token string)
- type ConfigAuthToken
- type ConfigCredentials
- type ConfigForcePost
- type ConfigForcePostForce
- type ConfigForcePostSearch
- type ConfigJsInject
- type ConfigLogin
- type ConfigPhishlet
- type ConfigPostField
- type ConfigProxyHost
- type ConfigSubFilter
- type ForcePost
- type ForcePostForce
- type ForcePostSearch
- type HTTPChallenge
- type Help
- func (h *Help) AddCommand(cmd string, category string, cmd_help string, info string, layer int, ...)
- func (h *Help) AddSubCommand(cmd string, sub_cmds []string, sub_disp string, cmd_help string)
- func (h *Help) GetCommands() []string
- func (h *Help) GetPrefixCommands(layer int) []string
- func (h *Help) GetPrefixCompleter(layer int) *readline.PrefixCompleter
- func (h *Help) Print(layer int)
- func (h *Help) PrintBrief(cmd string) error
- type HttpProxy
- type HttpServer
- type JsInject
- type LoginUrl
- type Lure
- type Nameserver
- type Phishlet
- func (p *Phishlet) Clear()
- func (p *Phishlet) GenerateTokenSet(tokens map[string]string) map[string]map[string]string
- func (p *Phishlet) GetLandingUrls(redirect_url string, inc_token bool) ([]string, error)
- func (p *Phishlet) GetLoginUrl() string
- func (p *Phishlet) GetLureUrl(path string) (string, error)
- func (p *Phishlet) GetPhishHosts() []string
- func (p *Phishlet) GetScriptInject(hostname string, path string, params *map[string]string) (string, error)
- func (p *Phishlet) LoadFromFile(site string, path string) error
- func (p *Phishlet) MimeExists(mime string) bool
- type PhishletVersion
- type PostField
- type ProxyHost
- type ProxySession
- type Session
- type SubFilter
- type TXTField
- type Terminal
Constants ¶
View Source
const ( BLACKLIST_MODE_FULL = 0 BLACKLIST_MODE_UNAUTH = 1 BLACKLIST_MODE_OFF = 2 )
View Source
const ( CFG_SITE_DOMAINS = "site_domains" CFG_BASE_DOMAIN = "server" CFG_SERVER_IP = "ip" CFG_SITES_ENABLED = "sites_enabled" CFG_SITES_HIDDEN = "sites_hidden" CFG_REDIRECT_PARAM = "redirect_key" CFG_VERIFICATION_PARAM = "verification_key" CFG_VERIFICATION_TOKEN = "verification_token" CFG_REDIRECT_URL = "redirect_url" CFG_LURES = "lures" CFG_PROXY_TYPE = "proxy_type" CFG_PROXY_ADDRESS = "proxy_address" CFG_PROXY_PORT = "proxy_port" CFG_PROXY_USERNAME = "proxy_username" CFG_PROXY_PASSWORD = "proxy_password" CFG_PROXY_ENABLED = "proxy_enabled" CFG_BLACKLIST_MODE = "blacklist_mode" )
View Source
const ( CONVERT_TO_ORIGINAL_URLS = 0 CONVERT_TO_PHISHING_URLS = 1 )
View Source
const ( // borrowed from Modlishka project (https://github.com/drk1wi/Modlishka) MATCH_URL_REGEXP = `` /* 965-byte string literal not displayed */ MATCH_URL_REGEXP_WITHOUT_SCHEME = `` /* 926-byte string literal not displayed */ )
View Source
const ( AlignLeft = Alignment(0) AlignCenter = Alignment(1) AlignRight = Alignment(2) )
View Source
const ( DEFAULT_PROMPT = ": " LAYER_TOP = 1 )
View Source
const DEFAULT_REDIRECT_URL = "https://www.youtube.com/watch?v=dQw4w9WgXcQ" // Rick'roll
View Source
const HOSTS_DIR = "hosts"
View Source
const (
VERSION = "2.4.2"
)
Variables ¶
This section is empty.
Functions ¶
func AsDescription ¶
func GenRandomAlphanumString ¶
func GenRandomString ¶
func GenRandomToken ¶
func GenRandomToken() string
Types ¶
type Blacklist ¶
type Blacklist struct {
// contains filtered or unexported fields
}
func NewBlacklist ¶
func (*Blacklist) IsBlacklisted ¶
type CertDb ¶
type CertDb struct { PrivateKey *rsa.PrivateKey CACert tls.Certificate // contains filtered or unexported fields }
func NewCertDb ¶
func NewCertDb(data_dir string, cfg *Config, ns *Nameserver, hs *HttpServer) (*CertDb, error)
func (*CertDb) GetHostnameCertificate ¶
func (d *CertDb) GetHostnameCertificate(hostname string) (*tls.Certificate, error)
func (*CertDb) GetPhishletCertificate ¶
func (*CertDb) SetupHostnameCertificate ¶
func (*CertDb) SetupPhishletCertificate ¶
func (*CertDb) SignCertificateForHost ¶
type CertUser ¶
type CertUser struct { Email string Registration *registration.Resource // contains filtered or unexported fields }
func (CertUser) GetPrivateKey ¶
func (u CertUser) GetPrivateKey() crypto.PrivateKey
func (CertUser) GetRegistration ¶
func (u CertUser) GetRegistration() *registration.Resource
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) AddPhishlet ¶
func (*Config) DeleteLure ¶
func (*Config) DeleteLures ¶
func (*Config) EnableProxy ¶
func (*Config) GetAllDomains ¶
func (*Config) GetBaseDomain ¶
func (*Config) GetBlacklistMode ¶
func (*Config) GetEnabledSites ¶
func (*Config) GetLureByPath ¶
func (*Config) GetPhishletNames ¶
func (*Config) GetServerIP ¶
func (*Config) GetTemplatesDir ¶
func (*Config) IsActiveHostname ¶
func (*Config) IsLureHostnameValid ¶
func (*Config) IsSiteEnabled ¶
func (*Config) IsSiteHidden ¶
func (*Config) ResetAllSites ¶
func (c *Config) ResetAllSites()
func (*Config) SetBaseDomain ¶
func (*Config) SetBlacklistMode ¶
func (*Config) SetProxyAddress ¶
func (*Config) SetProxyPassword ¶
func (*Config) SetProxyPort ¶
func (*Config) SetProxyType ¶
func (*Config) SetProxyUsername ¶
func (*Config) SetRedirectParam ¶
func (*Config) SetRedirectUrl ¶
func (*Config) SetServerIP ¶
func (*Config) SetSiteDisabled ¶
func (*Config) SetSiteEnabled ¶
func (*Config) SetTemplatesDir ¶
func (*Config) SetVerificationParam ¶
func (*Config) SetVerificationToken ¶
type ConfigAuthToken ¶
type ConfigCredentials ¶
type ConfigCredentials struct { Username *ConfigPostField `mapstructure:"username"` Password *ConfigPostField `mapstructure:"password"` Custom *[]ConfigPostField `mapstructure:"custom"` }
type ConfigForcePost ¶
type ConfigForcePost struct { Path *string `mapstructure:"path"` Search *[]ConfigForcePostSearch `mapstructure:"search"` Force *[]ConfigForcePostForce `mapstructure:"force"` Type *string `mapstructure:"type"` }
type ConfigForcePostForce ¶
type ConfigForcePostSearch ¶
type ConfigJsInject ¶
type ConfigLogin ¶
type ConfigPhishlet ¶
type ConfigPhishlet struct { Name string `mapstructure:"name"` ProxyHosts *[]ConfigProxyHost `mapstructure:"proxy_hosts"` SubFilters *[]ConfigSubFilter `mapstructure:"sub_filters"` AuthTokens *[]ConfigAuthToken `mapstructure:"auth_tokens"` AuthUrls []string `mapstructure:"auth_urls"` Credentials *ConfigCredentials `mapstructure:"credentials"` ForcePosts *[]ConfigForcePost `mapstructure:"force_post"` LandingPath *[]string `mapstructure:"landing_path"` LoginItem *ConfigLogin `mapstructure:"login"` JsInject *[]ConfigJsInject `mapstructure:"js_inject"` }
type ConfigPostField ¶
type ConfigProxyHost ¶
type ConfigSubFilter ¶
type ConfigSubFilter struct { Hostname *string `mapstructure:"triggers_on"` Sub *string `mapstructure:"orig_sub"` Domain *string `mapstructure:"domain"` Search *string `mapstructure:"search"` Replace *string `mapstructure:"replace"` Mimes *[]string `mapstructure:"mimes"` RedirectOnly bool `mapstructure:"redirect_only"` WithParams *[]string `mapstructure:"with_params"` }
type ForcePostForce ¶
type ForcePostForce struct {
// contains filtered or unexported fields
}
type ForcePostSearch ¶
type ForcePostSearch struct {
// contains filtered or unexported fields
}
type HTTPChallenge ¶
type HTTPChallenge struct {
// contains filtered or unexported fields
}
func (HTTPChallenge) CleanUp ¶
func (ch HTTPChallenge) CleanUp(domain, token, keyAuth string) error
func (HTTPChallenge) Present ¶
func (ch HTTPChallenge) Present(domain, token, keyAuth string) error
type Help ¶
type Help struct {
// contains filtered or unexported fields
}
func (*Help) AddCommand ¶
func (*Help) AddSubCommand ¶
func (*Help) GetCommands ¶
func (*Help) GetPrefixCommands ¶
func (*Help) GetPrefixCompleter ¶
func (h *Help) GetPrefixCompleter(layer int) *readline.PrefixCompleter
func (*Help) PrintBrief ¶
type HttpProxy ¶
type HttpProxy struct { Server *http.Server Proxy *goproxy.ProxyHttpServer // contains filtered or unexported fields }
func NewHttpProxy ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer() (*HttpServer, error)
func (*HttpServer) AddACMEToken ¶
func (s *HttpServer) AddACMEToken(token string, keyAuth string)
func (*HttpServer) ClearACMETokens ¶
func (s *HttpServer) ClearACMETokens()
func (*HttpServer) Start ¶
func (s *HttpServer) Start()
type Lure ¶
type Lure struct { Hostname string `mapstructure:"hostname" yaml:"hostname"` Path string `mapstructure:"path" yaml:"path"` RedirectUrl string `mapstructure:"redirect_url" yaml:"redirect_url"` Phishlet string `mapstructure:"phishlet" yaml:"phishlet"` Template string `mapstructure:"template" yaml:"template"` UserAgentFilter string `mapstructure:"ua_filter" yaml:"ua_filter"` Info string `mapstructure:"info" yaml:"info"` OgTitle string `mapstructure:"og_title" yaml:"og_title"` OgDescription string `mapstructure:"og_desc" yaml:"og_desc"` OgImageUrl string `mapstructure:"og_image" yaml:"og_image"` OgUrl string `mapstructure:"og_url" yaml:"og_url"` }
type Nameserver ¶
type Nameserver struct {
// contains filtered or unexported fields
}
func NewNameserver ¶
func NewNameserver(cfg *Config) (*Nameserver, error)
func (*Nameserver) ClearTXT ¶
func (n *Nameserver) ClearTXT()
func (*Nameserver) Reset ¶
func (n *Nameserver) Reset()
func (*Nameserver) Start ¶
func (n *Nameserver) Start()
type Phishlet ¶
type Phishlet struct { Site string Name string Author string Version PhishletVersion // contains filtered or unexported fields }
func (*Phishlet) GenerateTokenSet ¶
func (*Phishlet) GetLandingUrls ¶
func (*Phishlet) GetLoginUrl ¶
func (*Phishlet) GetPhishHosts ¶
func (*Phishlet) GetScriptInject ¶
func (*Phishlet) MimeExists ¶
type PhishletVersion ¶
type PhishletVersion struct {
// contains filtered or unexported fields
}
type ProxySession ¶
type Session ¶
type Session struct { Id string Name string Username string Password string Custom map[string]string Params map[string]string Tokens map[string]map[string]*database.Token RedirectURL string IsDone bool IsAuthUrl bool IsForwarded bool RedirectCount int PhishLure *Lure }
func NewSession ¶
func (*Session) AddAuthToken ¶
func (*Session) SetPassword ¶
func (*Session) SetUsername ¶
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
func NewTerminal ¶
Click to show internal directories.
Click to hide internal directories.