AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/twisted/words/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/twisted/words/test/__pycache__/test_jabbersaslmechanisms.cpython-310.pyc
o

�bQ�@sbdZddlmZddlmZddlmZGdd�dej�ZGdd�dej�Z	Gd	d
�d
ej�Z
dS)z>
Tests for L{twisted.words.protocols.jabber.sasl_mechanisms}.
�)�
networkString)�unittest)�sasl_mechanismsc@�eZdZdZdd�ZdS)�
PlainTestszL
    Tests for L{twisted.words.protocols.jabber.sasl_mechanisms.Plain}.
    cCs"t�ddd�}|�|��d�dS)z,
        Test the initial response.
        N�test�secretstestsecret)r�Plain�assertEqual�getInitialResponse��self�m�r�N/usr/lib/python3/dist-packages/twisted/words/test/test_jabbersaslmechanisms.py�test_getInitialResponsesz"PlainTests.test_getInitialResponseN��__name__�
__module__�__qualname__�__doc__rrrrrr�rc@r)�AnonymousTestszP
    Tests for L{twisted.words.protocols.jabber.sasl_mechanisms.Anonymous}.
    cCst��}|�|��d�dS)z8
        Test the initial response to be empty.
        N)r�	Anonymousr
rrrrrr sz&AnonymousTests.test_getInitialResponseNrrrrrrrrc@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�DigestMD5TestszP
    Tests for L{twisted.words.protocols.jabber.sasl_mechanisms.DigestMD5}.
    cCst�ddddd�|_dS)N�xmppzexample.orgrr)r�	DigestMD5�	mechanism�r
rrr�setUp-s

�zDigestMD5Tests.setUpcCs|�|j��d�dS)z=
        Test that no initial response is generated.
        N)�assertIdenticalrrrrrrr2sz&DigestMD5Tests.test_getInitialResponsec
C�Fd}|j�|j�|��}|d=|d=|�ddddgdd	d
d�|�dS)
zl
        The response to a Digest-MD5 challenge includes the parameters from the
        challenge.
        sJrealm="localhost",nonce="1234",qop="auth",charset=utf-8,algorithm=md5-sess�cnonce�response�test�1234�00000001�auth�utf-8s	localhost�xmpp/example.org�susername�noncesnc�qop�charset�realms
digest-uriN�r�_parse�getResponser
�r
�	challenge�
directivesrrr�test_getResponse8���	�zDigestMD5Tests.test_getResponsec
Cr!)
zs
        Bytes outside the ASCII range in the challenge are nevertheless
        included in the response.
        sSrealm="échec.example.org",nonce="1234",qop="auth",charset=utf-8,algorithm=md5-sessr"r#r$r%r&r'r(�échec.example.orgr)r*Nr/r2rrr�test_getResponseNonAsciiRealmPr6z,DigestMD5Tests.test_getResponseNonAsciiRealmcCs,d}|j�|j�|��}|�|dd�dS)zq
        The response to a challenge without a realm uses the host part of the
        JID as the realm.
        �8nonce="1234",qop="auth",charset=utf-8,algorithm=md5-sessr.sexample.orgNr/r2rrr�test_getResponseNoRealmhsz&DigestMD5Tests.test_getResponseNoRealmcCs@t�ddddd�|_d}|j�|j�|��}|�|dd�dS)	z�
        If the challenge does not include a realm and the host part of the JID
        includes bytes outside of the ASCII range, the response still includes
        the host part of the JID as the realm.
        ruéchec.example.orgNrrr9r.r7)rrrr0r1r
r2rrr�test_getResponseNoRealmIDNqs
�z)DigestMD5Tests.test_getResponseNoRealmIDNcCs d}|j�|�}|�d|�dS)zW
        If the challenge just has a rspauth directive, the response is empty.
        s@rspauth=cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA==�N)rr1r
)r
r3�responserrr�test_getResponseRspauth~sz&DigestMD5Tests.test_getResponseRspauthc
Csxd}d}tdd��}d}d}d}d}d	�|�}t�d
|d||�}	|	�||||�|�|�|�|�|�|�}
|�|
d�dS)
zc
        The response to a Digest-MD5 challenge is computed according to RFC
        2831.
        zutf-8sOA6MG9tEQGm2hh��08xsOA6MHXh6VqTrRkuИchrisuИsecretuИelwood.innosoft.comuimap/Иelwood.innosoft.comsimapNs 7928f233258be88392424d094453c5e3)r�encoderr�_calculateResponser
)r
�charset�nonce�nc�cnonce�username�password�host�	digestURIrr=rrr�test_calculateResponse�s&
�	z%DigestMD5Tests.test_calculateResponsecCs4d}|j�|�}|�dddddgddgd	�|�d
S)zc
        A challenge can be parsed into a L{dict} with L{bytes} or L{list}
        values.
        sTnonce="1234",qop="auth,auth-conf",charset=utf-8,algorithm=md5-sess,cipher="des,3des"smd5-sessr%r(r's	auth-confsdess3des)s	algorithmr+r-r,scipherN)rr0r
r2rrr�
test_parse�s���zDigestMD5Tests.test_parseN)
rrrrrrr5r8r:r;r>rKrLrrrrr(s	
rN)r�twisted.python.compatr�
twisted.trialr�twisted.words.protocols.jabberr�TestCaserrrrrrr�<module>s


Anon7 - 2022
AnonSec Team