runner

package
v0.0.0-...-0b9a7cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 22 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCronTask

func AddCronTask(taskId string, cronRule string)

AddCronTask 增加一个定时任务

func ChangeTaskCronStatus

func ChangeTaskCronStatus(taskId, status string) bool

ChangeTaskCronStatus 禁用或启用定时任务

func DeleteCronTask

func DeleteCronTask(taskId string)

DeleteCronTask 移除一个定时任务

func GetCronTaskNextRunDatetime

func GetCronTaskNextRunDatetime(taskId string) (jobExist bool, nextRunDatetime time.Time)

GetCronTaskNextRunDatetime 获取任务的下一次执行时间

func ParseTargetFromKwArgs

func ParseTargetFromKwArgs(taskName, args string) (target string)

ParseTargetFromKwArgs 从经过JSON序列化的参数中单独提取出target

func RunOnceTaskCron

func RunOnceTaskCron(taskId string) bool

RunOnceTaskCron 立即执行一次任务

func SaveCronTask

func SaveCronTask(taskName, kwArgs, cronRule, comment string, workspaceId int) (taskId string)

SaveCronTask 保存定时任务

func SaveMainTask

func SaveMainTask(taskName, configJSON, cronTaskId string, workspaceId int) (taskId string, err error)

SaveMainTask 保存一个MainTask到数据库中

func StartBatchScanTask

