add KDC_ERR_PREAUTH_FAILED error

main
mpgn 2022-10-24 09:01:30 -04:00
parent 5040ab6b40
commit 70f8d973cf
2 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,8 @@ ldap_error_status = {
"773":"STATUS_PASSWORD_MUST_CHANGE",
"775":"USER_ACCOUNT_LOCKED",
"50":"LDAP_INSUFFICIENT_ACCESS",
"KDC_ERR_CLIENT_REVOKED":"KDC_ERR_CLIENT_REVOKED"
"KDC_ERR_CLIENT_REVOKED":"KDC_ERR_CLIENT_REVOKED",
"KDC_ERR_PREAUTH_FAILED":"KDC_ERR_PREAUTH_FAILED"
}
@ -292,7 +293,7 @@ class ldap(connection):
self.username,
" from ccache" if useCache
else ":%s" % (next(sub for sub in [self.nthash, password, aesKey] if sub != '') if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8),
str(e)),
str(error)),
color='magenta' if error in ldap_error_status else 'red')
return False
except KeyError as e:
@ -356,7 +357,7 @@ class ldap(connection):
self.username,
" from ccache" if useCache
else ":%s" % (next(sub for sub in [self.nthash, password, aesKey] if sub != '') if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8),
str(e)),
str(error)),
color='magenta' if error in ldap_error_status else 'red')
return False
else:

View File

@ -55,7 +55,8 @@ smb_error_status = [
"STATUS_PASSWORD_MUST_CHANGE",
"STATUS_ACCESS_DENIED",
"STATUS_NO_SUCH_FILE",
"KDC_ERR_CLIENT_REVOKED"
"KDC_ERR_CLIENT_REVOKED",
"KDC_ERR_PREAUTH_FAILED"
]
def get_error_string(exception):