| skipped 10 lines |
11 | 11 | | |
12 | 12 | | // Config is a afrog-config.yaml catalog helper implementation |
13 | 13 | | type Config struct { |
14 | | - | PocSizeWaitGroup int32 `yaml:"poc_sizewaitgroup"` |
15 | | - | TargetSizeWaitGroup int32 `yaml:"target_sizewaitgroup"` |
16 | | - | FingerprintSizeWaitGroup int32 `yaml:"fingerprint_sizewaitgroup"` |
17 | | - | ConfigHttp ConfigHttp `yaml:"http"` |
18 | | - | Reverse Reverse `yaml:"reverse"` |
| 14 | + | // PocSizeWaitGroup int32 `yaml:"poc_sizewaitgroup"` |
| 15 | + | // TargetSizeWaitGroup int32 `yaml:"target_sizewaitgroup"` |
| 16 | + | // FingerprintSizeWaitGroup int32 `yaml:"fingerprint_sizewaitgroup"` |
| 17 | + | // ConfigHttp ConfigHttp `yaml:"http"` |
| 18 | + | Reverse Reverse `yaml:"reverse"` |
19 | 19 | | } |
20 | 20 | | type ConfigHttp struct { |
21 | 21 | | Proxy string `yaml:"proxy"` |
| skipped 18 lines |
40 | 40 | | } |
41 | 41 | | |
42 | 42 | | const afrogConfigFilename = "afrog-config.yaml" |
43 | | - | const Version = "2.2.0" |
| 43 | + | const Version = "2.2.1" |
44 | 44 | | |
45 | 45 | | // Create and initialize afrog-config.yaml configuration info |
46 | 46 | | func New() (*Config, error) { |
47 | 47 | | if isExistConfigFile() != nil { |
48 | 48 | | c := Config{} |
49 | | - | c.PocSizeWaitGroup = 25 |
50 | | - | c.TargetSizeWaitGroup = 25 |
51 | | - | c.FingerprintSizeWaitGroup = 100 |
52 | | - | configHttp := c.ConfigHttp |
53 | | - | configHttp.Proxy = "" |
54 | | - | configHttp.DialTimeout = 10 |
55 | | - | configHttp.ReadTimeout = "10000ms" |
56 | | - | configHttp.WriteTimeout = "3000ms" |
57 | | - | configHttp.MaxIdle = "1h" |
58 | | - | configHttp.MaxRedirect = 3 |
59 | | - | configHttp.Concurrency = 4096 |
60 | | - | configHttp.MaxConnsPerHost = 512 // MaxConnsPerHost是一个限流的参数,保证对一个Host最大的打开连接数,如果超过这个数字,则会直接拒绝,这里默认值是512,但如果你打算用来做压测之类的事情,需要增加这个值,比如这里我就增加到了16384 |
61 | | - | configHttp.MaxResponseBodySize = 1024 * 1024 * 2 |
62 | | - | configHttp.UserAgent = "" |
63 | | - | c.ConfigHttp = configHttp |
| 49 | + | // c.PocSizeWaitGroup = 25 |
| 50 | + | // c.TargetSizeWaitGroup = 25 |
| 51 | + | // c.FingerprintSizeWaitGroup = 100 |
| 52 | + | // configHttp := c.ConfigHttp |
| 53 | + | // configHttp.Proxy = "" |
| 54 | + | // configHttp.DialTimeout = 10 |
| 55 | + | // configHttp.ReadTimeout = "10000ms" |
| 56 | + | // configHttp.WriteTimeout = "3000ms" |
| 57 | + | // configHttp.MaxIdle = "1h" |
| 58 | + | // configHttp.MaxRedirect = 3 |
| 59 | + | // configHttp.Concurrency = 4096 |
| 60 | + | // configHttp.MaxConnsPerHost = 512 // MaxConnsPerHost是一个限流的参数,保证对一个Host最大的打开连接数,如果超过这个数字,则会直接拒绝,这里默认值是512,但如果你打算用来做压测之类的事情,需要增加这个值,比如这里我就增加到了16384 |
| 61 | + | // configHttp.MaxResponseBodySize = 1024 * 1024 * 2 |
| 62 | + | // configHttp.UserAgent = "" |
| 63 | + | // c.ConfigHttp = configHttp |
64 | 64 | | reverse := c.Reverse |
65 | | - | reverse.Ceye.ApiKey = "fb1837116d366dd91f2aa9ab837efe66" |
66 | | - | reverse.Ceye.Domain = "dflqxk.ceye.io" |
| 65 | + | reverse.Ceye.ApiKey = "" |
| 66 | + | reverse.Ceye.Domain = "" |
67 | 67 | | c.Reverse = reverse |
68 | 68 | | WriteConfiguration(&c) |
69 | 69 | | } |
| skipped 87 lines |