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/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/passlib/__pycache__/pwd.cpython-314.pyc
+
�THi6]���a�R!t10t^RIt^RIt^RIt^RIHt^RIHtHt^RI	H
t
^RIHtH
t
^RIHt^RIHt^RIHtHtHt^R	IHt.R"Ot]!^^^$^0^<R
7tRtRtR#R
lt]]3t ]!]"3t#]!!4t$]^kR$Rlt%!RR4t&]!RRRRR7t'!RR]&4t(R%Rlt)Rt*!RR]4t+]+!4t,R&Ft-],P]]-R]-R24K	!RR]&4t/R%R lt0R#)'�N)�defaultdict)�Hashable�MutableMapping)�	resources)�ceil�log2)�exc)�logger)�
getrandstr�rng�
to_unicode)�memoized_property)�unsafe�weak�fair�strong�securec�`�\V4PpW"PV4^,R#)z2return remaining classes in object's MRO after clsN)�type�__mro__�index)�obj�cls�mros&& �-/usr/lib/python3/dist-packages/passlib/pwd.py�
_superclassesr%s*��
�s�)�
�
�C��y�y��~��!�#�$�$�c�^�\V4p\\4pVFpW#;;,^,
uu&K	VfVP	4p\V4pMVP	4pV'g^#\
V4\RV44V,,
# \dRpL�i;i)a�
returns 'rate of self-information' --
i.e. average (per-symbol) entropy of the sequence **source**,
where probability of a given symbol occurring is calculated based on
the number of occurrences within the sequence itself.

if all elements of the source are unique, this should equal ``log(len(source), 2)``.

:arg source:
    iterable containing 0+ symbols
    (e.g. list of strings or ints, string of characters, etc).

:returns:
    float bits of entropy
Nc3�D"�TFq\V4,x�K	R#5i�N)r)�.0�values& r�	<genexpr>�"_self_info_rate.<locals>.<genexpr>Ls���D�V�E�D��K�/�/�V�s� )�len�	TypeErrorr�int�values�sumr)�source�size�counts�charr(s&    r�_self_info_rater.+s��� ��6�{����
�F����������|�������6�{�����������:��D�V�D�D�t�K�K�K�������s�B�
B,�+B,c�|�V'd&\P!V4!\V44#\PPV4'd
\
VR4#VPR4wr#pV'g\RV:24h\P!V4PV4P
R4#)z�
:param asset_path:
    string containing absolute path to file,
    or package-relative path using format
    ``"python.module:relative/file/path"``.

:returns:
    filehandle opened in 'rb' mode
    (unless encoding explicitly specified)
�rb�:zIasset path must be absolute file path or use 'pkg.name:sub/path' format: )�codecs�	getreader�_open_asset_path�os�path�isabs�open�	partition�
ValueErrorr�files�joinpath)r6�encoding�package�sep�subpaths&&   rr4r4Ws��������)�*:�4�*@�A�A�	�w�w�}�}�T����D�$��� �N�N�3�/��G�'���
2�26��
;�
�	
��?�?�7�#�,�,�W�5�:�:�4�@�@rc���\pRpW9dR#\V\4'g#\	\V44\	V48XdIV'd?\P!\4;_uu_4VPV4RRR4R#R#\4p\4pVFpWd9dTMTPV4K	\V4p^p\	V4V8�d^pRPRVRV44p\	V4V8�d!VR\	V4V,
,,
p\RVRV24h \dRpELAi;i +'giR#;i)	z�
helper for generators --
Throws ValueError if source elements aren't unique.
Error message will display (abbreviated) repr of the duplicates in a string/list
TFN�, c3�J"�TFp\\V44x�K	R#5ir )�repr�str�r!�words& rr#�!_ensure_unique.<locals>.<genexpr>�s���B�\�T��c�$�i���\�s�!#z, ... plus %d others�`z%` cannot contain duplicate elements: )�_ensure_unique_cacher&�
isinstance�
_set_typesr%�set�
contextlib�suppress�add�sorted�joinr:)	r*�param�cache�hashable�seen�dups�elem�trunc�dup_reprs	&&       r�_ensure_uniquer[ws:��
!�E��H���?����&�*�%�%��S��[�)9�S��[�)H���$�$�Y�/�/��	�	�&�!�0���5�D��5�D������4�,�,�T�2���$�<�D�
�E�
�4�y�5�����y�y�B�T�&�5�\�B�B�H�
�4�y�5���*�c�$�i�%�.?�@�@���q���D�X�J�O�
P�P��5������0�/��s�E�5E�
E�E�E)	c�aa�]tRt^�toRtRtRt]tRtRV3Rllt	]
R4t]
R4tRt
RRltR	tR
tVtV;t#)
�SequenceGeneratora�
Base class used by word & phrase generators.

These objects take a series of options, corresponding
to those of the :func:`generate` function.
They act as callables which can be used to generate a password
or a list of 1+ passwords. They also expose some read-only
informational attributes.

Parameters
----------
:param entropy:
    Optionally specify the amount of entropy the resulting passwords
    should contain (as measured with respect to the generator itself).
    This will be used to auto-calculate the required password size.

:param length:
    Optionally specify the length of password to generate,
    measured as count of whatever symbols the subclass uses (characters or words).
    Note if ``entropy`` requires a larger minimum length,
    that will be used instead.

:param rng:
    Optionally provide a custom RNG source to use.
    Should be an instance of :class:`random.Random`,
    defaults to :class:`random.SystemRandom`.

Attributes
----------
.. autoattribute:: length
.. autoattribute:: symbol_count
.. autoattribute:: entropy_per_symbol
.. autoattribute:: entropy

Subclassing
-----------
Subclasses must implement the ``.__next__()`` method,
and set ``.symbol_count`` before calling base ``__init__`` method.
Nrc�2<�VPfQR4hVfVfhVf
VPp\PW4pV^8:d\	R4h\\
WP,44pVeW%8dTpWnV^8d\	R4hW nVeW0n	V'dR\V\4\38Xd8\RPRPVP!4444h\"SV`H!R/VBR#)Nzsubclass must set .symbol_countz!`entropy` must be positive numberz!`length` must be positive integerzUnexpected keyword(s): {}rB�)�symbol_count�requested_entropy�entropy_aliases�getr:r'r�entropy_per_symbol�lengthrrr]�objectr&�formatrR�keys�super�__init__)�self�entropyrer�kwds�
min_length�	__class__s&&&&, �rrj�SequenceGenerator.__init__�s����� � �,�O�.O�O�,���&�.����0�0��%�)�)�'�;�G��!�|� �!D�E�E��T�'�,C�,C�"C�D�E�J��~��!4�#��!(���A�:��@�A�A����?��H��M�$�(9�:�v�i�G��7�>�>�t�y�y�����?U�V�W�W�
��� �4� rc�,�\VP4#)zJ
Average entropy per symbol (assuming all symbols have equal probability)
)rr`�rks&rrd�$SequenceGenerator.entropy_per_symbol�s��
�D�%�%�&�&rc�<�VPVP,#)a
Effective entropy of generated passwords.

This value will always be a multiple of :attr:`entropy_per_symbol`.
If entropy is specified in constructor, :attr:`length` will be chosen so
so that this value is the smallest multiple >= :attr:`requested_entropy`.
)rerdrrs&rrl�SequenceGenerator.entropy�s���{�{�T�4�4�4�4rc��\R4h)z;main generation function, should create one password/phrasezimplement in subclass)�NotImplementedErrorrrs&r�__next__�SequenceGenerator.__next__s��!�"9�:�:rc���Vf\V4#\V\4'd%\V4Uu.uFp\V4NK	up#V\JdV#\
P!VRR4huupi)z>
frontend used by genword() / genphrase() to create passwords
z<None>, int, or <iter>�returns)�nextrKr'�range�iterr	�ExpectedTypeError)rkr{�_s&& r�__call__�SequenceGenerator.__call__	sd���?���:���g�s�#�#�(-�g��7��1�D��J��7�7��d�?��K��#�#�G�-E�y�Q�Q��8s�A.c��V#r r_rrs&r�__iter__�SequenceGenerator.__iter__s���r)rerar�NNNr )�__name__�
__module__�__qualname__�__firstlineno__�__doc__rerarr`rjrrdrlrxr�r��__static_attributes__�__classdictcell__�
__classcell__�ro�
__classdict__s@@rr]r]�sj����&�R�F�!���C��L�!�<�'��'��5��5�;�
R��rr]zH0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*?/�>0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ�2234679abcdefghjkmnpqrstuvwxyzACDEFGHJKMNPQRTUVWXYZ�0123456789abcdef)�ascii_72�ascii_62�ascii_50�hexc�Xaa�]tRtRtoRtRtRtR	V3Rllt]R4t	Rt
RtVtV;t
#)
�
WordGeneratori&a�
Class which generates passwords by randomly choosing from a string of unique characters.