func StartBatchScanTask(req PortscanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartBatchScanTask 探测+扫描任务

func StartCronTask

func StartCronTask() (cronTaskNum int)

StartCronTask 启动定时任务守护和调度

func StartDomainScanTask

func StartDomainScanTask(req DomainscanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartDomainScanTask 域名任务

func StartMainTaskDamon

func StartMainTaskDamon()

StartMainTaskDamon MainTask任务的后台监控

func StartPocScanTask

func StartPocScanTask(req PocscanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartPocScanTask pocscan任务

func StartPortScanTask

func StartPortScanTask(req PortscanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartPortScanTask 端口扫描任务

func StartXDomainScanTask

func StartXDomainScanTask(req XScanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartXDomainScanTask xscan任务,域名任务

func StartXOnlineAPIKeywordCustomTask

func StartXOnlineAPIKeywordCustomTask(req XScanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartXOnlineAPIKeywordCustomTask xscan任务,根据API的语法查询资产

func StartXOnlineAPIKeywordTask

func StartXOnlineAPIKeywordTask(req XScanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartXOnlineAPIKeywordTask xscan任务,根据API的语法查询资产

func StartXOrgScanTask

func StartXOrgScanTask(req XScanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartXOrgScanTask xscan任务,获取指定组织的资产并开始扫描任务

func StartXPortScanTask

func StartXPortScanTask(req XScanRequestParam, mainTaskId string, workspaceId int) (taskId string, err error)

StartXPortScanTask xscan的IP任务

Types

type CronTaskJob

type CronTaskJob struct {
	TaskId string
}

func (CronTaskJob) Run

func (j CronTaskJob) Run()

Run 当定时任务启动时,创建任务执行并发送到消息队列中

type DomainscanRequestParam

type DomainscanRequestParam struct {
	Target             string `form:"target"`
	OrgId              int    `form:"org_id"`
	IsSubfinder        bool   `form:"subfinder"`
	IsSubdomainBrute   bool   `form:"subdomainbrute"`
	IsFldDomain        bool   `form:"fld_domain"`
	IsHttpx            bool   `form:"httpx"`
	IsIPPortscan       bool   `form:"portscan"`
	IsSubnetPortscan   bool   `form:"networkscan"`
	IsCrawler          bool   `form:"crawler"`
	IsFofa             bool   `form:"fofasearch"`
	IsQuake            bool   `form:"quakesearch"`
	IsHunter           bool   `form:"huntersearch"`
	IsScreenshot       bool   `form:"screenshot"`
	IsICPQuery         bool   `form:"icpquery"`
	IsWhoisQuery       bool   `form:"whoisquery"`
	IsFingerprintHub   bool   `form:"fingerprinthub"`
	IsIconHash         bool   `form:"iconhash"`
	IsFingerprintx     bool   `form:"fingerprintx"`
	TaskMode           int    `form:"taskmode"`
	PortTaskMode       int    `form:"porttaskmode"`
	IsTaskCron         bool   `form:"taskcron" json:"-"`
	TaskCronRule       string `form:"cronrule" json:"-"`
	TaskCronComment    string `form:"croncomment" json:"-"`
	IsIgnoreOutofChina bool   `form:"ignoreoutofchina"`
	IsIgnoreCDN        bool   `form:"ignorecdn"`
	IsProxy            bool   `form:"proxy"`
}

type PocscanRequestParam

type PocscanRequestParam struct {
	Target           string `form:"target"`
	IsXrayVerify     bool   `form:"xrayverify"`
	XrayPocFile      string `form:"xray_poc_file"`
	IsNucleiVerify   bool   `form:"nucleiverify"`
	NucleiPocFile    string `form:"nuclei_poc_file"`
	IsGobyVerify     bool   `form:"gobyverify"`
	IsLoadOpenedPort bool   `form:"load_opened_port"`
	IsTaskCron       bool   `form:"taskcron" json:"-"`
	TaskCronRule     string `form:"cronrule" json:"-"`
	TaskCronComment  string `form:"croncomment" json:"-"`
	IsProxy          bool   `form:"proxy"`
}

type PortscanRequestParam

type PortscanRequestParam struct {
	Target             string `form:"target"`
	IsPortScan         bool   `form:"portscan"`
	IsIPLocation       bool   `form:"iplocation"`
	IsFofa             bool   `form:"fofasearch"`
	IsQuake            bool   `form:"quakesearch"`
	IsHunter           bool   `form:"huntersearch"`
	Port               string `form:"port"`
	Rate               int    `form:"rate"`
	NmapTech           string `form:"nmap_tech"`
	CmdBin             string `form:"bin"`
	OrgId              int    `form:"org_id"`
	IsHttpx            bool   `form:"httpx"`
	IsPing             bool   `form:"ping"`
	ExcludeIP          string `form:"exclude"`
	IsScreenshot       bool   `form:"screenshot"`
	IsFingerprintHub   bool   `form:"fingerprinthub"`
	IsFingerprintx     bool   `form:"fingerprintx"`
	IsIconHash         bool   `form:"iconhash"`
	TaskMode           int    `form:"taskmode"`
	IsTaskCron         bool   `form:"taskcron" json:"-"`
	TaskCronRule       string `form:"cronrule" json:"-"`
	TaskCronComment    string `form:"croncomment" json:"-"`
	IsLoadOpenedPort   bool   `form:"load_opened_port"`
	IsIgnoreOutofChina bool   `form:"ignoreoutofchina"`
	IsIgnoreCDN        bool   `form:"ignorecdn"`
	IsProxy            bool   `form:"proxy"`
}

type XScanRequestParam

type XScanRequestParam struct {
	XScanType       string `form:"xscan_type"`
	Target          string `form:"target"`
	Port            string `form:"port"`
	OrgId           int    `form:"org_id"`
	OnlineAPIEngine string `form:"onlineapi_engine"`
	IsOrgIP         bool
	IsOrgDomain     bool
	IsOnlineAPI     bool   `form:"onlineapi"`
	IsFingerprint   bool   `form:"fingerprint"`
	IsXrayPocscan   bool   `form:"xraypoc"`
	XrayPocFile     string `form:"xraypocfile"`
	IsNucleiPocscan bool   `form:"nucleipoc"`
	NucleiPocFile   string `form:"nucleipocfile"`
	IsGobyPocscan   bool   `form:"gobypoc"`
	IsTaskCron      bool   `form:"taskcron" json:"-"`
	TaskCronRule    string `form:"cronrule" json:"-"`
	TaskCronComment string `form:"croncomment" json:"-"`
	IsProxy         bool   `form:"proxy"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL