-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathmain.go
38 lines (29 loc) · 998 Bytes
/
main.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
package main
import (
"flag"
"fmt"
"os"
"github.com/jakejarvis/subtake/subtake"
)
func main() {
configFile := "fingerprints.json"
o := subtake.Options{}
flag.StringVar(&o.Domains, "f", "", "Path to domains file")
flag.IntVar(&o.Threads, "t", 10, "Number of concurrent threads")
flag.IntVar(&o.Timeout, "timeout", 10, "Seconds to wait before connection timeout")
flag.BoolVar(&o.Ssl, "ssl", false, "Force HTTPS connections")
flag.BoolVar(&o.All, "a", false, "Send requests to every URL, even without identified CNAME")
flag.BoolVar(&o.Verbose, "v", false, "Display all results including not vunerable URLs")
flag.StringVar(&o.Output, "o", "", "Output results to specified file (writes JSON if file ends with '.json')")
flag.StringVar(&o.Config, "c", configFile, "Path to configuration file")
flag.Parse()
flag.Usage = func() {
fmt.Printf("Usage of %s:\n", os.Args[0])
flag.PrintDefaults()
}
if flag.NFlag() == 0 {
flag.Usage()
os.Exit(1)
}
subtake.Process(&o)
}