403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/passlib/crypto/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/passlib/crypto/__pycache__/des.cpython-314.pyc
+
�THis����Rt^RIt^RIHtRR.tRtRtRtRtR	t	R
t
R;s;s;s
sRtRt]P"!R
4tRtRtRtRt]!^1RR4tRtRtRRltRRltR#)a�passlib.crypto.des -- DES block encryption routines

History
=======
These routines (which have since been drastically modified for python)
are based on a Java implementation of the des-crypt algorithm,
found at `<http://www.dynamic.net.au/christos/crypt/UnixCrypt2.txt>`_.

The copyright & license for that source is as follows::

    UnixCrypt.java 0.9 96/11/25
    Copyright (c) 1996 Aki Yoshida. All rights reserved.
    Permission to use, copy, modify and distribute this software
    for non-commercial or commercial purposes and without fee is
    hereby granted provided that this copyright notice appears in
    all copies.

    ---

    Unix crypt(3C) utility
    @version 0.9, 11/25/96
    @author  Aki Yoshida

    ---

    modified April 2001
    by Iris Van den Broeke, Daniel Deville

    ---
    Unix Crypt.
    Implements the one way cryptography used by Unix systems for
    simple password protection.
    @version $Id: UnixCrypt2.txt,v 1.1.1.1 2005/09/13 22:20:13 christos Exp $
    @author Greg Wilkins (gregw)

The netbsd des-crypt implementation has some nice notes on how this all works -
    http://fxr.googlebit.com/source/lib/libcrypt/crypt.c?v=NETBSD-CURRENT
