__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

�w�gXt���SrS/rSSKrSSKrSSKJr SSKrSSKJr SSKJ
r
JrJrJr SSKJr SS	KJr SS
KJrJrJrJrJrJrJrJrJr SSKJ r  SSK!J"r"J#r# S
r$"SS\
5r%"SS\
5r&"SS\
5r'"SS\'5r("SS\'5r)"SS\'5r*"SS\5r+"SS\5r,g!\	a SSKJ
r
 \
RrN�f=f)zRoot Launchpad API class.�	Launchpad�N)�urlsplit)�proxy_info_from_environment)�	ProxyInfo)�CollectionWithKeyBasedLookup�
HostedFile�ScalarValue�ServiceRoot)�SystemWideConsumer)�RestfulHttp)	�AccessToken�AnonymousAccessToken� AuthorizeRequestTokenWithBrowser�AuthorizeRequestTokenWithURL�Consumer�Credentials�MemoryCredentialStore�KeyringCredentialStore�UnencryptedFileCredentialStore)�uris)�STAGING_SERVICE_ROOT�EDGE_SERVICE_ROOTzhttps://api.launchpad.netc�"�\rSrSrSrSrSrSrg)�	PersonSet�Bz7A custom subclass capable of person lookup by username.c�z�[URRR55S-[U5-$)z7Transform a username into the URL to a person resource.�~��str�_root�	_root_uri�ensureSlash��self�keys  �8/usr/lib/python3/dist-packages/launchpadlib/launchpad.py�_get_url_from_id�PersonSet._get_url_from_idEs.���4�:�:�'�'�3�3�5�6��<�s�3�x�G�G��team�N��__name__�
__module__�__qualname__�__firstlineno__�__doc__r'�
collection_of�__static_attributes__r+r)r&rrBs��A�H��Mr)rc�"�\rSrSrSrSrSrSrg)�BugSet�Oz2A custom subclass capable of bug lookup by bug ID.c�z�[URRR55S-[U5-$)z2Transform a bug ID into the URL to a bug resource.zbugs/rr#s  r&r'�BugSet._get_url_from_idRs.���4�:�:�'�'�3�3�5�6��@�3�s�8�K�Kr)�bugr+Nr,r+r)r&r5r5Os��<�L��Mr)r5c�"�\rSrSrSrSrSrSrg)�	PillarSet�YzrA custom subclass capable of lookup by pillar name.

Projects, project groups, and distributions are all pillars.
c�t�[URRR55[U5-$)z<Transform a project name into the URL to a project resource.rr#s  r&r'�PillarSet._get_url_from_id_s)���4�:�:�'�'�3�3�5�6��S��A�Ar)Nr+r,r+r)r&r;r;Ys���
B��Mr)r;c��\rSrSrSrSrSrg)�
ProjectSet�hz;A custom subclass for accessing the collection of projects.�projectr+N�r-r.r/r0r1r2r3r+r)r&r@r@hs
��E��Mr)r@c��\rSrSrSrSrSrg)�ProjectGroupSet�n�AA custom subclass for accessing the collection of project groups.�
project_groupr+NrCr+r)r&rErEns
��K�#�Mr)rEc��\rSrSrSrSrSrg)�DistributionSet�trG�distributionr+NrCr+r)r&rJrJts
��K�"�Mr)rJc�D^�\rSrSrSrU4SjrSrU4SjrSrSr	U=r
$)�LaunchpadOAuthAwareHttp�zzBDetects expired/invalid OAuth tokens and tries to get a new token.c�8>�XlX l[TU]"U6 g�N)�	launchpad�authorization_engine�super�__init__)r$rRrS�args�	__class__s    �r&rU� LaunchpadOAuthAwareHttp.__init__}s���"��$8�!�
���$�r)c��URS:H=(aA URS5=(d) URS5=(d URS5$)z=Helper method to detect an error caused by a bad OAuth token.i�s
Expired tokens
Invalid tokensUnknown access token)�status�
startswith)r$�response�contents   r&�_bad_oauth_token�(LaunchpadOAuthAwareHttp._bad_oauth_token�sO�����#�%�
����/�0�
;��!�!�"2�3�
;��!�!�"9�:�	
r)c�H>�[TU]"U6up#UR"X#/UQ76$rQ)rT�_request�retry_on_bad_token)r$rVr\r]rWs    �r&ra� LaunchpadOAuthAwareHttp._request�s+���!�G�,�d�3����&�&�x�@�4�@�@r)c��URX5(aqURbdSURRlURURRURR
5 UR"U6$X4$)zhIf the response indicates a bad token, get a new token and retry.

