403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/platform.cpython-310.pyc
o

;j�!�@s*dZddlZddlZddlZddlZddlZddlZddlZddlZdd�Z	d,dd�Z
e	dd	��Ze	d
d��Ze	dd
��Z
e	dd��Ze	dd��Ze	dd��Ze	dd��Ze	dd��Ze	dd��Ze	dd��Ze	dd��Ze	dd��Ze	d d!��Ze	d"d#��Ze	d$d%��Ze	d&d'��Zd(d)�Zd*d+�ZdS)-z7
Functions for identifying which platform a machine is
�Ncs(i�t��t������fdd��}|S)zPCache the result of a zero-or-more-argument function (stdlib-only, loader-safe).csB|tt|����f}��|��}|�ur�|i|��}|�|<|S)N)�tuple�sorted�items�get)�args�kwargs�key�result��	_sentinel�cache�func��G/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/platform.py�_wrapper#szreal_memoize.<locals>._wrapper)�object�	functools�wraps)r
rrr
r�real_memoizes
rTcCs�|rt��}nt��}d}}t�tj��tjdd�}Wd�n1s&wYt�tj��t��}Wd�n1s@wY|||fS)zg
    Simple function to return information about the OS distribution (id_name, version, codename).
    �T)ZbestN)	�distro�name�id�
contextlib�suppress�
subprocess�CalledProcessError�versionZcodename)Zfull_distribution_nameZdistro_nameZdistro_versionZdistro_codenamerrr�linux_distribution/s
�
�
rcC�tj�d�S)z?
    Simple function to return if a host is Windows or not
    �win��sys�platform�
startswithrrrr�
is_windows@�r%cCsPddl}d}zd|jvstdd�tjD��rd}W|SW|Sty'Y|Sw)z�
    Return True if this minion is a proxy minion.
    Leverages the fact that is_linux() and is_windows
    both return False for proxies.
    TODO: Need to extend this for proxies that might run on
    other Unices
    rNF�proxycss�|]
}|�d�r|VqdS)z	--proxyidN)r$)�.0�argrrr�	<genexpr>]s�
�
�zis_proxy.<locals>.<genexpr>T)�__main__�__file__�anyr"�argv�AttributeError)�main�retrrr�is_proxyHs	����r2cCr)z|
    Simple function to return if a host is Linux or not.
    Note for a proxy minion, we need to return something else
    �linuxr!rrrr�is_linuxfsr4cCr)zF
    Simple function to return if a host is Darwin (macOS) or not
    �darwinr!rrrr�	is_darwinor&r6cCr)z;
    Simple function to return if host is SunOS or not
    Zsunosr!rrrr�is_sunoswr&r7cCst�sdSt��d�d�S)zG
    Simple function to return if host is SmartOS (Illumos) or not
    F�Zjoyent_)r7�os�unamer$rrrr�
is_smartossr;cCspt�sdSztjdgtjtjd�}|��d���t�}|�	�}Wn
t
y+YdSw|r0dS|dkr6dSdS)zL
    Function to return if host is SmartOS (Illumos) global zone or not
    F�zonename��stdout�stderrr�globalT�r;r�Popen�PIPE�STDOUT�communicate�strip�decode�__salt_system_encoding__�poll�OSError�Z
zonename_procZzonename_outputZzonename_retcoderrr�is_smartos_globalzone��&���rLcCspt�sdSztjdgtjtjd�}|��d���t�}|�	�}Wn
t
y+YdSw|r0dS|dkr6dSdS)zH
    Function to return if host is SmartOS (Illumos) and not the gz
    Fr<r=rr@TrArKrrr�is_smartos_zone�rMrNcCstj�d�o
t��j�d�S)z;
    Simple function to return if host is Junos or not
    �freebsdZJNPR)r"r#r$r9r:�releaserrrr�is_junos�srQcCr)z=
    Simple function to return if host is FreeBSD or not
    rOr!rrrr�
is_freebsd�r&rRcCr)z<
    Simple function to return if host is NetBSD or not
    Znetbsdr!rrrr�	is_netbsd�r&rScCr)z=
    Simple function to return if host is OpenBSD or not
    Zopenbsdr!rrrr�
is_openbsd�r&rTcCr)z9
    Simple function to return if host is AIX or not
    �aixr!rrrr�is_aix�r&rVcC�dd�t�D�\}}}|dkS)z<
    Simple function to return if host is Fedora or not
    cs� �|]}|�d��d�VqdS��"�'N�rF�r(�xrrrr*���
�zis_fedora.<locals>.<genexpr>ZFedora�r�ZosnameZ	osreleaseZ
oscodenamerrr�	is_fedora���rbcCrW)z?
    Simple function to return if host is Photon OS or not
    csrXrYr\r]rrrr*�r_zis_photonos.<locals>.<genexpr>zVMware Photon OSr`rarrr�is_photonos�rcrdcCs"t�r
t���d�St���d�S)z=
    Simple function to return if host is AArch64 or not
    �arm64�aarch64)r6r#�machiner$rrrr�
is_aarch64srhcCstjdd�dvS)a$
    Returns True if the multiprocessing start method requires pickling to transfer
    process state to the child.  This is the case for both "spawn" and "forkserver".

    "spawn" is the default on Windows (Python >= 3.4) and macOS (Python >= 3.8).
    Salt forces macOS to spawning by default on all Python versions.

    "forkserver" became the Linux default in Python 3.14 (via PEP 741).  Like
    "spawn", it transfers the Process object to the child via pickle rather than
    inheriting it through a plain fork of the parent process.  Salt must therefore
    treat it identically: capture *args/**kwargs in __new__ so that __getstate__
    can reconstruct the object on the other side, and skip parent-inherited
    logging teardown since the child starts with a clean file-descriptor table.
    F)Z
allow_none)ZspawnZ
forkserver)�multiprocessingZget_start_methodrrrr�spawning_platformsrjcCsbddg}dd�|D�}|siSt|dtd��}d|����iWd�S1s*wYdS)	zG
    Provide the machine-id for machine/virtualization combination
    z/etc/machine-idz/var/lib/dbus/machine-idcSsg|]
}tj�|�r|�qSr)r9�path�exists)r(�locrrr�
<listcomp>&sz*get_machine_identifier.<locals>.<listcomp>r)�encodingZ
machine_idN)�openrH�readrF)Z	locationsZexisting_locationsZ	machineidrrr�get_machine_identifiers�$�rr)T)�__doc__rrrir9r#rr"rrrr%r2r4r6r7r;rLrNrQrRrSrTrVrbrdrhrjrrrrrr�<module>sZ





















Youez - 2016 - github.com/yon3zu
LinuXploit