404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.138.123.215: ~ $
3

\�me8�+@sdZddlZddlZddlmZddlmZmZy ddlm	Z	m
Z
mZmZdZ
Wnek
rhdZ
YnXdd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*g#Zd+Zd,Zed-�d.d/�Zd@d0d1�ZdAd2d3�ZdBd4d5�ZdCd6d7�ZdDd8d9�ZdEd:d;�Zd<d=�Zd>d?�ZdS)FzCloud-init apport interface�N)�read_cfg_paths)�INSTALLER_APPORT_FILES� INSTALLER_APPORT_SENSITIVE_FILES)�attach_file�attach_file_if_exists�attach_root_command_outputs�root_command_outputTFZAliYunZAltCloudZAkamaizAmazon - Ec2ZAzureZBigstepZ	BrightboxZ
CloudSigmaZ
CloudStackZDigitalOceanZE24CloudzGCE - Google Compute EnginezHuawei CloudZExoscalez
Hetzner CloudZNWCSz IBM - (aka SoftLayer or BlueMix)ZLXDZMAASZNoCloudZ
OpenNebulaZ	OpenStackZOracleZOVFz'RbxCloud - (HyperOne, Rootbox, Rubikon)ZOpenTelekomCloudzSAP Converged CloudZScalewayZSmartOSZUpCloudZVMwareZVultrZZStackZOutscaleZOtherz/var/log/cloud-init.logz/var/log/cloud-init-output.log)�returncCst�}|jd�S)NZuserdata_raw)rZ
get_ipath_cur)�paths�r�/usr/lib/python3.6/apport.py�_get_user_data_fileHsr
cCs0t|ddd��tddddg�t|dd�d	S)
zBAttach cloud-init logs and tarfile from 'cloud-init collect-logs'.z-egrep -i "warn|error" /var/log/cloud-init.logz"cat /var/log/cloud-init-output.log)zcloud-init-log-warningszcloud-init-output.log.txtz
cloud-initzcollect-logsz-tz/tmp/cloud-init-logs.tgzzlogs.tgzN)rrr)�report�uirrr�attach_cloud_init_logsMs
rcCs$d}|r |j|�r t|ddi�dS)z*Optionally attach hardware info from lshw.z�Your device details (lshw) may be useful to developers when addressing this bug, but gathering it requires admin privileges. Would you like to include this info?zlshw.txtZlshwN)�yesnor)rr�promptrrr�
attach_hwinfo^srcCs�|r�t�}y(t|jd���}tj|�}dSQRXWnttjjtfk
rPYnXd}|j	|�}|dkrlt
�|r�d}|j|t�}|r�t|d|d<nd|d<dS)a�Prompt for cloud details if instance-data unavailable.

    When we have valid _get_instance_data, apport/generic-hooks/cloud_init.py
    provides CloudName, CloudID, CloudPlatform and CloudSubPlatform.

    Apport/generic-hooks are delivered by cloud-init's downstream branches
    ubuntu/(devel|kinetic|jammy|focal|bionic) so they will not be represented
    in upstream main.

    In absence of viable instance-data.json format, prompt for the cloud below.
    �
instance_dataNz/Is this machine running in a cloud environment?zOPlease select the cloud vendor or environment in which this instance is runningrZ	CloudName�None)
r�openZget_runpath�json�load�IOError�decoderZJSONDecodeError�AssertionErrorr�
StopIterationZchoice�KNOWN_CLOUD_NAMES)rrr
�filerr�responserrr�attach_cloud_infois$


r cCs.x(tD] }tjj|j�}t|||j�qWdS)a Attach any subiquity installer logs config.

    To support decoupling apport integration from installer config/logs,
    we eventually want to either source this function or APPORT_FILES
    attribute from subiquity  and/or ubuntu-desktop-installer package-hooks
    python modules.
    N)r�os�path�realpathr�label)rr�apport_filer#rrr�attach_installer_files�s
r&cCsZtjjd�}t||�tjj|�rV|jdd�|drF|dd7<|dd7<dS)z<Attach ubuntu pro logs and tag if keys present in user-data.z/var/log/ubuntu-advantage.log�Tags�� z
ubuntu-proN)r!r"r#r�exists�
setdefault)rrr#rrr�attach_ubuntu_pro_info�s
r,cCst|rpt�}dj|�}|j|�}|dkr*t�|rptjj|�}t||d�x(tD] }tjj|j�}t	|||j
�qLWdS)z(Optionally provide user-data if desired.z�Your user-data, cloud-config or autoinstall files can optionally  be provided from {0} and could be useful to developers when addressing this bug. Do you wish to attach user-data to this bug?Nz
user_data.txt)r
�formatrrr!r"r#rrrr$)rrZuser_data_filerrr#r%rrr�attach_user_data�s