Parameters
----------
:param chars:
    custom character string to draw from.

:param charset:
    predefined charset to draw from.

:param \*\*kwds:
    all other keywords passed to the :class:`SequenceGenerator` parent class.

Attributes
----------
.. autoattribute:: chars
.. autoattribute:: charset
.. autoattribute:: default_charsets
r�Nc�<�V'dV'd\R4hM+V'gVPpV'gQh\V,pW n\VRR7p\	VRR7Wn\SV`!R/VBR#)z,`chars` and `charset` are mutually exclusive�chars�rSNr_)r&�charset�default_charsetsr
r[r�rirj)rkr�r�rmros&&&,�rrj�WordGenerator.__init__Bsk������ N�O�O����,�,����w�$�W�-�E����5��0���u�G�,��
�	��� �4� rc�,�\VP4#r )r%r�rrs&rr`�WordGenerator.symbol_countU����4�:�:��rc�X�\VPVPVP4#r )rrr�rerrs&rrx�WordGenerator.__next__Ys���$�(�(�D�J�J����<�<r)r�r�)NN)r�r�r�r�r�r�r�rjrr`rxr�r�r�r�s@@rr�r�&s;�����,�G�
�E�!�&����=�=rr�c�0�\RRVRV/VBpV!V4#)a�	Generate one or more random passwords.

