Update eval.go

This commit is contained in:
影舞者 2023-11-13 11:34:42 +08:00 committed by GitHub
parent 53c1b3232a
commit 29acfb166b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -564,13 +564,13 @@ func randomString(n int) string {
}
func reverseCheck(r *Reverse, timeout int64) bool {
if ceyeApi == "" || r.Domain == "" {
if ceyeApi == "" || r.Domain == "" || !common.DnsLog {
return false
}
time.Sleep(time.Second * time.Duration(timeout))
sub := strings.Split(r.Domain, ".")[0]
urlStr := fmt.Sprintf("http://api.ceye.io/v1/records?token=%s&type=dns&filter=%s", ceyeApi, sub)
//fmt.Println(urlStr)
req, _ := http.NewRequest("GET", urlStr, nil)
resp, err := DoRequest(req, false)
if err != nil {
@ -621,6 +621,7 @@ func DoRequest(req *http.Request, redirect bool) (*Response, error) {
oResp, err = ClientNoRedirect.Do(req)
}
if err != nil {
//fmt.Println("[-]DoRequest error: ",err)
return nil, err
}
defer oResp.Body.Close()