/
config.go
53 lines (50 loc) · 1.11 KB
/
config.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
package config
// Config represents the configuration for both the Collector and cli.
type Config struct {
Url string
Depth int
Outdir string
Cookie string
AuthHeader string
Scope string
Version string
Wayback bool
Plain bool
Runlinkfinder bool
// output flags
DisplayVersion bool
IncludeJS bool
IncludeSubs bool
IncludeURLs bool
IncludeForms bool
IncludeRobots bool
IncludeSitemap bool
IncludeWayback bool
IncludeAll bool
}
// NewConfig returns a Config with default values.
func NewConfig() Config {
var conf Config
// default values
conf.Version = "beta 3"
conf.DisplayVersion = false
conf.Url = ""
conf.Depth = 1
conf.Outdir = ""
conf.Cookie = ""
conf.AuthHeader = ""
conf.Scope = "subs"
conf.Wayback = false
conf.Plain = false
conf.Runlinkfinder = false
// output flag default values
conf.IncludeJS = false
conf.IncludeSubs = false
conf.IncludeURLs = false
conf.IncludeForms = false
conf.IncludeRobots = false
conf.IncludeSitemap = false
conf.IncludeWayback = false
conf.IncludeAll = true
return conf
}