o
    Žõ±j˜s  ã                   @   sR  d dl Z d dlmZmZ d dlZd dlmZ d dlmZ ddl	m
Z
 d dlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ d dlmZ d d	lm Z m!Z!m"Z"m#Z# d d
l$m%Z%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z, d dl-m.Z.m/Z/m0Z0m1Z1m2Z2 d dl3m4Z4 d dl5m6Z6 d dl7m8Z8 d dl9m:Z: d dl;m<Z< G dd„ dƒZ=dS )é    N)ÚListÚDict)Úlogger)ÚMSLDAPClientStatusé   )ÚMSLDAPTarget)ÚLDAPMessageÚBindRequestÚ
protocolOpÚAuthenticationChoiceÚSaslCredentialsÚSearchRequestÚAttributeDescriptionÚFilterÚFiltersÚControlsÚControlÚSearchControlValueÚ
AddRequestÚModifyRequestÚ
DelRequestÚExtendedRequestÚExtendedResponse)Úcalcualte_length)Úconvert_resultÚconvert_attributesÚencode_attributesÚencode_changes)Úescape_filter_charsÚquery_syntax_converter)Úget_auth_context)ÚLDAPPacketizer)ÚUniProto)ÚLDAPBindExceptionÚLDAPAddExceptionÚLDAPModifyExceptionÚLDAPDeleteExceptionÚLDAPSearchException)Úsha256)Ú	UniClient)ÚasyauthProtocol)ÚUniCredential)ÚISC_REQc                   @   s`  e Zd Zd>dedefdd„Zdd„ Zdd	„ Zd
d„ Zde	e
ef fdd„Zdefdd„Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zde
de	e
ef fd d!„Zd>de
d"e	e
ef d#ee fd$d%„Zde
fd&d'„Zd?d,e
d-e
dee d.ed/ed0ed1ed2ed#ee d3efd4d5„Zd@d,e
d-e
dee d.ed/ed6ed1ed2ed#ee d7efd8d9„Zd:d;„ Zd<d=„ ZdS )AÚMSLDAPClientConnectionNÚtargetÚ
credentialc                 C   s²   || _ || _|d ur|| _nt| jƒ| _d| _d| _d| _d| _d| _d | _	d | _
d | _tj| _d | _d| _i | _i | _d| _d | _d| _d| _d| _| jjtjkrWd| _d S d S )NFr   T)r.   r/   Úauthr    Ú	connectedÚbind_okÚis_anonÚ&_MSLDAPClientConnection__sign_messagesÚ)_MSLDAPClientConnection__encrypt_messagesÚnetworkÚconnection_closed_evtÚhandle_incoming_taskr   ÚRUNNINGÚstatusÚ	lasterrorÚ
message_idÚmessage_tableÚmessage_table_notifyÚencryption_sequence_counterÚcb_dataÚ_disable_channel_bindingÚ_disable_signingÚ_null_channel_bindingÚprotocolr*   ÚNONE)Úselfr.   r/   r0   © rG   ú„/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/msldap/connection.pyÚ__init__   s4   
ÿzMSLDAPClientConnection.__init__c                 Ã   s   �| S ©NrG   ©rF   rG   rG   rH   Ú
__aenter__<   s   €z!MSLDAPClientConnection.__aenter__c                 Ã   s   �t j|  ¡ dd�I d H  d S )Nr   ©Útimeout)ÚasyncioÚwait_forÚ
disconnect)rF   Úexc_typeÚexcÚ	tracebackrG   rG   rH   Ú	__aexit__?   s   €z MSLDAPClientConnection.__aexit__c              
   Ã   s�  ��z5z×| j  ¡ 2 zÌ3 d H W }|d u r tdƒ‚| jdu rl| jdu rI|dd … }z| j |d¡I d H \}}|d ur;|‚W n/   dd l}| ¡  ‚ | jdu rl|dd … }z| j 	|¡I d H }W n   dd l}| ¡  ‚ t
|ƒ}t|ƒ}g }||kr…t |¡}| |¡ n$t|ƒdkr©t
|ƒ}t |d |… ¡}| |¡ ||d … }t|ƒdks‹|d d j}|| jvrºg | j|< | j|  |¡ || jvrÎt ¡ | j|< | j|  ¡  q	6 tdƒ‚ tjyø   tj| _Y W | jd urò| j ¡  tj| _d S  t�y% }	 z!tj| _|	| _| jD ]}
|	g| j|
< | j|
  ¡  �q
W Y d }	~	nd }	~	ww W | jd u�r2| j ¡  tj| _d S | jd u�rC| j ¡  tj| _w )NTé   r   Ú	messageIDzConnection closed!)r6   Úreadr2   r5   r0   ÚdecryptrT   Ú	print_excr4   Úunsignr   Úlenr   ÚloadÚappendÚnativer=   Úextendr>   rO   ÚEventÚsetÚ	ExceptionÚCancelledErrorr   ÚSTOPPEDr:   r7   ÚERRORr;   )rF   Úmessage_dataÚerrrT   Úmsg_lenÚmsg_total_lenÚmessagesÚmessager<   ÚeÚmsgidrG   rG   rH   Ú__handle_incomingB   sŠ   €6
Ì
ÿ


û


Ê8


ö
þ€ý
þ

z(MSLDAPClientConnection.__handle_incomingrl   c                 Ã   sú   �| j }|  j d7  _ ||d< t|ƒ ¡ }| jdu rk| jdu rD| j || j¡I d H \}}|| }t|ƒj	dddd�| }|  jd7  _n'| j
du rk| j || j¡I d H }|| }t|ƒj	dddd�| }|  jd7  _t ¡ | j|< | j |¡I d H  |S )Nr   rW   TrV   ÚbigF)Ú	byteorderÚsigned)r<   r   Údumpr2   r5   r0   Úencryptr?   r\   Úto_bytesr4   ÚsignrO   ra   r>   r6   Úwrite)rF   rl   Úcurr_msg_idrg   Ú	signaturerG   rG   rH   Úsend_message�   s&   €


z#MSLDAPClientConnection.send_messager<   c                 Ã   sX   �|| j vrt d| ¡ d S | j |  ¡ I d H  | j| }g | j|< | j |  ¡  |S )NzARequested message id %s which is not in the message notify table!)r>   r   ÚdebugÚwaitr=   Úclear)rF   r<   rk   rG   rG   rH   Úrecv_message¨   s   €


z#MSLDAPClientConnection.recv_messagec                 C   sL   z| j  ¡ }|d ur| ¡ }W d|iS W d|iS    t ¡  d }Y d|iS )NÚ	ntlm_data)r0   Úget_extra_infoÚto_dictrT   rZ   )rF   r   rG   rG   rH   r€   ¸   s   

ûýz%MSLDAPClientConnection.get_extra_infoc              
   Ã   sî   �z_t  d¡ t ¡ | _tƒ }t| j|ƒ}tj| 	¡ | jj
d�I dH | _| jjtjkrM| jdu rM| jdu r?dtdƒ ¡  | _n| j ¡ }dt|ƒ ¡  | _t |  ¡ ¡| _tj| _t  d¡ W d	S  tyv } z
d|fW  Y d}~S d}~ww )
a  
		Connects to the remote server. Establishes the session, but doesn't perform binding.
		This function MUST be called first before the `bind` operation.

		:return: A tuple of (True, None) on success or (False, Exception) on error. 
		:rtype: (:class:`bool`, :class:`Exception`)
		zConnecting!rM   NFTs   tls-server-end-point:ó    zConnection succsessful!©TN)r   r{   rO   ra   r7   r!   r)   r.   rP   ÚconnectrN   r6   rD   r"   ÚCLIENT_SSL_TCPrA   rC   r(   Údigestr@   Úget_peer_certificateÚcreate_taskÚ(_MSLDAPClientConnection__handle_incomingr8   r   Ú	CONNECTEDr:   rc   )rF   Ú
packetizerÚclientÚcertdatarm   rG   rG   rH   r„   Â   s(   €




€ÿzMSLDAPClientConnection.connectc                 Ã   sl   �t  d¡ d| _| jdur| j ¡  | jdur(| j ¡ I dH  t d¡I dH  | j	dur4| j	 
¡  dS dS )zC
		Tears down the connection.

		:return: Nothing
		:rtype: None
		zDisconnecting!FNr   )r   r{   r2   r7   rb   r6   ÚcloserO   Úsleepr8   ÚcancelrK   rG   rG   rH   rQ   à   s   €




ÿz!MSLDAPClientConnection.disconnectc                 C   sj   t  d¡ d| _tj| _| jjtj	tj
tjfv r1| j ¡ | _| j ¡ | _| js*| jr3d| jj_dS dS dS )z{
		Internal function invoked after bind finished. 
		Instructs the network layer that upcoming messages might be wrapped
		zBIND Success!TFN)r   r{   r2   r   r9   r:   r/   rD   r*   ÚNTLMÚKERBEROSÚSICILYr0   Úsigning_neededr4   Úencryption_neededr5   r6   r‹   Úis_plain_msgrK   rG   rG   rH   Ú__bind_successõ   s   
üz%MSLDAPClientConnection.__bind_successc              
   Ã   sº  �| j tjkrtdƒ‚t d¡ �z­| jjtj	k�r|t
jt
jB t
jB }| jjtjkr-t
j}| jdu r5t
j}t d| ¡ | jjd| j ¡ || jd�I dH \}}}|durYd|fW S ddi}d	d
 ¡ t|ƒdœ}dt|ƒi}dt|ƒi}|  |¡I dH }	|  |	¡I dH }
|
d }
t|
tƒr‘d|
fW S |
j}
|
d d dkr¬dt|
d d |
d d ƒfW S d|i}d	d
 ¡ t|ƒdœ}dt|ƒi}dt|ƒi}|  |¡I dH }	|  |	¡I dH }
|
d }
t|
tƒräd|
fW S |
j}
|
d d dkrÿdt|
d d |
d d ƒfW S | jj|
d d | j ¡ | jd�I dH \}}}|du�r d|fW S d|i}d	d
 ¡ t|ƒdœ}dt|ƒi}dt|ƒi}|  |¡I dH }	|  |	¡I dH }
|
d }
t|
tƒ�rYd|
fW S |
j}
|
d d dk�rudt|
d d |
d d ƒfW S |  ¡  W dS | jjtj k�rd}| jj!dk�r“| jj! ¡ }d}| jj"dk�r¢| jj" ¡ }|dk�rªd| _#d|i}d	|t|ƒdœ}dt|ƒi}dt|ƒi}|  |¡I dH }	|  |	¡I dH }
|
d }
t|
tƒ�rád|
fW S |
j}
|
d d dk�rô|  ¡  W dS dt|
d d |
d d ƒfW S | jjtj$tj%fv �rd}	 z:t
jt
jB t
jB }| jjtjk�r't
j}| jdu �r0t
j}| jj|| j| j ¡ |d�I dH \}}}|du�rK|‚W n t�yd } zd|fW  Y d}~W S d}~ww d ¡ |dœ}dt&|ƒi}d	dt|ƒdœ}dt|ƒi}dt|ƒi}|  |¡I dH }	|  |	¡I dH }
|
d }
t|
tƒ�r¥d|
fW S |
j}
|
d d dk�r÷d|
d v �rÚ| jj|
d d | j| j ¡ |d�I dH \}}}|du�rÚd|fW S | j '¡ du �sê| j (¡ du �rð| j )¡ | _*|  ¡  W dS |
d d dk�r|
d d }�qdt|
d d |
d d ƒfW S | jjtj+k�r¶| jjtjk�r/|  ¡  W dS | jjtj,k�rª|  -¡ I dH \}}|du�rJd|fW S dd  ¡ i}dt&|ƒi}d	dt|ƒdœ}dt|ƒi}dt|ƒi}|  |¡I dH }	|  |	¡I dH }
t|
d tƒ�r‰d|
d fW S |
d jd }|d dk�r£dt|d |d ƒfW S |  ¡  W dS dtd!| jjj. ƒfW S td"| jjj. ƒ‚ t�yÜ } z|  /¡ I dH  d|fW  Y d}~S d}~ww )#zý
		Performs the bind operation.
		This is where the authentication happens. Remember to call `connect` before this function!

		:return: A tuple of (True, None) on success or (False, Exception) on error. 
		:rtype: (:class:`bool`, :class:`Exception`)
		z*Connect to the LDAP server before binding.zBIND in progress...TzSICILY bind with flags: %sN)ÚspnÚflagsr@   Úsicily_discor‚   é   r‘   )ÚversionÚnameÚauthenticationÚbindRequestr
   r   FÚ
resultCodeÚsuccessÚdiagnosticMessageÚsicily_negoÚ	matchedDN)r˜   r@   Úsicily_resprƒ   Úsimple)r@   r˜   r™   z
GSS-SPNEGO)Ú	mechanismÚcredentialsÚsaslÚserverSaslCredsÚsaslBindInProgressr§   ÚEXTERNALzNot implemented: %sz)Not implemented authentication method: %s)0r:   r   rŠ   rc   r   r{   r/   rD   r*   r“   r,   Ú
CONNECTIONÚCONFIDENTIALITYÚ	INTEGRITYr.   r"   r…   rB   r0   ÚauthenticateÚto_target_stringr@   Úencoder   r	   r
   rz   r~   Ú
isinstancer_   r#   Ú%_MSLDAPClientConnection__bind_successÚSIMPLEÚsecretÚusernamer3   r‘   r’   r   r•   r”   Úget_seq_numberr?   ÚSSLÚ
CLIENT_TCPÚstarttlsr�   rQ   )rF   r™   ÚdataÚto_continuerh   r0   ÚbindreqÚbrÚmsgÚmsg_idÚresÚpwÚuserÚ	challengerm   r©   Ú_ÚresprG   rG   rH   Úbind  s„  €

(
ÿý



þÿý



þ.

ÿý


þ
ÿý


þ(
ÿ€ÿþÿý
0

 

þ

ÿÿýþ€þzMSLDAPClientConnection.bindc              
   Ã   s*  �zyddi}dt |ƒi}dt|ƒi}|  |¡I d H }|  |¡I d H }t|d tƒr0d|d fW S |d jd }|d dkrIdt|d |d	 ƒfW S | j 	¡  t
 d¡I d H  | j | j tj¡¡I d H  t
 |  ¡ ¡| _tj| _t
 d¡I d H  W d
S  ty” } zt|ƒ d|fW  Y d }~S d }~ww )NÚrequestNames   1.3.6.1.4.1.1466.20037ÚextendedReqr
   r   Fr    r¡   r¢   rƒ   )r   r
   rz   r~   r³   rc   r_   r#   r8   r�   rO   r�   r6   Úwrap_sslr.   Úget_ssl_contextÚsslÚPROTOCOL_TLS_CLIENTrˆ   r‰   r   rŠ   r:   Úprint)rF   Úextr¿   rÀ   rÁ   rÂ   rÇ   rm   rG   rG   rH   r»     s8   €ÿþ
€þzMSLDAPClientConnection.starttlsÚentryÚ
attributesc              
   Ã   sþ   �zg|  ¡ t|ƒdœ}t |¡ dt|ƒi}dt|ƒi}|  |¡I dH }|  |¡I dH }t|d t	ƒr:d|d fW S |D ])}|d j
}	|j}|	dkre|d d d	kredt||d d |d d
 ƒf  W S q<W dS  t	y~ }
 z
d|
fW  Y d}
~
S d}
~
ww )a:  
		Performs the add operation.
		
		:param entry: The DN of the object to be added
		:type entry: str
		:param attributes: Attributes to be used in the operation
		:type attributes: dict
		:return: A tuple of (True, None) on success or (False, Exception) on error. 
		:rtype: (:class:`bool`, :class:`Exception`)
		)rÑ   rÒ   Ú
addRequestr
   Nr   FÚaddResponser    r¡   r¢   rƒ   )r²   r   r   r{   r   r
   rz   r~   r³   rc   r�   r_   r$   )rF   rÑ   rÒ   Úreqr¿   rÀ   rÁ   Úresultsrl   Úmsg_typerm   rG   rG   rH   Úadd*  s8   €þ



ý€€ÿzMSLDAPClientConnection.addÚchangesÚcontrolsc              
   Ã   s  �zj|  ¡ t|ƒdœ}dt|ƒi}dt|ƒi}|dur||d< |  |¡I dH }|  |¡I dH }t|d tƒr=d|d fW S |D ])}	|	d j}
|	j	}	|
dkrh|	d d	 d
krhdt
||	d d	 |	d d ƒf  W S q?W dS  ty� } z
d|fW  Y d}~S d}~ww )a  
		Performs the modify operation.
		
		:param entry: The DN of the object whose attributes are to be modified
		:type entry: str
		:param changes: Describes the changes to be made on the object. Must be a dictionary of the following format: {'attribute': [('change_type', [value])]}
		:type changes: dict
		:param controls: additional controls to be passed in the query
		:type controls: List[class:`Control`] 
		:return: A tuple of (True, None) on success or (False, Exception) on error. 
		:rtype: (:class:`bool`, :class:`Exception`)
		)ÚobjectrÙ   ÚmodifyRequestr
   NrÚ   r   FÚmodifyResponser    r¡   r¢   rƒ   )r²   r   r   r
   rz   r~   r³   rc   r�   r_   r%   )rF   rÑ   rÙ   rÚ   rÕ   r¿   rÀ   rÁ   rÖ   rl   r×   rm   rG   rG   rH   ÚmodifyR  s:   €þ


ý€€ÿzMSLDAPClientConnection.modifyc           	   
   Ã   sæ   �z[dt | ¡ ƒi}dt|ƒi}|  |¡I dH }|  |¡I dH }t|d tƒr.d|d fW S |D ])}|d j}|j}|dkrY|d d dkrYdt	||d d |d d	 ƒf  W S q0W d
S  tyr } z
d|fW  Y d}~S d}~ww )zê
		Performs the delete operation.
		
		:param entry: The DN of the object to be deleted
		:type entry: str
		:return: A tuple of (True, None) on success or (False, Exception) on error. 
		:rtype: (:class:`bool`, :class:`Exception`)
		Ú
delRequestr
   Nr   FÚdelResponser    r¡   r¢   rƒ   )
r   r²   r
   rz   r~   r³   rc   r�   r_   r&   )	rF   rÑ   r¿   rÀ   rÁ   rÖ   rl   r×   rm   rG   rG   rH   Údelete}  s0   €	


ý€€ÿzMSLDAPClientConnection.deleteé   éè  Fr   ÚbaseÚqueryÚsearch_scopeÚ
size_limitÚ
types_onlyÚderefAliasesÚ	timeLimitÚreturn_donec              
   C  sX  �| j tjkrdtdƒfV  dS | j tjkrdtdƒfV  dS zt|du r&d}t|ƒ}| ¡ |||||||dœ}dt|ƒi}dt|ƒi}|	durK|	|d< |  	|¡I dH }	 |  
|¡I dH }|D ]1}|d j}|j}|d
krw|
d	u ru|dfV   n|dkr|q^|
d	u r†|dfV  q^t|d ƒdfV  q^qSW dS  ty« } zd|fV  W Y d}~dS d}~ww )a`  
		Performs the search operation.
		
		:param base: base tree on which the search should be performed
		:type base: str
		:param query: filter query that defines what should be searched for
		:type query: str
		:param attributes: a list of attributes to be included in the response
		:type attributes: List[bytes]
		:param search_scope: Specifies the search operation's scope. Default: 2 (Subtree)
		:type search_scope: int
		:param types_only: indicates whether the entries returned should include attribute types only or both types and values. Default: False (both)
		:type types_only: bool
		:param size_limit: Size limit of result elements per query. Default: 1000
		:type size_limit: int
		:param derefAliases: Specifies the behavior on how aliases are dereferenced. Default: 0 (never)
		:type derefAliases: int
		:param timeLimit: Maximum time the search should take. If time limit reached the server SHOULD return an error
		:type timeLimit: int
		:param controls: additional controls to be passed in the query
		:type controls: List[class:`Control`]
		:param return_done: Controls wether the final 'done' LDAP message should be returned, or just the actual results
		:type return_done: bool

		:return: Async generator which yields (`LDAPMessage`, None) tuple on success or (None, `Exception`) on error
		:rtype: Iterator[(:class:`LDAPMessage`, :class:`Exception`)]
		NúConnected, but not bound.ú5Connection not running! Probably encountered an erroriX  ©Ú