This function uses :mod:`random.SystemRandom` to generate
one or more passwords using various character sets.
The complexity of the password can be specified
by size, or by the desired amount of entropy.

Usage Example::

    >>> # generate a random alphanumeric string with 48 bits of entropy (the default)
    >>> from passlib import pwd
    >>> pwd.genword()
    'DnBHvDjMK6'

    >>> # generate a random hexadecimal string with 52 bits of entropy
    >>> pwd.genword(entropy=52, charset="hex")
    '310f1a7ac793f'

:param entropy:
    Strength of resulting password, measured in 'guessing entropy' bits.
    An appropriate **length** value will be calculated
    based on the requested entropy amount, and the size of the character set.

    This can be a positive integer, or one of the following preset
    strings: ``"weak"`` (24), ``"fair"`` (36),
    ``"strong"`` (48), and ``"secure"`` (56).

    If neither this or **length** is specified, **entropy** will default
    to ``"strong"`` (48).

:param length:
    Size of resulting password, measured in characters.
    If omitted, the size is auto-calculated based on the **entropy** parameter.

    If both **entropy** and **length** are specified,
    the stronger value will be used.

:param returns:
    Controls what this function returns:

    * If ``None`` (the default), this function will generate a single password.
    * If an integer, this function will return a list containing that many passwords.
    * If the ``iter`` constant, will return an iterator that yields passwords.

:param chars:

    Optionally specify custom string of characters to use when randomly
    generating a password. This option cannot be combined with **charset**.

:param charset:

    The predefined character set to draw from (if not specified by **chars**).
    There are currently four presets available:

    * ``"ascii_62"`` (the default) -- all digits and ascii upper & lowercase letters.
      Provides ~5.95 entropy per character.

    * ``"ascii_50"`` -- subset which excludes visually similar characters
      (``1IiLl0Oo5S8B``). Provides ~5.64 entropy per character.

    * ``"ascii_72"`` -- all digits and ascii upper & lowercase letters,
      as well as some punctuation. Provides ~6.17 entropy per character.

    * ``"hex"`` -- Lower case hexadecimal.  Providers 4 bits of entropy per character.

:returns:
    :class:`!str` string containing randomly generated password;
    or list of 1+ passwords if :samp:`returns={int}` is specified.