N)�exc�expand_des_key�des_encrypt_blocki���l����l����l�~�}�{�wll���s�gc	�B�RpRpRpW3W"3W"3W"3W3W"3W"3W!33sRsRsRsR#)z3delay loading tables until they are actually neededN))�r� r� r�  r	�r
�$r� r� $r
)r��l�l�l�@l@l@l@lDlDlDlD)rr�@r� r�@ r� r�@ r�  r�@  r)r��@l@�llHlH�ll@l@lllHlH)rr�r�r�r �r!�r"�r#�r$)r��l�lll�lll�lll)rr�r*�r+�r,�@r-�Pr.�@r/�Pr0)r�@� l@ ��@l l@ � �@ l  l@  � l@ l  l@  )rr�r8�r9�r:��r;��r<��r=��r>)r���l��@l@l�@l�@�l��l�l@l@l�@l�@)rr�@rD�rE�@rF�rG�@rH�rI�@rJ)r���l�l�l�lllllll)rr�@rP�rQ�@rR�rS�@rT�rU�@rV)r��l� l l l �llll!l!l!l!)rr�r[�r\�r]�r^� r_� r`� ra)r��l��l�l�l�� l"l l"� �l"�l �l"�))rrrrrrrrrErErErE� rgrgrg)rrGr[lri(l l(r*�l l i i(l  l( )rrrrr\r\r\r\r;r;r;r;�ririri)rrrblrDl�l�l�r?llli@l�l�l�)rrrrrrrrr+r+r+r+�@rjrjrj)rrSr
ir8�i�i�r-i@i@i@i�@i�@i�@i�@)rrrrr9r9r9r9r^r^r^r^�rlrlrl)rrri r!r"�$i$rWll l lll$l$)rrQrK��rdl�l�l�rZllll�l�l�l�)rr%r2l rAl@l`l`r�l l l@l@l`l`)rrPri@ rXl@l@l@@r&l@l@l@@ll@l@l@@)rr3r5r7r�l0l0rel l  l  l l l 0l 0)rrLrlr(l�lr1l@�@l@l@l@l@l@)rrYrO� r@l� l�l� rl(ll(l�l�(l�l�()rrrl@rM�l@l@rrl@l@lll@l@)rr'rclrl@l@l@rBllllAlAlAlA))rrrrr
r
r
r
r9r9r9r9�rururu)rr;rPi@�rb�l@l@ri�i@i@�lll@l@)rrrrrQrQrQrQr-r-r-r-�@rwrwrw)rrrWl@r8i� l�l�@r^i l l @i�i� l� l� @)rrrrrrrrrrrr� rxrxrx)rrGr\lr*rhl l r!illiil l )rrrrr+r+r+r+rSrSrSrS�ryryry)rrr[l@rrl@l@@rKi@�ll@i� i@� lAl@A)rrEr?irYl l l rOlllrsl l l )rrr&�r3rpllrlPl@lPl@lPl@lP)rrDri @rLl�l l �rl�@l @l �@lBl�Bl Bl �B)rr'r(r)rlrqlrZlll�lll)rr@rcl�rl�ll�r%l�ll�rol�ll�)rrMrBlr2l!l l!rrtlll l!l l!)rrerl0rAl @l@l0@rdrfl�l0��@�l @�l@�l0@�)rrrX�r1l@l@l@r5l l(l(r6l@ l@(l@())r��rni���lll�lllllll)r� � l  ��@l� Dl� @l�  D�@l @l Dl  Dl�@@l� @Dl� D@l�  DD)rr+rSryr*r,��r^�������)rrAr1�@@r3�@r4�@@rdr|�@��@@����@��@��@@�)rrrr	r�  �  �   r�  �  �   r�   �   �    )rrBr@rCr�����rZ�����r{�����)r�@�@ lD@ �@i@@l@ lD@ �@iD@l@� lDD� iD@iDD@l@� lDD� )r��l� l"l l"�llll l"l l"))@�@"rr�� @"r� "� r�r�r��@�  � @ rrr�rr�@ �"r�r�r�r�rr�r�� @r�r�r�rrr�r�r�r�rr�r�r�r�r�r�r�rr�r�r�r�r�r�rr�r�rrrr�r�rr�r�r�)@�@  r�  �@�@� �@ r�r��@ r3r�� �@  r�r3r*�@ r�r��  r�rr�r�r�r�r�r�r*r�r�r�r�r�r�r�r�r�rr�r�r*r�r�r�r�r�r�r�rr�r3r�r�r�r�r*r�r�r�r3r�r�)@�@���rd����r�r������r���rS�����rS��rr�r�rdr�r�r�r�r�r���r�r�rr�r�r�rdrSr�r�r�r�r�rr�r�r�r�r�r�rSr�r�r�r�r�r�r�r�r�rr�r�r�r�rdr�)@��@@�@r���@@r�@��@@��@�@��@r+��@@r�r�r�r+��@�@rAr�r�r�r�rAr�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrAr�rr�r�rAr+r�r�r�r�r�r�r�r�r�r�r�r�r+r�r�)@r~r1r��@�@��@�@r1r��@�r��@rr�r~rr�r�r�rr�rr�r�rrr�r�r�r�r�r�rrr�r1rr�r�r~r�r�rr�r~r�rrr�r�rr�r�r�r�r1r�r�r�r�rr�r�r�)@� �@ r�@r�rB�!r�!�@!�@rn�r��� �@!rr��@ rrBr�r�r�r�r�rnr�r�r�r�r�r�rnr�r�r�r�rr�rnrBr�rr�r�r�r�r�r�rr�r�r�r�rrBr�r�r�r�r�r�r�)@r�rZ� �@  �@ !�@ �rr^�@ !�@!� r�� r�r�r�r�r�r�rr�r�r��@  �@!r�r�r�r�rZr^r�r�r�r�r�rZr^r�r�r�r�rrZr�r�r�rr�r�r�r�r�r�r^r�r�r�r�r�r�r�r�)@� @� ���@r� ��@� � �@r�r��r���@� �@� @rr@rrr�rrrrrr�rr�r�r@r�r�r�r@rrr�rrrr�rr�rr�r�rr�rr�rrrr�rrr�r�rrrr�r@r))rr@rBrCrZr�r�r�rr�r�r�r{r�r�r�)rrWrlrlllr&lllrzlll)rrrr	rr�r�r�rr�r�r�rr�r�r�)r�iiiiiiiiiiiiii)rr(rlr'r)llrOlllllll)rrer2l  rl @l @l  @rl @l @l  @l@@l @@l @@l  @@)rr8rKi��r;r<i��i���rbl�ll�rvl�ll�)rrQrGir9iiir?iiiiiii)rr1rAr�rdr�r|r�r3r4r�r�r�r�r�r�)rr\r[r]rXlllrlllr}lll)rrSr+ryr^r�r�r�r*r�r,r�r�r�r�r�)r��iiiiiiiiiiiii)rrMr%lrLrNllrlrolllll)rrrclr5l l l rYl l l l  l  l  l  )rrrPi@@rDi@@i@@i@@@r-i@@i@@i@@@i@@i@@@i@@@i@@@@)rr!r
irr"iirEiiiiiii)�PCXROT�IE3264�SPE�CF6464)�PC1ROT�PC2ROTA�PC2ROTBs   �4/usr/lib/python3/dist-packages/passlib/crypto/des.py�_load_tablesrIsp��a�F�N	a�G�H	a�G�b	
��	��	��	��	��	��	��	��	�F� Q�F�lQ�C�pa�F�c�Z�^pVF"pW#V^,,,pV^,pK$	V#)z`Returns the permutation of the given 32-bit or 64-bit code with
the specified permutation table.�)�c�p�out�rs&&  r�_permuter�s3��
�C�
����S��z���	�a�����Jrz>Qc�,�\PV4#)N��_uint64_struct�pack��values&r�_pack64r!�s�����u�%�%rc�:�\PV4^,#)r�r�unpackrs&r�	_unpack64r%�s��� � ��'��*�*rc�:�\PV4R,#):rNNrrs&r�_pack56r'�s�����u�%�b�)�)rc�H�\PRV,4^,#)�r#rs&r�	_unpack56r*�s��� � ��5��1�!�4�4rc�a�\S\4'd\S4^8wd\R4hMh\S\4'd;S^8gS\
8�d\R4h\
\\S444#\P!SRR4h\S4o\V3Rl\44#)zDconvert DES from 7 bytes to 8 bytes (by inserting empty parity bits)zkey must be 7 bytes in sizez'key must be 56-bit non-negative integer�bytes or int�keyc3�R<"�TFpSV,	^,^,x�K	R#5i)�Nr)�.0�shiftr-s& �r�	<genexpr>�!expand_des_key.<locals>.<genexpr>�s"����H�<�%�3�%�<�4�'�A�-�-�<�s�$')
�
isinstance�bytes�len�
ValueError�int�INT_56_MASKr%rr'r�ExpectedTypeErrorr*�_EXPAND_ITER)r-sfrrr�s�����#�u����s�8�q�=��:�;�;��	�C��	�	���7�c�K�'��F�G�G������5�6�6��#�#�C���?�?�
�C�.�C��H�<�H�H�Hrc���\V\4'd9\V4^8wd\R4h\	\\
V444#\V\4'dV^8gV\8�d\R4hM\P!VRR4hV^,p^p^pV^88d+W^,V,,pV^,pV^,
pK1V\(,'dQhV#)zGconvert DES key from 8 bytes to 7 bytes (by discarding the parity bits)zkey must be 8 bytes in size�'key must be 64-bit non-negative integerr,r-)r4r5r6r7r'�shrink_des_keyr%r8�INT_64_MASKrr:)r-�result�offsets&  rr>r>�s����#�u����s�8�q�=��:�;�;��~�i��n�5�6�6��#�s�����7�c�K�'��F�G�G�(��#�#�C���?�?��A�I�C�
�F�
�F�
�2�+���:�&�(�(����	���!����+��%�%�&�&��Mrc��\V\4'dD\V4^8Xd
\V4pM\V4^8wd\	R4h\V4pM\P!VRR4h\V\4'd(\V4^8wd\	R4h\V4pM\P!VRR4h\WW#4p\V4#)aCencrypt single block of data using DES, operates on 8-byte strings.

:arg key:
    DES key as 7 byte string, or 8 byte string with parity bits
    (parity bit values are ignored).

:arg input:
    plaintext block to encrypt, as 8 byte string.

:arg salt:
    Optional 24-bit integer used to mutate the base DES algorithm in a
    manner specific to :class:`~passlib.hash.des_crypt` and its variants.
    The default value ``0`` provides the normal (unsalted) DES behavior.
    The salt functions as follows:
    if the ``i``'th bit of ``salt`` is set,
    bits ``i`` and ``i+24`` are swapped in the DES E-box output.

:arg rounds:
    Optional number of rounds of to apply the DES key schedule.
    the default (``rounds=1``) provides the normal DES behavior,
    but :class:`~passlib.hash.des_crypt` and its variants use
    alternate rounds values.

:raises TypeError: if any of the provided args are of the wrong type.
:raises ValueError:
    if any of the input blocks are the wrong size,
    or the salt/rounds values are out of range.

:returns:
    resulting 8-byte ciphertext block.
zkey must be 7 or 8 bytesr5r-zinput block must be 8 bytes�input)
r4r5r6rr7r%rr:�des_encrypt_int_blockr!)r-rC�salt�roundsr@s&&&& rrrs���B�#�u����s�8�q�=� ��%�C�
��X��]��7�8�8���n���#�#�C��%�8�8��%�����u�:��?��:�;�;��%� ���#�#�E�7�G�<�<�#�3�t�
<�F��6�?�rc���V^8d\R4hV^8gV\8�d\R4h\V\4'g\P
!VRR4hV^8gV\8�d\R4h\V\4'g\P
!VRR4hV^8gV\8�d\R4h\f\4\wrErgr�r�Rp\V!V44p
V^?,^,VR	,^,,VR
,^,	,VR,^,	,pV^8Xd^;r�McV^,	R,VR
,,p\V\4pV^ ,	R,V^,	R
,,p\V\4pV'EdKV^,pV
EF5wppV^ ,	V,V,pV^ ,V,V,V,pVVV^:,	^?,,VV^2,	^?,,,VV^*,	^?,,,VV^",	^?,,,VV^,	^?,,,V	V^,	^?,,,V
V^
,	^?,,,VV^,	^?,,,,pV^ ,	V,V,pV^ ,V,V,V,pVVV^:,	^?,,VV^2,	^?,,,VV^*,	^?,,,VV^",	^?,,,VV^,	^?,,,V	V^,	^?,,,V
V^
,	^?,,,VV^,	^?,,,,pEK8	Y�r�EKSV^,	R,V^!,R,,V^#,	R,,V^,R,,p\V\4#)a]encrypt single block of data using DES, operates on 64-bit integers.