baseObjectÚscoperé   Ú	sizeLimitrê   Ú	typesOnlyÚfilterrÒ   ÚsearchRequestr
   rÚ   TÚsearchResDoneÚsearchResRef)r:   r   rŠ   rc   r9   r   r²   r   r
   rz   r~   r�   r_   r   )rF   rä   rå   rÒ   ræ   rç   rè   ré   rê   rÚ   rë   ÚfltÚ	searchreqr¿   rÀ   rÁ   rÖ   rl   r×   rm   rG   rG   rH   Úsearchž  sZ   €ø

€ÿzMSLDAPClientConnection.searchrò   Ú
rate_limitc                 C  sÀ  �| j tjkrdtdƒfV  dS | j tjkrdtdƒfV  dS z¨d}	 t |
¡I dH  tdt||dœƒ 	¡ dœƒg}|	durC| 
|	¡ t|ƒ}| j|||||||||dd	�
2 zh3 dH W \}}|durkd|fV   W dS d
|d v rµ|d d
 dkr†t|d d
 |d d ƒ‚|d D ]%}|d dkr¯zt |d ¡jd }W n ty¬ } z|‚d}~ww  nqŠtdƒ‚qVt|d ƒdfV  qV6 |dkrÇW dS q# tyß } zd|fV  W Y d}~dS d}~ww )ap  
		Paged search is the same as the search operation and uses it under the hood. Adds automatic control to read all results in a paged manner.
		
		:param base: base tree on which the search should be performed
		:type base: str
		:param query: filter query that defines what should be searched for
		:type query: str
		:param attributes: a list of attributes to be included in the response
		:type attributes: List[bytes]
		:param search_scope: Specifies the search operation's scope. Default: 2 (Subtree)
		:type search_scope: int
		:param types_only: indicates whether the entries returned should include attribute types only or both types and values. Default: False (both)
		:type types_only: bool
		:param size_limit: Size limit of result elements per query. Default: 1000
		:type size_limit: int
		:param derefAliases: Specifies the behavior on how aliases are dereferenced. Default: 0 (never)
		:type derefAliases: int
		:param timeLimit: Maximum time the search should take. If time limit reached the server SHOULD return an error
		:type timeLimit: int
		:param controls: additional controls to be passed in the query
		:type controls: dict
		:param rate_limit: time to sleep bwetween each query
		:type rate_limit: float
		:return: Async generator which yields (`dict`, None) tuple on success or (None, `Exception`) on error
		:rtype: Iterator[(:class:`dict`, :class:`Exception`)]
		Nrì   rí   r‚   Ts   1.2.840.113556.1.4.319)ÚsizeÚcookie)ÚcontrolTypeÚcontrolValue)ræ   rç   rè   ré   rê   rÚ   rë   r    r
   r¡   r¢   rÚ   rý   rþ   rü   z+SearchControl missing from server response!)r:   r   rŠ   rc   r9   rO   r�   r   r   rs   r`   r   rù   r'   r]   r_   r   )rF   rä   rå   rÒ   ræ   rç   rò   ré   rê   rÚ   rú   rü   Úctrl_list_tempÚctrsrÂ   rh   Úcontrolrm   rG   rG   rH   Úpagedsearchò  s€   €þûÿ	
ÿö
€ÿûþãÍ5€ÿz"MSLDAPClientConnection.pagedsearchc                 Ã   sº   �| j tjkrd tdƒfS ddi}dt|ƒi}dt|ƒi}|  |¡I d H }|  |¡I d H }|d }t|tƒr:d |fS |j	d d dkrRd	t
|d d |d d
 ƒfS |j	d d  ¡ d fS )Nrí   rÉ   s   1.3.6.1.4.1.4203.1.11.3rÊ   r
   r   r    r¡   Fr¢   ÚresponseValue)r:   r   r9   rc   r   r
   rz   r~   r³   r_   r#   Údecode)rF   rÐ   r¿   rÀ   rÁ   rÂ   rG   rG   rH   ÚwhoamiN  s$   €ÿ


þzMSLDAPClientConnection.whoamic              	   Ã   sÐ   �| j tjtjfvrd tdƒfS g d¢}dd ¡ i}dddd| jjd dt|ƒ|d	œ}d
t	|ƒi}dt
|ƒi}|  |¡I d H }|  |¡I d H }|d }t|tƒrTd |fS d|jd vr]dS t|jd d ƒd fS )Nrí   )s   subschemaSubentrys   dsServiceNames   namingContextss   defaultNamingContexts   schemaNamingContexts   configurationNamingContexts   rootDomainNamingContexts   supportedControls   supportedLDAPVersions   supportedLDAPPoliciess   supportedSASLMechanismss   dnsHostNames   ldapServiceNames
   serverNames   supportedCapabilitiesÚpresentÚobjectClassr‚   r   r   Frî   rô   r
   rÒ   )NN)r:   r   rŠ   r9   rc   r²   r.   rN   r   r   r
   rz   r~   r³   r_   r   )rF   rÒ   Úfiltrø   r¿   rÀ   rÁ   rÂ   rG   rG   rH   Úget_serverinfof  s0   €
ø
z%MSLDAPClientConnection.get_serverinforJ   )râ   rã   Fr   NNF)râ   rã   Fr   NNr   ) Ú__name__Ú
__module__Ú__qualname__r   r+   rI   rL   rU   r‰   r   ÚstrrÛ   rz   Úintr~   r€   r„   rQ   r´   rÈ   r»   rØ   r   r   rÞ   rá   ÚbytesÚboolrù   r  r  r	  rG   rG   rG   rH   r-      s,     N
  $(+<!<T\r-   )>rO   Útypingr   r   rÍ   Úmsldapr   Úmsldap.commons.commonr   Úcommons.targetr   Úmsldap.protocol.messagesr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Úmsldap.protocol.utilsr   Úmsldap.protocol.typeconversionr   r   r   r   Úmsldap.protocol.queryr   r   Úmsldap.commons.authbuilderr    Úmsldap.network.packetizerr!   Úasysocks.unicomm.common.targetr"   Úmsldap.commons.exceptionsr#   r$   r%   r&   r'   Úhashlibr(   Úasysocks.unicomm.clientr)   Úasyauth.common.constantsr*   Úasyauth.common.credentialsr+   Úasyauth.common.winapi.constantsr,   r-   rG   rG   rG   rH   Ú<module>   s(    L