Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions ADenum.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,16 @@ def ConnectServerLdap(self,domain_name:str,ip_address:str, username:str, passwor
connect = ldap.initialize('ldaps://' + ip_address)
connect.start_tls_s()
log.info("SSL connect:\t"+highlightGreen("TRUE"))
# TODO:
# con.get_option(ldap.OPT_X_TLS_CIPHER)
# con.get_option(ldap.OPT_X_TLS_CIPHER_SUITE)
# con.get_option(ldap.OPT_X_TLS_PROTOCOL_MIN) # -> 0x303 for TLS 1.2 / 0x304 for TLS 1.3

# Retrieve TLS Info safely
try:
# Some older ldap versions might not support these options
cipher = connect.get_option(ldap.OPT_X_TLS_CIPHER)
suite = connect.get_option(ldap.OPT_X_TLS_CIPHER_SUITE)
proto = connect.get_option(ldap.OPT_X_TLS_PROTOCOL_MIN)
log.debug(f"TLS Cipher: {cipher}, Suite: {suite}, Proto: {proto}")
except Exception as e:
log.debug(f"Could not retrieve extended TLS info: {e}")
# con.get_option(ldap.OPT_X_TLS_VERSION)
else:
connect = ldap.initialize('ldap://' + ip_address)
Expand Down
Binary file added __pycache__/ADenum.cpython-311.pyc
Binary file not shown.