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 :  /usr/lib/python3/dist-packages/softwareproperties/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /usr/lib/python3/dist-packages/softwareproperties/__pycache__/ppa.cpython-310.pyc
o

U�7eS#�@s�ddlmZddlmZddlmZmZmZddlm	Z	m
Z
mZddlm
Z
ddlmZddlmZdZd	Zee�jee�jd
dgZdd
gZGdd�de	�ZdS)�)�gettext)�	Launchpad)�NotFound�
BadRequest�Unauthorized)�ShortcutHandler�ShortcutException�InvalidShortcutException)�SourcesListShortcutHandler)�URIShortcutHandler)�urlparsez5https://ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/z=https://private-ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/zppa.launchpad.netzprivate-ppa.launchpad.net�main�
main/debugcs�eZdZd�fdd�	Zedd��Zedd��Zedd	��Zed
d��Zedd
��Z	edd��Z
d �fdd�	Z�fdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Z�ZS)!�PPAShortcutHandlerFc	s,tt|�j|fi|��||_d|_d|_d|_d|_d|_t	|�
|�|�|�|�|�f�s9t
d�|}t|��d|j|jf|_|��|jr\z|jWn
ty[tt
d���w|js�|j}|sodg}|jjrotd�|jjrutnt}|j|j|jd�}d|j||jd	�|�f}|� |�dSdS)
NFz%ERROR: '%s' is not a valid ppa formatz%s-ubuntu-%szERROR: Can't find ppar
zDPPA publishes dbgsym, you may need to include 'main/debug' component)�team�ppaz%s %s %s %s� )!�superr�__init__�_lp_anon�_signing_key_data�_lp�_lpteam�_lpppa�_is_sourceslist�any�
_match_ppa�
_match_uri�_match_sourceslist�_r	�teamname�ppaname�	_filebase�	_set_auth�lpppar�
_source_entry�
components�publish_debug_symbols�print�private�PRIVATE_PPA_URI_FORMAT�PPA_URI_FORMAT�format�binary_type�dist�join�_set_source_entry)	�self�shortcut�login�kwargs�msg�comps�
uri_format�uri�line��	__class__��8/usr/lib/python3/dist-packages/softwareproperties/ppa.pyr2s@
�
��zPPAShortcutHandler.__init__cCs>|js|jr
tj}ntj}|d|j|jjfddd�|_|jS)Nz%s.%s�
production�devel)�service_root�version)rrr�login_anonymously�
login_with�
__module__r;�__name__)r1�
login_funcr<r<r=�lp[s�zPPAShortcutHandler.lpcCsl|js3z|j�|j�|_W|jSty!td�|j}t|��ty2td�|j}t|��w|jS)Nz8ERROR: user/team '%s' not found (use --login if private)z"ERROR: invalid user/team name '%s')rrG�peopler rrrr�r1r5r<r<r=�lpteamgs��zPPAShortcutHandler.lpteamcCst|js7z
|jj|jd�|_W|jSty%td�|j|jf}t|��ty6td�|j}t|��w|jS)N)�namez5ERROR: ppa '%s/%s' not found (use --login if private)zERROR: invalid ppa name '%s')	rrJ�getPPAByNamer!rrr rrrIr<r<r=r$ts�
��zPPAShortcutHandler.lpppacC�|jjS�N)r$�description�r1r<r<r=rO��zPPAShortcutHandler.descriptioncCrMrN)r$�web_linkrPr<r<r=rR�rQzPPAShortcutHandler.web_linkcCs~|js<|j��}|jj}|sttd��n$d|vr ttd��n||�|�vr9td�|d�|�|��f}t|��||_|jS)NzHWarning: could not get PPA signing_key_fingerprint from LP, using anyway�redactedzAPrivate PPA fingerprint redacted, using key anyway (LP: #1879781)z6Fingerprints do not match, not importing: '%s' != '%s'�,)	rr$�getSigningKeyData�signing_key_fingerprintr(r�fingerprintsr/r)r1�key�fingerprintr5r<r<r=�trustedparts_content�s
�z'PPAShortcutHandler.trustedparts_contentNcsDtt|�j|d�}||jks|jr|Stt|j�tdg��|_|S)N)�pkgtyper)rr�SourceEntry�source_typer&�list�setr6)r1r[�entryr:r<r=r\�s
zPPAShortcutHandler.SourceEntrycsHtt|��|�t|��j�tt�}|r"ttd�d�	|��dSdS)Nz*Warning: components '%s' not valid for PPAr)
rrr0r_r\r6�PPA_VALID_COMPSr(rr/)r1r9�
invalid_compsr:r<r=r0�s
�z$PPAShortcutHandler._set_source_entrycCs�|�d�\}}}|��dksdS|�d�\}}}|�d�}d|vr7|�d�\}}}|��dkr1dSd|vr7dS||_|p=d|_dS)N�:rF�/�~�ubuntuT)�
rpartition�lower�	partition�lstripr r!)r1r2�prefixrrr r!rfr<r<r=r�s

zPPAShortcutHandler._match_ppacCs&z|�t|��WStyYdSw)NF)�_match_handlerrr	)r1r2r<r<r=r�s
�zPPAShortcutHandler._match_uricCs2z	|�t|��}Wn
tyYdSwd|_|S)NFT)rlr
r	r)r1r2�handlerr<r<r=r�s�z%PPAShortcutHandler._match_sourceslistcCszt|��j�}|jtvrdS|j���d��d�}t|�dkr!dS|d|_	|d|_
|j|_|j
|_|�|��j�dS)NFrd�r�T)rr\r8�hostname�PPA_VALID_HOSTNAMES�path�strip�split�lenr r!�username�	_username�password�	_passwordr0r9)r1rm�parsedrrr<r<r=rl�s


z!PPAShortcutHandler._match_handlercCs�|js|jjs	dS|jr|jrdS|jj��D] }t|�}|j	�
d|j�d|j�d��r7|j
|_|j|_dSqtd�|j|jf}t|��)Nrdz/ubuntuzMCould not find PPA subscription for ppa:%s/%s, you may need to request access)rr$r)rwryrG�me�getArchiveSubscriptionURLsrrr�
startswithr r!rvrxrr)r1�urlrzr5r<r<r=r#�s�
�zPPAShortcutHandler._set_auth)FrN)rErD�__qualname__r�propertyrGrJr$rOrRrZr\r0rrrrlr#�
__classcell__r<r<r:r=r1s*)





rN)rr�launchpadlib.launchpadr�lazr.restfulclient.errorsrrr�"softwareproperties.shortcuthandlerrrr	�softwareproperties.sourceslistr
�softwareproperties.urir�urllib.parserr+r*rprqrarr<r<r<r=�<module>s �

Anon7 - 2022
AnonSec Team