Documentation ¶
Index ¶
- Constants
- Variables
- func GetPalmHomeDir() string
- func NewVulnResult(v *Vuln) (*spec.ScanResult, error)
- type IpEcho
- type ScanNode
- type ScannerAgentReporter
- func (r *ScannerAgentReporter) Report(record *schema.Report) error
- func (r *ScannerAgentReporter) ReportFingerprint(i interface{}) error
- func (r *ScannerAgentReporter) ReportRisk(title string, target string, details interface{}, tags ...string) error
- func (r *ScannerAgentReporter) ReportTCPOpenPort(host interface{}, port interface{}) error
- func (r *ScannerAgentReporter) ReportVul(i interface{}) error
- func (r *ScannerAgentReporter) ReportWeakPassword(result interface{}) error
- type Task
- type TaskManager
- type Vuln
- type VulnTargetType
- type WebServerConfig
Constants ¶
View Source
const GENREPORT_KEY = "JznQXuFDSepeNWHbiLGEwONiaBxhvj_SERVER_SCAN_MANAGER"
Variables ¶
View Source
var DistYakCommand = cli.Command{ Name: "distyak", Usage: "used by distribution node for running yak file", Action: func(c *cli.Context) error { var err error args := c.Args() if len(args) > 0 { file := args[0] if file != "" { var absFile = file if !filepath.IsAbs(absFile) { absFile, err = filepath.Abs(absFile) if err != nil { return utils.Errorf("fetch abs file path failed: %s", err) } } raw, err := ioutil.ReadFile(file) if err != nil { return err } engine := yak.NewScriptEngine(100) engine.RegisterEngineHooks(func(engine *antlr4yak.Engine) error { return nil }) err = engine.ExecuteMain(string(raw), absFile) if err != nil { return err } return nil } else { return utils.Errorf("empty yak file") } } code := c.String("code") engine := yak.NewScriptEngine(100) err = engine.Execute(code) if err != nil { return err } return nil }, Flags: []cli.Flag{ cli.StringFlag{ Name: "code,c", }, }, SkipFlagParsing: true, }
Functions ¶
func GetPalmHomeDir ¶
func GetPalmHomeDir() string
func NewVulnResult ¶
func NewVulnResult(v *Vuln) (*spec.ScanResult, error)
Types ¶
type ScanNode ¶
type ScanNode struct {
// contains filtered or unexported fields
}
func NewScanNode ¶
func NewScanNode(id, serverPort string, amqpConfig *spec.AMQPConfig) (*ScanNode, error)
func NewScanNodeWithAMQPUrl ¶
func (*ScanNode) GetServerHelper ¶
func (s *ScanNode) GetServerHelper() *scanrpc.SCANServerHelper
type ScannerAgentReporter ¶
type ScannerAgentReporter struct { TaskId string SubTaskId string RuntimeId string // contains filtered or unexported fields }
func NewScannerAgentReporter ¶
func NewScannerAgentReporter(taskId string, subTaskId string, runtimeId string, agent *ScanNode) *ScannerAgentReporter
func (*ScannerAgentReporter) Report ¶
func (r *ScannerAgentReporter) Report(record *schema.Report) error
func (*ScannerAgentReporter) ReportFingerprint ¶
func (r *ScannerAgentReporter) ReportFingerprint(i interface{}) error
func (*ScannerAgentReporter) ReportRisk ¶
func (r *ScannerAgentReporter) ReportRisk( title string, target string, details interface{}, tags ...string, ) error
func (*ScannerAgentReporter) ReportTCPOpenPort ¶
func (r *ScannerAgentReporter) ReportTCPOpenPort(host interface{}, port interface{}) error
func (*ScannerAgentReporter) ReportVul ¶
func (r *ScannerAgentReporter) ReportVul(i interface{}) error
func (*ScannerAgentReporter) ReportWeakPassword ¶
func (r *ScannerAgentReporter) ReportWeakPassword(result interface{}) error
type TaskManager ¶
type TaskManager struct {
// contains filtered or unexported fields
}
func (*TaskManager) Add ¶
func (t *TaskManager) Add(taskId string, task *Task)
func (*TaskManager) All ¶
func (t *TaskManager) All() []*Task
func (*TaskManager) GetTaskById ¶
func (t *TaskManager) GetTaskById(taskId string) (*Task, error)
func (*TaskManager) Remove ¶
func (t *TaskManager) Remove(taskId string)
type Vuln ¶
type Vuln struct { gorm.Model Title string IPAddr string IPv4Int uint32 Host string // domain/ip Port int IsPrivateNet bool // url Target string TargetRaw postgres.Jsonb TargetType VulnTargetType // xray: plugin Plugin string Detail postgres.Jsonb Hash string `gorm:"index"` FromThreatAnalysisTaskId string FromThreatAnalysisRuntimeId string SubTaskId string Payload string `json:"payload"` RiskTypeVerbose string `json:"risk_type_verbose"` RiskType string `json:"risk_type"` Severity string `json:"severity"` FromYakScript string `json:"from_yak_script"` TitleVerbose string `json:"title_verbose"` ReverseToken string `json:"reverse_token"` Url string `json:"url"` }
type VulnTargetType ¶
type VulnTargetType string
const ( VulnTargetType_Url VulnTargetType = "web" VulnTargetType_Service VulnTargetType = "service" VulnTargetType_Risk VulnTargetType = "risk" )
type WebServerConfig ¶
type WebServerConfig struct {
WebServerPort string `json:"web_server_port"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.