404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.146.176.1: ~ $
3

\�me�@sdddlZddlZddlZddlmZddlmZddlmZddl	m
Z
mZeje
�ZdZeddd	g�Zd:ej_ed
d�edd
�edd�edd�edd�edd�edd�edd�edd�edd�edd�ed d!�ed"d#�ed$d%�ed&d'�ed(d)�ed*d+�d,�Zeeed-�d.d/�Zeeed-�d0d1�Zeeeed2�d3d4�Zeeed-�d5d6�Zeed7�d8d9�ZdS);�N)�
namedtuple)�Optional)�subp)�is_container�
is_FreeBSDz/sys/class/dmi/id�KernelNames�linux�freebsdZboard_asset_tagzsmbios.planar.tagZboard_vendorzsmbios.planar.makerZ
board_namezsmbios.planar.productZboard_serialzsmbios.planar.serialZ
board_versionzsmbios.planar.versionZ	bios_datezsmbios.bios.reldateZbios_vendorzsmbios.bios.vendorZbios_versionzsmbios.bios.versionZchassis_asset_tagzsmbios.chassis.tagZchassis_vendorzsmbios.chassis.makerZchassis_serialzsmbios.chassis.serialZchassis_versionzsmbios.chassis.versionZ
sys_vendorzsmbios.system.makerZproduct_namezsmbios.system.productZproduct_serialzsmbios.system.serialZproduct_uuidzsmbios.system.uuidZproduct_versionzsmbios.system.version)zbaseboard-asset-tagzbaseboard-manufacturerzbaseboard-product-namezbaseboard-serial-numberzbaseboard-versionzbios-release-datezbios-vendorzbios-versionzchassis-asset-tagzchassis-manufacturerzchassis-serial-numberzchassis-versionzsystem-manufacturerzsystem-product-namezsystem-serial-numberzsystem-uuidzsystem-version)�key�returncCs�tj|�}|dks|jdkr dSdjt|j�}tjd|�tjj	|�sVtjd|�dSy"t
|d��}|j�}WdQRXWn tk
r�tjd|�dSX|dt
|�dd	kr�d
}y|jd�j�Stk
�r�}ztjd|||�WYdd}~XnXdS)
z/
    Reads dmi data from /sys/class/dmi/id
    Nz{0}/{1}zquerying dmi data %szdid not find %s�rbzCould not read %s����
��utf8z-utf-8 decode of content (%s) in %s failed: %s)�DMIDECODE_TO_KERNEL�getr�format�DMI_SYS_PATH�LOG�debug�os�path�exists�open�read�PermissionError�len�decode�strip�UnicodeDecodeError�error)r
�kmapZdmi_key_path�fpZkey_data�e�r&�/usr/lib/python3.6/dmi.py�_read_dmi_syspath?s2
r(cCs�tj|�}|dks|jdkr dStjd|j�y6dd|jg}tj|�\}}|j�}tjd||j�|Stjk
r�}ztjd||�WYdd}~XnXdS)z/
    Reads dmi data from FreeBSD's kenv(1)
    Nzquerying dmi data %sZkenvz-qzkenv returned '%s' for '%s'zfailed kenv cmd: %s
%s)rrr	rrrr �ProcessExecutionError)r
r#�cmd�result�_errr%r&r&r'�
_read_kenves
 r-)r
�dmidecode_pathrcCs|yF|d|g}tj|�\}}|j�}tjd||�|jdd�dkrDdS|Stjk
rv}ztjd||�dSd}~XnXdS)z
    Calls out to dmidecode to get the data out. This is mostly for supporting
    OS's without /sys/class/dmi/id support.
    z--stringz dmidecode returned '%s' for '%s'�.�zfailed dmidecode cmd: %s
%sN)rr rr�replacer))r
r.r*r+r,r%r&r&r'�_call_dmidecode{s
r2cCs�t�r
dSt�rt|�St|�}|dk	r,|Sdd�}tj�d}||�pN|d
ks`tjd|�dStj	d�}|rxt
||�Stjd	t�dS)a�
    Wrapper for reading DMI data.

    If running in a container return None.  This is because DMI data is
    assumed to be not useful in a container as it does not represent the
    container but rather the host.

    This will do the following (returning the first that produces a
    result):
        1) Use a mapping to translate `key` from dmidecode naming to
           sysfs naming and look in /sys/class/dmi/... for a value.
        2) Use `key` as a sysfs key directly and look in /sys/class/dmi/...
        3) Fall-back to passing `key` to `dmidecode --string`.

    If all of the above fail to find a value, None will be returned.
    NcSs$|dkp"|ddko"|dd�dkS)NZx86_64r�i�Z86r&)Zarchr&r&r'�is_x86�szread_dmi_data.<locals>.is_x86��aarch64�amd64zdmidata is not supported on %sZ	dmidecodez0did not find either path %s or dmidecode command)r7r8)rrr-r(r�unamerrrZwhichr2r)r
Z
syspath_valuer5Z
uname_archr.r&r&r'�
read_dmi_data�s"

r:)�srcrcCs|d|kr|Stj�}xbtjd|�D]R}||kr@tjd|||�q"t|�}|sPd}tjd|||�|jd|�d�|�}q"W|S)zBReplace __dmi.VARNAME__ with DMI values from either sysfs or kenv.�__z__dmi\.([^_]+)__z7Ignoring invalid __dmi.%s__ in %s. Expected one of: %s.r0z'Replacing __dmi.%s__ in '%s' with '%s'.z__dmi.)	r�keys�re�findallrZwarningr:rr1)r;Zvalid_dmi_keys�matchZ	dmi_valuer&r&r'�sub_dmi_vars�s*rA)NN)Zloggingrr>�collectionsrZtypingrZ	cloudinitrZcloudinit.utilrrZ	getLogger�__name__rrr�__new__�__defaults__r�strr(r-r2r:rAr&r&r&r'�<module>sR
&-

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