r.cCs�g}|jd�r|jd�|jd�r,|jd�d|j�krR|d}d|krR|jd�|jd�rf|jd	�|r�|jd
d�|d
r�|d
d7<|d
dj|�7<d
S)z$Add any appropriate tags to the bug.ZCurtinErrorZcurtinZSubiquityLogZ	subiquityZ
JournalErrorszBreaking ordering cyclezsystemd-orderingZUdiLogzubuntu-desktop-installerr'r(r)N)�get�append�keysr+�join)rZnew_tags�errorsrrr�add_bug_tags�s 






r4cCsTtstd��t||�t||�t||�t||�t||�t||�t|�dS)a-This is an entry point to run cloud-init's apport functionality.

    Distros which want apport support will have a cloud-init package-hook at
    /usr/share/apport/package-hooks/cloud-init.py which defines an add_info
    function and returns the result of cloudinit.apport.add_info(report, ui).
    z;No apport imports discovered. Apport functionality disabledT)	�
has_apport�RuntimeErrorrrr r.r&r,r4)rrrrr�add_info�s





r7)N)N)N)N)N)N)�__doc__rr!Zcloudinit.cmd.develrZcloudinit.cmd.devel.logsrrZapport.hookutilsrrrrr5�ImportErrorrZ
CLOUDINIT_LOGZCLOUDINIT_OUTPUT_LOG�strr
rrr r&r,r.r4r7rrrr�<module>sn



(




Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 113 B 0644
__init__.cpython-36.pyc File 113 B 0644
apport.cpython-36.opt-1.pyc File 5.92 KB 0644
apport.cpython-36.pyc File 5.96 KB 0644
atomic_helper.cpython-36.opt-1.pyc File 2.05 KB 0644
atomic_helper.cpython-36.pyc File 2.05 KB 0644
cloud.cpython-36.opt-1.pyc File 3.08 KB 0644
cloud.cpython-36.pyc File 3.08 KB 0644
dmi.cpython-36.opt-1.pyc File 5.32 KB 0644
dmi.cpython-36.pyc File 5.32 KB 0644
event.cpython-36.opt-1.pyc File 1.97 KB 0644
event.cpython-36.pyc File 1.97 KB 0644
features.cpython-36.opt-1.pyc File 1.47 KB 0644
features.cpython-36.pyc File 1.47 KB 0644
gpg.cpython-36.opt-1.pyc File 3.76 KB 0644
gpg.cpython-36.pyc File 3.76 KB 0644
helpers.cpython-36.opt-1.pyc File 13.31 KB 0644
helpers.cpython-36.pyc File 13.31 KB 0644
importer.cpython-36.opt-1.pyc File 1.68 KB 0644
importer.cpython-36.pyc File 1.68 KB 0644
log.cpython-36.opt-1.pyc File 4.61 KB 0644
log.cpython-36.pyc File 4.61 KB 0644
netinfo.cpython-36.opt-1.pyc File 12.67 KB 0644
netinfo.cpython-36.pyc File 12.67 KB 0644
persistence.cpython-36.opt-1.pyc File 2.82 KB 0644
persistence.cpython-36.pyc File 2.82 KB 0644
registry.cpython-36.opt-1.pyc File 1.38 KB 0644
registry.cpython-36.pyc File 1.38 KB 0644
safeyaml.cpython-36.opt-1.pyc File 8 KB 0644
safeyaml.cpython-36.pyc File 8 KB 0644
settings.cpython-36.opt-1.pyc File 1.14 KB 0644
settings.cpython-36.pyc File 1.14 KB 0644
signal_handler.cpython-36.opt-1.pyc File 1.58 KB 0644
signal_handler.cpython-36.pyc File 1.58 KB 0644
simpletable.cpython-36.opt-1.pyc File 2.53 KB 0644
simpletable.cpython-36.pyc File 2.53 KB 0644
ssh_util.cpython-36.opt-1.pyc File 15.36 KB 0644
ssh_util.cpython-36.pyc File 15.36 KB 0644
stages.cpython-36.opt-1.pyc File 25.15 KB 0644
stages.cpython-36.pyc File 25.15 KB 0644
subp.cpython-36.opt-1.pyc File 9.97 KB 0644
subp.cpython-36.pyc File 9.97 KB 0644
temp_utils.cpython-36.opt-1.pyc File 2.81 KB 0644
temp_utils.cpython-36.pyc File 2.81 KB 0644
templater.cpython-36.opt-1.pyc File 4.55 KB 0644
templater.cpython-36.pyc File 4.55 KB 0644
type_utils.cpython-36.opt-1.pyc File 437 B 0644
type_utils.cpython-36.pyc File 437 B 0644
url_helper.cpython-36.opt-1.pyc File 21.03 KB 0644
url_helper.cpython-36.pyc File 21.03 KB 0644
user_data.cpython-36.opt-1.pyc File 8.25 KB 0644
user_data.cpython-36.pyc File 8.25 KB 0644
util.cpython-36.opt-1.pyc File 73.64 KB 0644
util.cpython-36.pyc File 73.64 KB 0644
version.cpython-36.opt-1.pyc File 429 B 0644
version.cpython-36.pyc File 429 B 0644
warnings.cpython-36.opt-1.pyc File 3.25 KB 0644
warnings.cpython-36.pyc File 3.25 KB 0644