-
-
Notifications
You must be signed in to change notification settings - Fork 862
/
flow.go
69 lines (58 loc) · 1.67 KB
/
flow.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package libs
// Routine for each scan
type Routine struct {
RoutineName string
FlowFolder string `yaml:"flow"`
Timeout string `yaml:"timeout"`
ParsedModules []Module
Modules []string
}
// Flow struct to define specific field for a mode
type Flow struct {
NoDB bool `yaml:"nodb"`
SkipIndexed bool `yaml:"skip-indexed"`
ForceParams bool `yaml:"force-params"`
Input string
Validator string // domain, cidr, ip or domain-file, cidr-file and so on
Name string
Type string
DefaultType string
Desc string
Usage string
Params []map[string]string
Routines []Routine
RemotePreRun []string `yaml:"remote_pre_run"`
// run script on local machine after scan done
LocalPreRun []string `yaml:"local_pre_run"`
LocalPostRun []string `yaml:"local_post_run"`
}
// Module struct to define specific field for a module
type Module struct {
NoDB bool `yaml:"nodb"`
Validator string // domain, cidr, ip
ForceParams bool `yaml:"force-params"`
// just for print some info
Name string
Desc string
Usage string
// enable resume, if all reports file exist then skip the module
Resume bool
// run module despite resume enable
Forced bool
MTimeout string `yaml:"mtimeout"`
Params []map[string]string
ModulePath string
PreRun []string `yaml:"pre_run"`
Report struct {
Final []string
Noti []string
Diff []string
}
Steps []Step
PostRun []string `yaml:"post_run"`
RemotePreRun []string `yaml:"remote_pre_run"`
// run script on local machine after scan done
LocalSteps []Step `yaml:"local_steps"`
LocalPreRun []string `yaml:"local_pre_run"`
LocalPostRun []string `yaml:"local_post_run"`
}