Documentation
¶
Index ¶
- Constants
- Variables
- func CleanSpiltCFLR(s string) []string
- func CollectHttpResponse(result *Result, resp *http.Response)
- func CollectParsedResponse(result *Result, resp *parsers.Response)
- func CollectSocketResponse(result *Result, socketContent []byte)
- func CollectTLS(result *Result, resp *http.Response)
- func Decode(input string) []byte
- func FormatCertDomains(domains []string) []string
- func GetFilename(config *Config, name string) string
- func GetStatusCode(content []byte) (bool, string)
- func HTTPGet(client *http.Client, url string) (*http.Response, error)
- func HasPingPriv() bool
- func HttpConn(delay int) *http.Client
- func HttpConnWithNoRedirect(delay int) *http.Client
- func LoadConfig(typ string) []byte
- func LoadExtractor()
- func LoadFinger() error
- func LoadNeutron(filename string) map[string][]*templates.Template
- func LoadPortConfig(portConfig string) error
- func LoadResultFile(file io.Reader) interface{}
- func LoadTemplates(content []byte) map[string][]*templates.Template
- func ParserCmdPayload(payloads []string) map[string]interface{}
- func WriteSmartResult(file *files.File, target string, ips []string)
- type Config
- func (config *Config) Close()
- func (config *Config) GetTarget() string
- func (config *Config) GetTargetName() string
- func (config *Config) HasAlivedScan() bool
- func (config *Config) InitFile() error
- func (config *Config) InitIP() error
- func (config *Config) IsBSmart() bool
- func (config *Config) IsCSmart() bool
- func (config *Config) IsScan() bool
- func (config *Config) IsSmart() bool
- func (config *Config) ToJson(json_type string) string
- func (config *Config) Validate() error
- type PortMapResult
- type Result
- func (result *Result) AddExtract(extract *parsers.Extracted)
- func (result *Result) AddExtracts(extracts []*parsers.Extracted)
- func (result *Result) AddFramework(f *common.Framework)
- func (result *Result) AddFrameworks(fs []*common.Framework)
- func (result *Result) AddNTLMInfo(m map[string]string, t string)
- func (result *Result) AddVuln(vuln *common.Vuln)
- func (result *Result) AddVulns(vulns []*common.Vuln)
- func (result *Result) AddVulnsAndFrameworks(fs common.Frameworks, vs common.Vulns)
- func (result *Result) Filter(rules [][]string) bool
- func (result *Result) GetHostBaseURL() string
- func (result *Result) GetHostURL() string
- func (result *Result) GetHttpConn(delay int) *http.Client
- func (result *Result) GuessFramework()
- func (result *Result) IsHttps() bool
- func (result *Result) String() string
- func (result *Result) ToContent() *fingers.Content
- type ResultsData
- type SmartResult
- type Socket
- type Workflow
- type WorkflowMap
Constants ¶
View Source
const ( SMART = "s" // 使用port-probe探测存活的c段, 递归下降到default SUPERSMART = "ss" // 使用ip-probe探测存活的b段, 递归下降到s SUPERSMARTC = "sb" // 使用port-probe探测到c段后退出 SUPERSMARTB = "sc" // 使用ip-probe探测存活的b段,. 递归下降到sb Default = "default" // 扫描完后退出 )
Variables ¶
View Source
var ( ProxyUrl *url.URL Proxy func(*http.Request) (*url.URL, error) HttpTimeout time.Duration DefaultTransport = &http.Transport{ Proxy: Proxy, TLSClientConfig: &tls.Config{ MinVersion: tls.VersionTLS10, Renegotiation: tls.RenegotiateOnceAsClient, InsecureSkipVerify: true, }, DialContext: (&net.Dialer{ Timeout: HttpTimeout, KeepAlive: HttpTimeout, }).DialContext, MaxIdleConnsPerHost: 1, MaxIdleConns: 4000, IdleConnTimeout: HttpTimeout, DisableKeepAlives: false, } )
View Source
var ( FingerEngine *fingers.FingersEngine Extractor []*parsers.Extractor Extractors = make(parsers.Extractors) ExtractRegexps = map[string][]*parsers.Extractor{} )
View Source
var ExecuterOptions *protocols.ExecuterOptions = &protocols.ExecuterOptions{ Options: &protocols.Options{ Timeout: 5, }, }
View Source
var PortStat = map[int]string{
0: "open",
1: "closed",
2: "filtered|closed",
3: "noroute",
4: "denied",
5: "down",
6: "error_host",
7: "icmp",
8: "rst",
-1: "unknown",
}
return open: 0, closed: 1, filtered: 2, noroute: 3, denied: 4, down: 5, error_host: 6, unkown: -1
View Source
var ProxyDialTimeout func(network, address string, timeout time.Duration) (net.Conn, error)
View Source
var RandomDir = "/g8kZMwp4oeKsL2in"
View Source
var TemplateMap map[string][]*templates.Template
Functions ¶
func CleanSpiltCFLR ¶ added in v2.10.4
func CollectHttpResponse ¶ added in v2.12.2
func CollectParsedResponse ¶ added in v2.12.2
func CollectSocketResponse ¶ added in v2.12.2
func CollectTLS ¶ added in v2.12.2
func FormatCertDomains ¶
func GetFilename ¶
func GetStatusCode ¶
GetStatusCode 从socket中获取http状态码
func HasPingPriv ¶
func HasPingPriv() bool
func HttpConnWithNoRedirect ¶ added in v2.11.3
func LoadConfig ¶
func LoadExtractor ¶ added in v2.10.4
func LoadExtractor()
func LoadNeutron ¶ added in v2.10.7
func LoadPortConfig ¶
func LoadResultFile ¶
func ParserCmdPayload ¶
Types ¶
type Config ¶
type Config struct { *parsers.GOGOConfig // ip CIDRs utils.CIDRs `json:"-"` Excludes []string `json:"-"` // port and probe //Ports string `json:"ports"` // 预设字符串 PortList []string `json:"-"` // 处理完的端口列表 PortProbe string `json:"-"` // 启发式扫描预设探针 PortProbeList []string `json:"-"` // 启发式扫描预设探针 IpProbe string `json:"-"` IpProbeList []uint `json:"-"` // file IsListInput bool `json:"-"` // 从标准输入中读 IsJsonInput bool `json:"-"` // 从标准输入中读 NoSpray bool `json:"-"` Compress bool `json:"-"` // output FilePath string `json:"-"` Filename string `json:"-"` SmartBFilename string `json:"-"` SmartCFilename string `json:"-"` AlivedFilename string `json:"-"` File *files.File `json:"-"` SmartBFile *files.File `json:"-"` SmartCFile *files.File `json:"-"` AliveFile *files.File `json:"-"` Tee bool `json:"-"` Outputf string `json:"-"` FileOutputf string `json:"-"` Filenamef string `json:"-"` Results parsers.GOGOResults `json:"-"` // json反序列化后的,保存在内存中 HostsMap map[string][]string `json:"-"` // host映射表 Filters []string `json:"-"` FilterOr bool `json:"-"` OutputFilters [][]string `json:"-"` }
func (*Config) GetTargetName ¶
func (*Config) HasAlivedScan ¶
type PortMapResult ¶ added in v2.10.5
type PortMapResult map[string]*parsers.GOGOResult
func (PortMapResult) Get ¶ added in v2.10.5
func (imap PortMapResult) Get(port string) *parsers.GOGOResult
type Result ¶
type Result struct { *parsers.GOGOResult HttpHosts []string `json:"-"` CurrentHost string `json:"-"` IsHttp bool `json:"-"` Filtered bool `json:"-"` Open bool `json:"-"` SmartProbe bool `json:"-"` TcpConn *net.Conn `json:"-"` HttpConn *http.Client `json:"-"` Httpresp *parsers.Response `json:"-"` HasTitle bool `json:"-"` Err error `json:"-"` Error string `json:"-"` ErrStat int `json:"-"` Content []byte `json:"-"` }
func (*Result) AddExtract ¶
func (*Result) AddExtracts ¶
func (*Result) AddFramework ¶
func (*Result) AddFrameworks ¶
func (*Result) AddVulnsAndFrameworks ¶ added in v2.12.1
func (result *Result) AddVulnsAndFrameworks(fs common.Frameworks, vs common.Vulns)
func (*Result) GetHostBaseURL ¶
func (*Result) GetHostURL ¶
func (*Result) GuessFramework ¶
func (result *Result) GuessFramework()
type ResultsData ¶
func (*ResultsData) GetConfig ¶ added in v2.9.0
func (rd *ResultsData) GetConfig() *Config
func (*ResultsData) ToCobaltStrike ¶
func (rd *ResultsData) ToCobaltStrike() string
func (*ResultsData) ToExtracteds ¶ added in v2.9.0
func (rd *ResultsData) ToExtracteds() string
func (*ResultsData) ToFormat ¶
func (rd *ResultsData) ToFormat(isColor bool) string
type SmartResult ¶ added in v2.11.0
func (*SmartResult) List ¶ added in v2.11.0
func (sr *SmartResult) List() []string
type Socket ¶
func (*Socket) QuickRequest ¶ added in v2.10.5
type Workflow ¶
type Workflow struct { Name string `json:"name"` Description string `json:"description"` IP string `json:"ip"` IPlist []string `json:"iplist"` Ports string `json:"ports"` Mod string `json:"mod"` Ping bool `json:"ping"` NoScan bool `json:"no-scan"` IpProbe string `json:"ip-probe"` SmartProbe string `json:"port-probe"` Exploit string `json:"exploit"` Verbose int `json:"verbose"` File string `json:"file"` Path string `json:"path"` Tags []string `json:"tags"` }
func ParseWorkflowsFromInput ¶
func (*Workflow) PrepareConfig ¶
type WorkflowMap ¶
func LoadWorkFlow ¶
func LoadWorkFlow() WorkflowMap
func (WorkflowMap) Choice ¶
func (m WorkflowMap) Choice(name string) []*Workflow
Click to show internal directories.
Click to hide internal directories.