this function is essentially the same as :func:`des_encrypt_block`,
except that it operates on integers, and will NOT automatically
expand 56-bit keys if provided (since there's no way to detect them).

:arg key:
    DES key as 64-bit integer (the parity bits are ignored).

:arg input:
    input block as 64-bit integer

:arg salt:
    optional 24-bit integer used to mutate the base DES algorithm.
    defaults to ``0`` (no mutation applied).

:arg rounds:
    optional number of rounds of to apply the DES key schedule.
    defaults to ``1``.

:raises TypeError: if any of the provided args are of the wrong type.
:raises ValueError:
    if any of the input blocks are the wrong size,
    or the salt/rounds values are out of range.

:returns:
    resulting ciphertext as 64-bit integer.
zrounds must be positive integerz(salt must be 24-bit non-negative integerr8r-r=rCz)input must be 64-bit non-negative integerc3�"�\F7wr\W4p\W24pV\,V\,3x�K9	R#5i)zCgiven 64-bit key, iterates over the 8 (even,odd) key schedule pairsN)r
r�_KS_MASK)�ks_odd�p_even�p_odd�ks_evens&   r�_iter_key_schedule�1des_encrypt_int_block.<locals>._iter_key_schedules:���#�M�F��v�.�G��g�-�F��H�$�f�x�&7�7�7�$�s�AAi�i�i�l�*UUiUUUUl<<xxl�C�il�p�a)r7�INT_24_MASKr4r8rr:r?r
rr�listrrr
)r-rCrErF�SPE0�SPE1�SPE2�SPE3�SPE4�SPE5�SPE6�SPE7rN�ks_list�L�RrMrJ�k�B�Cs&&&&                 rrDrD<s���D��z��:�;�;��a�x�4�+�%��C�D�D��c�3����#�#�C���6�6�
�Q�w�#��#��B�C�C��e�S�!�!��#�#�E�5�'�:�:��q�y�E�K�'��D�E�E��~���69�2�D��D��8��%�c�*�+�G���/�b�	 ��8�O��"�	$��8�O��!�	#�
�8�O��"�	$�	�
��z��	��A��r�k�Z�
'�E�J�,>�?���Q�����r�k�Z�
'�U�a�Z�:�,E�F���Q����
�&��!��� '�O�G�V��r�'�Q��$�&�A��b��A�
��!�G�+�A�
��a�2�g��%�&���R��4�'�(�)���R��4�'�(�)���R��4�'�(�)���R��4�'�(�	)�
��R��4�'�(�)���R��4�'�(�
)���Q��$��'�(�	
�A��r�'�Q��$�&�A��b��A�
��!�F�*�A�
��a�2�g��%�&���R��4�'�(�)���R��4�'�(�)���R��4�'�(�)���R��4�'�(�	)�
��R��4�'�(�)���R��4�'�(�
)���Q��$��'�(�	
�A�% '�<�1��q�&�&�	&�
��G�)�)�	+�
��G�)�)�	+�
��F�(�(�	*���A�v��ri����)rr)�__doc__�struct�passlibr�__all__rPr9r?�_KDATA_MASK�
_KPARITY_MASKrIr
rrr
rr�Structrr!r%r'r*�ranger;rr>rrDrrr�<module>rhs���%�V���������� ��!��"�
���"&�%��%��%�#��c�L;	����t�$��&�+�*�5��R��R� ��I�(�,6�rNr

Youez - 2016 - github.com/yon3zu
LinuXploit