Documentation ¶
Index ¶
- Constants
- Variables
- func BatchScan(taskId, mainTaskId, configJSON string) (result string, err error)
- func CheckTaskStatus(taskId string) (ok bool, result string, err error)
- func DomainScan(taskId, mainTaskId, configJSON string) (result string, err error)
- func FailedTask(msg string) string
- func Fingerprint(taskId, mainTaskId, configJSON string) (result string, err error)
- func Fofa(taskId, mainTaskId, configJSON string) (result string, err error)
- func Hunter(taskId, mainTaskId, configJSON string) (result string, err error)
- func ICPQuery(taskId, mainTaskId, configJSON string) (result string, err error)
- func IPLocation(taskId, mainTaskId, configJSON string) (result string, err error)
- func MakeSubTaskTarget(portScanResult *portscan.Result, domainScanResult *domainscan.Result) (ipTarget []map[string][]int, domainTarget []map[string]struct{})
- func NewFingerprintTask(taskId string, mainTaskId string, portScanResult *portscan.Result, ...) (result string, err error)
- func ParseConfig(configJSON string, config interface{}) (err error)
- func PocScan(taskId, mainTaskId, configJSON string) (result string, err error)
- func PortScan(taskId, mainTaskId, configJSON string) (result string, err error)
- func Quake(taskId, mainTaskId, configJSON string) (result string, err error)
- func RevokedTask(msg string) string
- func StartWorker(topicName string, concurrency int) error
- func SucceedTask(msg string) string
- func TaskTest(taskId, r string) (string, error)
- func UpdateTaskStatus(taskId string, state string, worker string, result string) bool
- func WhoisQuery(taskId, mainTaskId, configJSON string) (result string, err error)
- func XDomainscan(taskId, mainTaskId, configJSON string) (result string, err error)
- func XFingerPrint(taskId, mainTaskId, configJSON string) (result string, err error)
- func XGoby(taskId, mainTaskId, configJSON string) (result string, err error)
- func XNuclei(taskId, mainTaskId, configJSON string) (result string, err error)
- func XOnlineAPI(taskId, mainTaskId, configJSON string) (result string, err error)
- func XOrganization(taskId, mainTaskId, configJSON string) (result string, err error)
- func XPortScan(taskId, mainTaskId, configJSON string) (result string, err error)
- func XXray(taskId, mainTaskId, configJSON string) (result string, err error)
- type FingerprintTaskConfig
- type XScan
- func (x *XScan) Domainscan(taskId string, mainTaskId string) (result string, err error)
- func (x *XScan) FingerPrint(taskId string, mainTaskId string) (result string, err error)
- func (x *XScan) GobyScan(taskId string, mainTaskId string) (result string, err error)
- func (x *XScan) NewDomainScan(taskId, mainTaskId string, domainMap []map[string]struct{}, ...) (result string, err error)
- func (x *XScan) NewFingerprintScan(taskId, mainTaskId string) (result string, err error)
- func (x *XScan) NewGobyScan(taskId, mainTaskId string) (result string, err error)
- func (x *XScan) NewICPQuery(taskId, mainTaskId string, target string) (result string, err error)
- func (x *XScan) NewNucleiScan(taskId, mainTaskId string) (result string, err error)
- func (x *XScan) NewPortScan(taskId, mainTaskId string, ipPortMap []map[string][]int, ...) (result string, err error)
- func (x *XScan) NewWhoisQuery(taskId, mainTaskId string, target string) (result string, err error)
- func (x *XScan) NewXrayScan(taskId, mainTaskId string) (result string, err error)
- func (x *XScan) NucleiScan(taskId string, mainTaskId string) (result string, err error)
- func (x *XScan) OnlineAPISearch(taskId string, mainTaskId string) (result string, err error)
- func (x *XScan) Portscan(taskId string, mainTaskId string) (result string, err error)
- func (x *XScan) XrayScan(taskId string, mainTaskId string) (result string, err error)
- type XScanConfig
Constants ¶
const ( IPNumberPerSubTask = 10 DomainNumberPerSubTask = 20 )
Variables ¶
var WStatus ampq.WorkerStatus
Functions ¶
func BatchScan ¶
BatchScan 批量扫描任务 先对少量端口进行扫描(存活探测),提取扫描结果IP的C段作为,再进行详细扫描 与portscan参数和过程相同;存活探测需扫描的port与资产详细扫描的port,用 “|” 进行分隔
func CheckTaskStatus ¶
CheckTaskStatus 检查任务状态:是否不存在或取消
func DomainScan ¶
DomainScan 域名任务
func Fingerprint ¶
Fingerprint 指纹识别任务,将所有指纹识别任务整合后,可由worker将端口扫描与域名收集后的结果进行二次拆分为多个任务,提高指纹识别效率
func IPLocation ¶
IPLocation IP归属任务
func MakeSubTaskTarget ¶
func MakeSubTaskTarget(portScanResult *portscan.Result, domainScanResult *domainscan.Result) (ipTarget []map[string][]int, domainTarget []map[string]struct{})
MakeSubTaskTarget 根据端口及域名扫描结果,根据设置的拆分规模,生成指纹识别等子任务
func NewFingerprintTask ¶
func NewFingerprintTask(taskId string, mainTaskId string, portScanResult *portscan.Result, domainScanResult *domainscan.Result, config FingerprintTaskConfig) (result string, err error)
NewFingerprintTask 根据端口及域名扫描结果,根据设置的拆分规模,生成指纹识别子任务
func ParseConfig ¶
ParseConfig 解析任务执行的参数
func UpdateTaskStatus ¶
UpdateTaskStatus 更新任务状态
func WhoisQuery ¶
WhoisQuery Whois查询任务
func XDomainscan ¶
XDomainscan 域名任务
func XFingerPrint ¶
XFingerPrint 指纹识别任务
func XOnlineAPI ¶
XOnlineAPI Fofa任务
func XOrganization ¶
XOrganization 根据组织ID获取资产,并进行IP和域名的任务
Types ¶
type FingerprintTaskConfig ¶
type XScan ¶
type XScan struct { Config XScanConfig ResultIP *portscan.Result ResultDomain *domainscan.Result ResultVul []pocscan.Result // contains filtered or unexported fields }
func NewXScan ¶
func NewXScan(config XScanConfig) *XScan
func (*XScan) Domainscan ¶
Domainscan 执行域名任务
func (*XScan) FingerPrint ¶
FingerPrint 执行指纹识别任务
func (*XScan) NewDomainScan ¶
func (x *XScan) NewDomainScan(taskId, mainTaskId string, domainMap []map[string]struct{}, isSubDomainFinder, isSubDomainBrute bool) (result string, err error)
NewDomainScan 根据域名列表,生成域名任务
func (*XScan) NewFingerprintScan ¶
NewFingerprintScan 生成指纹识别任务
func (*XScan) NewGobyScan ¶
NewGobyScan 生成Goby任务
func (*XScan) NewICPQuery ¶
NewICPQuery 生成ICP查询任务
func (*XScan) NewNucleiScan ¶
NewNucleiScan 生成Nuclei任务
func (*XScan) NewPortScan ¶
func (x *XScan) NewPortScan(taskId, mainTaskId string, ipPortMap []map[string][]int, ipPortMapString []map[string]string) (result string, err error)
NewPortScan 根据IP/port列表,生成端口扫描任务
func (*XScan) NewWhoisQuery ¶
NewWhoisQuery 生成whois查询任务
func (*XScan) NewXrayScan ¶
NewXrayScan 生成xraypoc任务
func (*XScan) NucleiScan ¶
NucleiScan 调用执行Nuclei扫描任务
func (*XScan) OnlineAPISearch ¶
OnlineAPISearch 执行fofa搜索任务
type XScanConfig ¶
type XScanConfig struct { OrgId *int `json:"orgid,omitempty"` WorkspaceId int `json:"workspaceId"` // orgscan IsOrgIP bool `json:"orgip,omitempty"` //XOrganizaiton:IP资产 IsOrgDomain bool `json:"orgdomain,omitempty"` //XOrganizaiton:domain资产 OrgIPPort string `json:"orgport,omitempty"` // Org扫描时,是否指定IP的端口 // onlineapi OnlineAPIStartTime string `json:"onlineapiStartTime,omitempty"` OnlineAPITarget string `json:"onlineapiTarget,omitempty"` OnlineAPIKeyword string `json:"onlineapiKeyword,omitempty"` OnlineAPISearchLimit int `json:"onlineapiSearchLimit,omitempty"` // xonlineapi 任务需要区分是哪一个api IsFofa bool `json:"fofa,omitempty"` IsHunter bool `json:"hunter,omitempty"` IsQuake bool `json:"quake,omitempty"` // portscan IPPort map[string][]int `json:"ipport,omitempty"` //IP:PORT列表 IPPortString map[string]string `json:"ipportstring,omitempty"` //格式为ip列表,port可以为多种形式,如"80,443,8000-9000"、"--top-port 100" // domainscan : xdomainscan任务需要区分是哪一个子域名获取方式 Domain map[string]struct{} `json:"domain,omitempty"` IsSubDomainFinder bool `json:"subfinder,omitempty"` IsSubDomainBrute bool `json:"subdomainBrute,omitempty"` IsSubDomainCrawler bool `json:"subdomainCrawler,omitempty"` // fingerprint IsFingerprint bool `json:"fingerprint,omitempty"` // xraypoc IsXrayPoc bool `json:"xraypoc,omitempty"` XrayPocFile string `json:"xraypocfile,omitempty"` // nucleipoc IsNucleiPoc bool `json:"nucleipoc,omitempty"` NucleiPocFile string `json:"nucleipocfile,omitempty"` // gobypoc IsGobyPoc bool `json:"gobypoc,omitempty"` // IsProxy bool `json:"proxy,omitempty"` }