修改线程处理机制

This commit is contained in:
shadow1ng
2021-03-30 18:12:54 +08:00
parent 05d746bec4
commit e43a7f5610
18 changed files with 156 additions and 42 deletions
+4 -1
View File
@@ -32,10 +32,13 @@ func geturl2(info *common.HostInfo) (flag bool, err error) {
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
if strings.Contains(string(body), "/_cat/master") {
result := fmt.Sprintf("Elastic:%s unauthorized", url)
result := fmt.Sprintf("[+] Elastic:%s unauthorized", url)
common.LogSuccess(result)
flag = true
}
} else {
errlog := fmt.Sprintf("[-] Elastic:%s %v", url, err)
common.LogError(errlog)
}
}
return flag, err