Otherwise, just return the response.
N)r^rSrR�credentials�access_token�credential_storera)r$r\r]rVs    r&rb�*LaunchpadOAuthAwareHttp.retry_on_bad_token�sv��
�!�!�(�4�4��)�)�5�7;�D�N�N�&�&�3��%�%����*�*�D�N�N�,K�,K�
��=�=�$�'�'�� � r))rSrR)r-r.r/r0r1rUr^rarbr3�
__classcell__�rWs@r&rNrNzs ���L� �

�A�!�!r)rNc�^�\rSrSrSrSr\\\\	\
S.r\R\
R5 \RSS\\4U4SjjrSr\S5r\S	5r\S
5r\\RSS\SSSSS\4
Sj5r\\RSS\S/SSS\4
Sj5r\S
5r\\RSS\\4Sj5r\S\RSS\SSSS\SSS4
Sj5r\S5r\SSj5r\SSj5rSrU=r $)r�z�Root Launchpad API class.

:ivar credentials: The credentials instance used to access Launchpad.
:type credentials: `Credentials`
z1.0)�bugs�
distributions�people�project_groups�projectsNc	��>�[R"U5nURU5(dURUS-5(aSU-n	[U	5eX0lX l[T
U]XXVXx5 g)aRoot access to the Launchpad API.

:param credentials: The credentials used to access Launchpad.
:type credentials: `Credentials`
:param authorization_engine: The object used to get end-user input
    for authorizing OAuth request tokens. Used when an OAuth
    access token expires or becomes invalid during a
    session, or is discovered to be invalid once launchpadlib
    starts up.
:type authorization_engine: `RequestTokenAuthorizationEngine`
:param service_root: The URL to the root of the web service.
:type service_root: string
�/z�It looks like you're using a service root that incorporates the name of the web service version ("%s"). Please use one of the constants from launchpadlib.uris instead, or at least remove the version name from the root URI.N)r�lookup_service_root�endswith�
ValueErrorrgrSrTrU)r$rerSrg�service_root�cache�timeout�
proxy_info�version�errorrWs          �r&rU�Launchpad.__init__�s����0�/�/��=��� � ��)�)�\�-B�-B��c�M�.
�.
�6�9@�	@�
��U�#�#� 0��
%9�!�
����u�z�	
r)c�6�[UURUUUU5$rQ)rNrS)r$rerxryrzs     r&�httpFactory�Launchpad.httpFactory�s'��&���%�%�����

�	
r)c�Z�1Sk[[RR55-$)N>�SUDO_GID�SUDO_UID�	SUDO_USER)�set�os�environ�keys)�clss r&�_is_sudo�Launchpad._is_sudo�s��4�s�2�:�:�?�?�;L�7M�M�Mr)c�L�UR5(a[U6$[U6$rQ)r�rr)r�rVs  r&�authorization_engine_factory�&Launchpad.authorization_engine_factory�s%���<�<�>�>�
0��6�6�/��6�6r)c�V�UR5(a[U5$[USS9$)NT)�fallback)r�rr)r��credential_save_faileds  r&�credential_store_factory�"Launchpad.credential_store_factory�s)���<�<�>�>�
)�)?�@�@�%�&<�t�L�Lr)c
��URS5 [X#5n[XS9nUcURXAU	5nUcUR	U5nU"UUUUUUUU
5$)a(Convenience method for setting up access credentials.

When all three pieces of credential information (the consumer
name, the access token and the access secret) are available, this
method can be used to quickly log into the service root.

This method is deprecated as of launchpadlib version
1.9.0. You should use Launchpad.login_anonymously() for
anonymous access, and Launchpad.login_with() for all other
purposes.

:param consumer_name: the application name.
:type consumer_name: string
:param token_string: the access token, as appropriate for the
    `AccessToken` constructor
:type token_string: string
:param access_secret: the access token's secret, as appropriate for
    the `AccessToken` constructor
:type access_secret: string
:param service_root: The URL to the root of the web service.
:type service_root: string
:param authorization_engine: See `Launchpad.__init__`. If you don't
    provide an authorization engine, a default engine will be
    constructed using your values for `service_root` and
    `credential_save_failed`.
:param allow_access_levels: This argument is ignored, and only
    present to preserve backwards compatibility.
:param max_failed_attempts: This argument is ignored, and only
    present to preserve backwards compatibility.
:return: The web service root
:rtype: `Launchpad`
�login)�
consumer_namerf)� _warn_of_deprecated_login_methodr
rr�r�)r�r��token_string�
access_secretrwrxryrzrS�allow_access_levels�max_failed_attemptsrgr�r{rfres                r&r��Launchpad.logins���b	�,�,�W�5�"�<�?��!�'�
�� �'�#&�#C�#C��-@�$� ��#�"�;�;�&� ���� �������	
�		
r)c�X�URS5 URUUUUUUUU	U
U5
$)a_Get credentials from Launchpad and log into the service root.

