-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
51 lines (40 loc) · 1.41 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
package main
import (
"flag"
"fmt"
"os"
"yuscan/Plugins"
"yuscan/common"
)
func main() {
var (
model = flag.String("model", "subdomain", "model: subdomain,portscan")
// subdomain
flDomain = flag.String("domain", "", "The domain to perform guessing against.")
flWordlist = flag.String("wordlist", "", "The wordlist to use for guessing.")
flWorkerCount = flag.Int("c", 1000, "The amount of workers to use.")
flServerAddr = flag.String("server", "8.8.8.8:53", "The DNS server to use.")
// portscan
hostslistFile = flag.String("hostslist", "", "The hostslist to use for portscan.")
timeout = flag.Int64("timeout", 3, "The timeout to use for portscan.")
ports = flag.String("ports", "", "The ports to use for portscan.")
)
flag.IntVar(&common.Threads, "t", 600, "Thread nums")
// flag.IntVar(&common.Proxy, "proxy", "http://127.0.0.1:10801", "http proxy")
// flag.StringVar(&common.Socks5Proxy, "Socks5Proxy", "socks5://127.0.0.1:10800", "socks5 proxy")
flag.Parse()
if *model == "subdomain" {
if *flDomain == "" || *flWordlist == "" {
fmt.Println("-domain and -wordlist are required")
os.Exit(1)
}
Plugins.Subdomain_guesser(flDomain, flWordlist, flWorkerCount, flServerAddr)
}
if *model == "portscan" {
if *hostslistFile == "" || *ports == "" {
fmt.Println("-domain and -ports is required")
os.Exit(1)
}
Plugins.PortScan(hostslistFile, *ports, *timeout)
}
}