加入netbios探测、域控识别

This commit is contained in:
shadow1ng
2021-04-21 00:13:04 +08:00
parent 323d786c66
commit 27324dc4a5
21 changed files with 80 additions and 66 deletions
+9 -1
View File
@@ -60,7 +60,15 @@ func CheckErrs(err error) bool {
if err == nil {
return false
}
errs := []string{"closed by the remote host", "too many connections", "i/o timeout", "EOF", "A connection attempt failed", "established connection failed", "connection attempt failed", "Unable to read", "is not allowed to connect to this", "no pg_hba.conf entry", "no supported methods remain"}
errs := []string{
"closed by the remote host", "too many connections",
"i/o timeout", "EOF", "A connection attempt failed",
"established connection failed", "connection attempt failed",
"Unable to read", "is not allowed to connect to this",
"no pg_hba.conf entry",
"no supported methods remain",
"No connection could be made",
}
for _, key := range errs {
if strings.Contains(strings.ToLower(err.Error()), strings.ToLower(key)) {
return true