This method is deprecated as of launchpadlib version
1.9.0. You should use Launchpad.login_anonymously() for
anonymous access and Launchpad.login_with() for all other
purposes.

:param consumer_name: Either a consumer name, as appropriate for
    the `Consumer` constructor, or a premade Consumer object.
:type consumer_name: string
:param service_root: The URL to the root of the web service.
:type service_root: string
:param authorization_engine: See `Launchpad.__init__`. If you don't
    provide an authorization engine, a default engine will be
    constructed using your values for `service_root` and
    `credential_save_failed`.
:param allow_access_levels: This argument is ignored, and only
    present to preserve backwards compatibility.
:return: The web service root
:rtype: `Launchpad`
�get_token_and_login)r��_authorize_token_and_login)r�r�rwrxryrzrSr�r�rgr�r{s            r&r��Launchpad.get_token_and_loginNsE��H	�,�,�-B�C��-�-������ ���"��
�	
r)c
��[U[5(aUnO[U5n[S5nX�lUcURX!SU5nUcUR
U	5nOURSU	URS5 URUR5n
U
c	U"X�5nOU
nURURlU"UUUUUUUU
5$)aAuthorize a request token. Log in with the resulting access token.

This is the private, non-deprecated implementation of the
deprecated method get_token_and_login(). Once
get_token_and_login() is removed, this code can be streamlined
and moved into its other call site, login_with().
Nr�rg)�
isinstancerrr�consumerr�r��"_assert_login_argument_consistencyr��load�unique_consumer_id�application_name)r�r�rwrxryrzrSr�rgr�r{r�re�cached_credentialss              r&r��$Launchpad._authorize_token_and_login�s��*�m�X�.�.�$�H�
*�-�8�H�"�$�'��'���'�#&�#C�#C��T�3F�$� ��#�"�;�;�&� ��
�2�2�(�&� �7�7�"�	
�.�2�2� �3�3�
���%�/�{�M�K�-�K�$�5�5�
� � �1��� �������	
�		
r)c�n�URX#5unnnn[5n	[XS9n
U"U
SSUUUUUS9$)z:Get access to Launchpad without providing any credentials.)rfN)rwrxryrzr{)�
_get_pathsrr)r�r�rw�launchpadlib_dirryrzr{�
cache_path�service_root_dir�tokenres           r&�login_anonymously�Launchpad.login_anonymously�sX�� 
�N�N�<�:�	
�����$�&��!�-�D������%���!��	
�		
r)c�~�URX#5unnnnUcUcUc[S5eU	c[RR	S5n	U	bU
b[S5eU
c!U	b[X�5n
O2UR
U5n
O URSUU
RS5 U
n
UcURUUUU5nOaURSUUR5 URSUURR5 URSUUR5 URURUUUUUUU
UU
5
$)	a�Log in to Launchpad, possibly acquiring and storing credentials.

Use this method to get a `Launchpad` object. If the end-user
has no cached Launchpad credential, their browser will open
and they'll be asked to log in and authorize a desktop
integration. The authorized Launchpad credential will be
stored securely: in the GNOME keyring, the KDE Wallet, or in
an encrypted file on disk.

The next time your program (or any other program run by that
user on the same computer) invokes this method, the end-user
will be prompted to unlock their keyring (or equivalent), and
the credential will be retrieved from local storage and
reused.

You can customize this behavior in three ways:

1. Pass in a filename to `credentials_file`. The end-user's
   credential will be written to that file, and on subsequent
   runs read from that file. Alternatively the filename can be
   given in the LP_CREDENTIALS_FILE environment variable.

2. Subclass `CredentialStore` and pass in an instance of the
   subclass as `credential_store`. This lets you change how
   the end-user's credential is stored and retrieved locally.

3. Subclass `RequestTokenAuthorizationEngine` and pass in an
   instance of the subclass as `authorization_engine`. This
   lets you change change what happens when the end-user needs
   to authorize the Launchpad credential.

:param application_name: The application name. This is *not*
    the OAuth consumer name. Unless a consumer_name is also
    provided, the OAuth consumer will be a system-wide
    consumer representing the end-user's computer as a whole.
:type application_name: string

:param service_root: The URL to the root of the web service.
:type service_root: string.  Can either be the full URL to a service
    or one of the short service names.

:param launchpadlib_dir: The directory used to store cached
   data obtained from Launchpad. The cache is shared by all
   consumers, and each Launchpad service root has its own
   cache.
:type launchpadlib_dir: string

:param authorization_engine: A strategy for getting the
    end-user to authorize an OAuth request token, for
    exchanging the request token for an access token, and for
    storing the access token locally so that it can be
    reused. By default, launchpadlib will open the end-user's
    web browser to have them authorize the request token.
:type authorization_engine: `RequestTokenAuthorizationEngine`

:param allow_access_levels: The acceptable access levels for
    this application.

    This argument is used to construct the default
    `authorization_engine`, so if you pass in your own
    `authorization_engine` any value for this argument will be
    ignored. This argument will also be ignored unless you
    also specify `consumer_name`.

:type allow_access_levels: list of strings

:param max_failed_attempts: Ignored; only present for
    backwards compatibility.

:param credentials_file: The path to a file in which to store
    this user's OAuth access token.

:param version: The version of the Launchpad web service to use.

:param consumer_name: The consumer name, as appropriate for
    the `Consumer` constructor. You probably don't want to
    provide this, since providing it will prevent you from
    taking advantage of desktop-wide integration.
:type consumer_name: string

:param credential_save_failed: a callback that is called upon
   a failure to save the credentials locally. This argument is
   used to construct the default `credential_store`, so if
   you pass in your own `credential_store` any value for
   this argument will be ignored.
:type credential_save_failed: A callable

:param credential_store: A strategy for storing an OAuth
    access token locally. By default, tokens are stored in the
    GNOME keyring (or equivalent). If `credentials_file` is
    provided, then tokens are stored unencrypted in that file.
:type credential_store: `CredentialStore`

:return: A web service root authorized as the end-user.
:rtype: `Launchpad`

zZAt least one of application_name, consumer_name, or authorization_engine must be provided.�LP_CREDENTIALS_FILEzFAt most one of credentials_file and credential_store must be provided.r�rgr�r�r�)r�rvr�r��getrr�r�r�r�r�r�r%r�r�)r�r�rwr�ryrzrSr�r��credentials_filer{r�r�rgr�r�s                r&�
login_with�Launchpad.login_with�s���n
�N�N�<�:�	
�����
�$��%�$�,��9��
�
�#�!�z�z�~�~�.C�D���'�,<�,H��$��
�
�#��+�$B�$�$� �$'�#?�#?�*�$� �
�2�2�(�&� �7�7�"�	
� 0���'�#&�#C�#C�� ��#�	$� �
�2�2�"� �$�5�5�
�
�2�2���$�-�-�1�1�
�
�2�2�%�#�$�8�8�
��-�-� �)�)����� ���"��
�	
r)c�@�[R"SU-[5 g)Nz�The Launchpad.%s() method is deprecated. You should use Launchpad.login_anonymous() for anonymous access and Launchpad.login_with() for all other purposes.)�warnings�warn�DeprecationWarning)r��names  r&r��*Launchpad._warn_of_deprecated_login_method�s#���
�
�A��
�
�	
r)c	�B�SnUbX#:wa[UUUUUUU4-5egg)a�Helper to find conflicting values passed into the login methods.

