Documentation ¶
Index ¶
- Variables
- func CallXClient(serviceMethod string, args interface{}, reply interface{}) error
- func DoKeepAlive(ws *ampq.WorkerStatus) bool
- func GenerateRSAKey() (err error)
- func GetWorkerNameByDaemon() string
- func GetWorkerNameBySelf() string
- func KillWorker() bool
- func StartFileSyncMonitor()
- func StartFileSyncServer()
- func StartRPCServer()
- func StartSaveRuntimeLog(source string)
- func StartSyncElasticAssets()
- func StartWorker() bool
- func StartWorkerDaemon()
- func WatchWorkerProcess()
- type IconHashResultArgs
- type KeepAliveDaemonInfo
- type KeepAliveWorkerInfo
- type LoadDomainOpenedPortArgs
- type LoadIPOpenedPortArgs
- type MainTaskResultMap
- type NewTaskArgs
- type RuntimeLogArgs
- type ScanResultArgs
- type ScreenshotResultArgs
- type Service
- func (s *Service) CheckTask(ctx context.Context, args *string, replay *TaskStatusArgs) error
- func (s *Service) KeepAlive(ctx context.Context, args *KeepAliveWorkerInfo, replay *string) error
- func (s *Service) KeepDaemonAlive(ctx context.Context, args *string, replay *KeepAliveDaemonInfo) error
- func (s *Service) LoadDomainByOrgId(ctx context.Context, args *int, replay *map[string]*domainscan.DomainResult) error
- func (s *Service) LoadDomainOpenedPort(ctx context.Context, args *LoadDomainOpenedPortArgs, ...) error
- func (s *Service) LoadIpByOrgId(ctx context.Context, args *int, replay *map[string]*portscan.IPResult) error
- func (s *Service) LoadOpenedPort(ctx context.Context, args *LoadIPOpenedPortArgs, replay *string) error
- func (s *Service) NewTask(ctx context.Context, args *NewTaskArgs, replay *string) error
- func (s *Service) SaveICPResult(ctx context.Context, args *map[string]*onlineapi.ICPInfo, replay *string) error
- func (s *Service) SaveIconImageResult(ctx context.Context, args *IconHashResultArgs, replay *string) error
- func (s *Service) SaveRuntimeLog(ctx context.Context, args *RuntimeLogArgs, replay *string) error
- func (s *Service) SaveScanResult(ctx context.Context, args *ScanResultArgs, replay *string) error
- func (s *Service) SaveScreenshotResult(ctx context.Context, args *ScreenshotResultArgs, replay *string) error
- func (s *Service) SaveVulnerabilityResult(ctx context.Context, args *ScanResultArgs, replay *string) error
- func (s *Service) SaveWhoisResult(ctx context.Context, args *map[string]*whoisparser.WhoisInfo, replay *string) error
- func (s *Service) UpdateTask(ctx context.Context, args *TaskStatusArgs, replay *bool) error
- type TaskStatusArgs
- type WorkerDaemonOption
- type WorkerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WorkerStatusMutex sync.Mutex WorkerStatus = make(map[string]*ampq.WorkerStatus) )
View Source
var ( RsaPrivateKeyText []byte RsaPublicKeyText []byte )
View Source
var ( // MainTaskResult 缓存汇总各个子任务、保存任务的结果 MainTaskResult map[string]MainTaskResultMap MainTaskResultMutex sync.Mutex // TLSEnabled 是否启用TLS加密 TLSEnabled bool TLSCertFile string TLSKeyFile string )
View Source
var WorkerName string
Functions ¶
func CallXClient ¶
CallXClient RPC远程调用
func GetWorkerNameByDaemon ¶
func GetWorkerNameByDaemon() string
func GetWorkerNameBySelf ¶
func GetWorkerNameBySelf() string
func StartSaveRuntimeLog ¶
func StartSaveRuntimeLog(source string)
func StartSyncElasticAssets ¶
func StartSyncElasticAssets()
Types ¶
type IconHashResultArgs ¶
type IconHashResultArgs struct { WorkspaceId int IconHashInfo []fingerprint.IconHashInfo }
IconHashResultArgs icconhash保存的结果值
type KeepAliveDaemonInfo ¶
type KeepAliveDaemonInfo struct { ManualReloadFlag bool ManualFileSyncFlag bool ManualUpdateOptionFlag bool WorkerRunOption *WorkerOption }
func DoDaemonKeepAlive ¶
func DoDaemonKeepAlive() (replay KeepAliveDaemonInfo, err error)
DoDaemonKeepAlive worker请求keepAlive
type KeepAliveWorkerInfo ¶
type KeepAliveWorkerInfo struct {
WorkerStatus ampq.WorkerStatus
}
type LoadIPOpenedPortArgs ¶
type MainTaskResultMap ¶
type NewTaskArgs ¶
type NewTaskArgs struct { TaskName string ConfigJSON string MainTaskID string LastRunTaskId string }
NewTaskArgs 新建任务请求与返回参数
type RuntimeLogArgs ¶
type ScanResultArgs ¶
type ScanResultArgs struct { TaskID string MainTaskId string IPConfig *portscan.Config DomainConfig *domainscan.Config IPResult map[string]*portscan.IPResult DomainResult map[string]*domainscan.DomainResult VulnerabilityResult []pocscan.Result }
ScanResultArgs IP与域名扫描结果请求参数
type ScreenshotResultArgs ¶
type ScreenshotResultArgs struct { MainTaskId string WorkspaceId int FileInfo []fingerprint.ScreenshotFileInfo }
ScreenshotResultArgs screenshot结果请求参数
type Service ¶
type Service struct{}
Service RPC服务
func (*Service) KeepDaemonAlive ¶
func (s *Service) KeepDaemonAlive(ctx context.Context, args *string, replay *KeepAliveDaemonInfo) error
KeepDaemonAlive worker的daemon通过RPC,保持与server的心跳与同步
func (*Service) LoadDomainByOrgId ¶
func (s *Service) LoadDomainByOrgId(ctx context.Context, args *int, replay *map[string]*domainscan.DomainResult) error
LoadDomainByOrgId 根据组织ID读取Domain资产
func (*Service) LoadDomainOpenedPort ¶
func (s *Service) LoadDomainOpenedPort(ctx context.Context, args *LoadDomainOpenedPortArgs, replay *map[string]map[int]struct{}) error
LoadDomainOpenedPort 获取域名关联的IP的端口
func (*Service) LoadIpByOrgId ¶
func (s *Service) LoadIpByOrgId(ctx context.Context, args *int, replay *map[string]*portscan.IPResult) error
LoadIpByOrgId 根据组织ID读取IP资产
func (*Service) LoadOpenedPort ¶
func (s *Service) LoadOpenedPort(ctx context.Context, args *LoadIPOpenedPortArgs, replay *string) error
LoadOpenedPort 读取指定IP已开放的全部端口
func (*Service) SaveICPResult ¶
func (s *Service) SaveICPResult(ctx context.Context, args *map[string]*onlineapi.ICPInfo, replay *string) error
SaveICPResult 保存ICP查询结果到服务器的查询缓存文件中
func (*Service) SaveIconImageResult ¶
func (s *Service) SaveIconImageResult(ctx context.Context, args *IconHashResultArgs, replay *string) error
SaveIconImageResult 保存IconImage结果到Server
func (*Service) SaveRuntimeLog ¶
SaveRuntimeLog 保存RuntimeLog
func (*Service) SaveScanResult ¶
SaveScanResult 保存IP与域名的扫描结果
func (*Service) SaveScreenshotResult ¶
func (s *Service) SaveScreenshotResult(ctx context.Context, args *ScreenshotResultArgs, replay *string) error
SaveScreenshotResult 保存Screenshot的结果到Server
func (*Service) SaveVulnerabilityResult ¶
func (s *Service) SaveVulnerabilityResult(ctx context.Context, args *ScanResultArgs, replay *string) error
SaveVulnerabilityResult 保存漏洞结果
func (*Service) SaveWhoisResult ¶
func (s *Service) SaveWhoisResult(ctx context.Context, args *map[string]*whoisparser.WhoisInfo, replay *string) error
SaveWhoisResult 保存whois查询结果到服务器的查询缓存文件中
func (*Service) UpdateTask ¶
UpdateTask 更新任务状态到数据库中
type TaskStatusArgs ¶
type TaskStatusArgs struct { TaskID string IsExist bool IsRevoked bool IsFinished bool State string Worker string Result string }
TaskStatusArgs 任务状态请求与返回参数
type WorkerDaemonOption ¶
type WorkerDaemonOption struct { Concurrency int WorkerPerformance int NoFilesync bool NoProxy bool WorkerRunTaskMode string TaskWorkspaceGUID string ManualSyncHost string ManualSyncPort string ManualSyncAuth string TLSEnabled bool DefaultConfigFile string }
var DaemonRunOption *WorkerDaemonOption
type WorkerOption ¶
type WorkerOption struct { Concurrency int `json:"concurrency" form:"concurrency"` WorkerPerformance int `json:"worker_performance" form:"worker_performance"` WorkerRunTaskMode string `json:"worker_run_task_mode" form:"worker_run_task_mode"` TaskWorkspaceGUID string `json:"task_workspace_guid" form:"task_workspace_guid"` WorkerTopic map[string]struct{} `json:"-"` TLSEnabled bool `json:"-"` DefaultConfigFile string `json:"default_config_file" form:"default_config_file"` NoProxy bool `json:"no_proxy" form:"no_proxy"` }
var WorkerRunOption *WorkerOption
Click to show internal directories.
Click to hide internal directories.