rerlr_)r��rlrer{rm�gens&&&, r�genwordr�_s&��L�
?�v�
?�w�
?�$�
?�C��w�<�rc��\VR4;_uu_4pRV4p\;QJd.RV4FNK	5M
!RV44pRRR4\P!R\	X4V4V# +'giL3;i)a
load wordset from compressed datafile within package data.
file should be utf-8 encoded

:param asset_path:
    string containing  absolute path to wordset file,
    or "python.module:relative/file/path".

:returns:
    tuple of words, as loaded from specified words file.
zutf-8c3�@"�TFqP4x�K	R#5ir )�striprFs& rr#� _load_wordset.<locals>.<genexpr>�s���+���z�z�|�|��s�c3�8"�TFq'gKVx�K	R#5ir r_rFs& rr#r��s���3�s�t�d�d�d�s�s�	�
Nz!loaded %d-element wordset from %r)r4�tupler
�debugr%)�
asset_path�fhr��wordss&   r�
_load_wordsetr��se��
�*�g�	.�	.�"�+��+����3�s�3���3�s�3�3��
/�$�L�L�4�c�%�j�*�M��L�'
/�	.�s�6A6�6B	c�xaa�]tRtRtoRtRtRtV3RltRtRt	Rt
Rt]R	4t
R
tRtRtR
tVtV;t#)�WordsetDicti�z�
Special mapping used to store dictionary of wordsets.
Different from a regular dict in that some wordsets
may be lazy-loaded from an asset path.
Nc�D<�/Vn/Vn\SV`!V/VBR#r )�paths�_loadedrirj)rk�argsrmros&*,�rrj�WordsetDict.__init__�s#�����
����
���$�'�$�'rc��VPV,# \dMi;iTPT,p\T4;q0PT&T#r )r��KeyErrorr�r�)rk�keyr6r"s&&  r�__getitem__�WordsetDict.__getitem__�sP��	��<�<��$�$���	��	���z�z�#���$1�$�$7�7����S�!��s��#�#c�"�W PV&R#)z+
set asset path to lazy-load wordset from.
N)r�)rkr�r6s&&&r�set_path�WordsetDict.set_path�s���
�
�3�rc�"�W PV&R#r )r�)rkr�r"s&&&r�__setitem__�WordsetDict.__setitem__�s��!���S�rc��W9d,VPVVPPVR4R#VPVR#r )r�r��pop�rkr�s&&r�__delitem__�WordsetDict.__delitem__�s0���;����S�!��J�J�N�N�3��%��
�
�3�rc�f�\VP4pVPVP4V#r )rMr��updater�)rkrhs& r�_keyset�WordsetDict._keyset�s%���4�<�<� �����D�J�J���rc�,�\VP4#r )r~r�rrs&rr��WordsetDict.__iter__�s���D�L�L�!�!rc�,�\VP4#r )r%r�rrs&r�__len__�WordsetDict.__len__s���4�<�<� � rc�J�WP9;'gWP9#r �r�r�r�s&&r�__contains__�WordsetDict.__contains__s���l�l�"�7�7�c�Z�Z�&7�7rr�)r�r�r�r�r�r�r�rjr�r�r�r��propertyr�r�r�r�r�r�r�r�s@@rr�r��sY�����
�E��G�(�
��"� �����
"�!�8�8rr�zpasslib:_data/wordsets/z.txtc�\aa�]tRtRtoRtRtRtRtR
V3Rllt]	R4t
RtR	tVt
V;t#)�PhraseGeneratoria�class which generates passphrases by randomly choosing
from a list of unique words.

:param wordset:
    wordset to draw from.
:param preset:
    name of preset wordlist to use instead of ``wordset``.
:param spaces:
    whether to insert spaces between words in output (defaults to ``True``).
:param \*\*kwds:
    all other keywords passed to the :class:`SequenceGenerator` parent class.

.. autoattribute:: wordset
�eff_longN� c�X<�VeVe\R4hM'VfVPpV'gQh\V,pWn\V\4'g\V4p\
VRR7W nVf
VPp\VRR7pW0n\SV`,!R/VBR#)Nz,`words` and `wordset` are mutually exclusiver�r�r?r_)r&�wordset�default_wordsetsrK�_sequence_typesr�r[r�r?r
rirj)rkr�r�r?rmros&&&&,�rrj�PhraseGenerator.__init__*s�������"�� N�O�O�#����,�,����w�$�W�-�E����%��1�1��%�L�E��u�G�,��
��;��(�(�C���E�*����	��� �4� rc�,�\VP4#r )r%r�rrs&rr`�PhraseGenerator.symbol_countGr�rc�xa�V3Rl\SP44pSPPV4#)c3�n<"�TF*pSPPSP4x�K,	R#5ir )r�choicer�)r!r�rks& �rr#�+PhraseGenerator.__next__.<locals>.<genexpr>Ls'����I�6H����������,�,�6H�s�25)r}rer?rR)rkr�sf rrx�PhraseGenerator.__next__Ks)���I�e�D�K�K�6H�I���x�x�}�}�U�#�#r)r?r�r�r�)r�r�r�r�r�r�r�r?rjrr`rxr�r�r�r�s@@rr�r�sB����
� �G�
�E��C�!�:����$�$rr�c�0�\RRVRV/VBpV!V4#)aRGenerate one or more random password / passphrases.

This function uses :mod:`random.SystemRandom` to generate
one or more passwords; it can be configured to generate
alphanumeric passwords, or full english phrases.
The complexity of the password can be specified
by size, or by the desired amount of entropy.

Usage Example::

    >>> # generate random phrase with 48 bits of entropy
    >>> from passlib import pwd
    >>> pwd.genphrase()
    'gangly robbing salt shove'

    >>> # generate a random phrase with 52 bits of entropy
    >>> # using a particular wordset
    >>> pwd.genword(entropy=52, wordset="bip39")
    'wheat dilemma reward rescue diary'

:param entropy:
    Strength of resulting password, measured in 'guessing entropy' bits.
    An appropriate **length** value will be calculated
    based on the requested entropy amount, and the size of the word set.

    This can be a positive integer, or one of the following preset
    strings: ``"weak"`` (24), ``"fair"`` (36),
    ``"strong"`` (48), and ``"secure"`` (56).

    If neither this or **length** is specified, **entropy** will default
    to ``"strong"`` (48).

:param length:
    Length of resulting password, measured in words.
    If omitted, the size is auto-calculated based on the **entropy** parameter.

    If both **entropy** and **length** are specified,
    the stronger value will be used.

:param returns:
    Controls what this function returns:

    * If ``None`` (the default), this function will generate a single password.
    * If an integer, this function will return a list containing that many passwords.
    * If the ``iter`` builtin, will return an iterator that yields passwords.

:param words:

    Optionally specifies a list/set of words to use when randomly generating a passphrase.
    This option cannot be combined with **wordset**.

:param wordset:

    The predefined word set to draw from (if not specified by **words**).
    There are currently four presets available:

    ``"eff_long"`` (the default)

        Wordset containing 7776 english words of ~7 letters.
        Constructed by the EFF, it offers ~12.9 bits of entropy per word.

        This wordset (and the other ``"eff_"`` wordsets)
        were `created by the EFF <https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases>`_
        to aid in generating passwords.  See their announcement page
        for more details about the design & properties of these wordsets.

    ``"eff_short"``

        Wordset containing 1296 english words of ~4.5 letters.
        Constructed by the EFF, it offers ~10.3 bits of entropy per word.

    ``"eff_prefixed"``

        Wordset containing 1296 english words of ~8 letters,
        selected so that they each have a unique 3-character prefix.
        Constructed by the EFF, it offers ~10.3 bits of entropy per word.

    ``"bip39"``

        Wordset of 2048 english words of ~5 letters,
        selected so that they each have a unique 4-character prefix.
        Published as part of Bitcoin's `BIP 39 <https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt>`_,
        this wordset has exactly 11 bits of entropy per word.

        This list offers words that are typically shorter than ``"eff_long"``
        (at the cost of slightly less entropy); and much shorter than
        ``"eff_prefixed"`` (at the cost of a longer unique prefix).

:param sep:
    Optional separator to use when joining words.
    Defaults to ``" "`` (a space), but can be an empty string, a hyphen, etc.

:returns:
    :class:`!str` containing randomly generated passphrase;
    or list of 1+ passphrases if :samp:`returns={int}` is specified.
rlrer_)r�r�s&&&, r�	genphraser�Ps&��B�
A�'�
A�&�
A�D�
A�C��w�<�rc�V�V^8�dQh/^\9d\\,;R&#)�rJ)�__conditional_annotations__rMr)rgs"r�__annotate__r�s��
�
�f,�+�c�(�m�+�gr)r�r�r�r�r )r*r�)r��	eff_short�eff_prefixed�bip39)2r�r2rNr5�collectionsr�collections.abcrr�	importlibr�mathrr�passlibr	�passlib._loggingr
�
passlib.utilsrrr
�passlib.utils.decorr�__all__�dictrbrr.r4�listr�r�rM�	frozensetrLrJr[r]r�r�r�r�r�r��namer�r�r�r�)r�s@r�<module>r�s���
�
��	�#�4����#�5�5�1����
�	�	�
�
���%�!L�XA�2��-���9�
�
�'*�e��+�&Q�Rv�v�t�
W�
M�
A��	��6=�%�6=�rG�T �F98�.�98�|�=��
?�D����d�&=�d�V�4�$H�I�
?�<$�'�<$�~br

Youez - 2016 - github.com/yon3zu
LinuXploit