Many of the arguments to login_with are used to build other
objects--the authorization engine or the credential store. If
these objects are provided directly, many of the arguments
become redundant. We'll allow redundant arguments through, but
if a argument *conflicts* with the corresponding value in the
provided object, we raise an error.
z�Inconsistent values given for %s: (%r passed in, versus %r in %s). You don't need to pass in %s if you pass in %s, so just omit that argument.N)rv)r��
argument_name�argument_value�object_value�object_name�inconsistent_value_messages      r&r��,Launchpad._assert_login_argument_consistency�sN��$
*�	#��%�.�*H��*�!�"� ��!��
��
�

�+I�%r)c���Uc [RRSS5n[RRU5nUSSS:Xa[	S5e[R
"US5 [R"US5 [R"U5n[U5upEpgn[RRX%5n	[RRU	S5n
[R
"U
S5 XX�4$![a)nUR[R:waeSnAN�SnAff=f![a)nUR[R:waeSnANhSnAff=f)aoLocate launchpadlib-related user paths and ensure they exist.

This is a helper function used by login_with() and
login_anonymously().

:param service_root: The service root the user wants to
    connect to. This may be an alias (which will be
    dereferenced to a URL and returned) or a URL (which will
    be returned as is).
:param launchpadlib_dir: The user's base launchpadlib
    directory, if known. This may be modified, expanded, or
    determined from the environment if missing. A definitive
    value will be returned.

:return: A 4-tuple:
    (service_root_uri, launchpadlib_dir, cache_dir, service_root_dir)
Nrz
.launchpadlib�zSMust set $HOME or pass 'launchpadlib_dir' to indicate location to store cached datai�rx)
r��path�join�
expanduserrv�makedirs�OSError�errno�EEXIST�chmodrrtr)r�rwr��err�scheme�	host_namer��query�fragmentr�r�s           r&r��Launchpad._get_paths�s8��&�#�!�w�w�|�|�C��A���7�7�-�-�.>�?���B�Q��3�&��9��
�	��K�K�(�%�0�	���!�5�)��/�/��=��3;�L�3I�0��4���7�7�<�<�(8�D���W�W�\�\�"2�G�<�
�	��K�K�
�E�*��
�M�M���	��y�y�E�L�L�(��)��	���	��y�y�E�L�L�(��)��	�s0�D�+D<�
D9�D4�4D9�<
E/�E*�*E/)rSrg)zauthorization enginerQ)!r-r.r/r0r1�DEFAULT_VERSIONr5rJrrEr@�RESOURCE_TYPE_CLASSES�updater
rrrrUr�classmethodr�r�r�r�r�r�r�r�r�r�r�r3rirjs@r&rr�s������O��(��)����� � ��!B�!B�C��.�.���.��.
�`
��N��N��7��7��M��M���.�.���.�!� � ��#��F
��F
�P��.�.���.�!�� ��#��/
��/
�b�Q
��Q
�f��.�.���.��
��
�:���.�.���.�!� � ����#��M
��M
�^�	
��	
��+�!��!�F�+N��+Nr))-r1�__all__r�r��urllib.parserr��httplib2r�ImportErrorr�from_environment�lazr.restfulclient.resourcerrr	r
�"lazr.restfulclient.authorize.oauthr�lazr.restfulclient._browserr�launchpadlib.credentialsr
rrrrrrrr�launchpadlibr�launchpadlib.urisrr�OAUTH_REALMrr5r;r@rErJrNrr+r)r&�<module>r�s���" ����
�	�!��=�4���B�3�
�
�
���
*��
�,�
��
)���,�����$�i�$�#�i�#�$!�k�$!�N}	N��}	N��G�=�"�"+�"<�"<��=�s�B6�6C�C

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 393 B 0644
apps.cpython-313.pyc File 1.55 KB 0644
credentials.cpython-313.pyc File 32.89 KB 0644
errors.cpython-313.pyc File 276 B 0644
launchpad.cpython-313.pyc File 23.67 KB 0644
uris.cpython-313.pyc File 3.5 KB 0644
Filemanager