* Standardized examples logger init method
* Fixing missing import
* Standardized examples init_ldap_session function #1
* Calling new shared function _ldap3_kerberos_login from example addcomputer
* Removed considering -debug in each example. Now it's handled in utils.
* Standardized EMPTY_LM_HASH in impacket.examples.utils
* Unify parse_identity function (phase 1)
* Standardized parse_identity
* Renamed "_ldap3_kerberos_login" to "ldap3_kerberos_login" (as it is called from outside)
* Standardize "logger" init in regsecrets.py
* Standardized LDAP login into a single function in utils.py:ldap_login
* fixed SyntaxWarnings due to invalid escape sequence
* fixed DeprecationWarning since datetime.datetime.utcnow() is deprecated in Python 3.12+
* fixed DeprecationWarning since datetime.datetime.utcfromtimestamp() is deprecated in Python 3.12+
Identified that rbcd failed with a "constrained violation" error when only using the NT hash. The solution was including the LM hash too, despite the fact that it was "blank".
Added a line that'll set the LM hash to "aad3b435b51404eeaad3b435b51404ee" if one isn't provided.
In Python3.10, the default TLS cipher settings have been set to a more
secure level. See: https://bugs.python.org/issue43998
The change makes sense for general users, but Impacket is regularly used
to access old Windows computers that present certs signed using MD5 or
don't support anything higher than TLSv1.0. Impacket users arguably care
more about exploiting weaknesses than requiring super secure TLS
settings, so this patch lowers the cipher settings to the lowest value.
This is in line with the current behavior of not validating certificates
at all.
Note that this will not help if the TLS handshake fails due to
certificate issues until this bug is fixed in ldap3:
https://github.com/cannatag/ldap3/pull/1067