CasperSecurity

Current Path : /lib/python3/dist-packages/landscape/lib/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/landscape/lib/__pycache__/cloud.cpython-310.pyc

o

���c��@s6ddlmZdZdefZdZd
dd�Zd
dd	�ZdS)�)�fetch_asyncz169.254.169.254zhttp://%s/latest�@NcsRg�td���}|���fdd��|���fdd���fdd�}|�|�|S)z�Fetch EC2 information about the cloud instance.

    The fetch parameter provided above is for non-mocked testing purposes.
    �instance-idc�td���S)N�
instance-type��_fetch_ec2_item��ignore��
cloud_data�fetch��5/usr/lib/python3/dist-packages/landscape/lib/cloud.py�<lambda>�z%fetch_ec2_meta_data.<locals>.<lambda>cr)N�ami-idrr	rrrrrcs*dd�}�\}}}||�||�||�d�S)z1Record the instance data returned by the EC2 API.cSs,|durt|t�r|�d�}|dt�SdS)Nzutf-8)�
isinstance�bytes�decode�
MAX_LENGTH)�valuerrr�_process_results


�zCfetch_ec2_meta_data.<locals>.return_result.<locals>._process_result)rrrr)r
r�instance_id�
instance_type�ami_id)rrr�
return_results
�z*fetch_ec2_meta_data.<locals>.return_result)r�addCallback)r
�deferredrrrr�fetch_ec2_meta_datas��
rcCs,td|}|durt}||dd��|j�S)z�
     Get data at C{path} on the EC2 API endpoint, and add the result to the
    C{accumulate} list. The C{fetch} parameter is provided for testing only.
    z/meta-data/NF)�follow)�EC2_APIrr�append)�path�
accumulater
�urlrrrr(sr)N)�landscape.lib.fetchr�EC2_HOSTr!rrrrrrr�<module>s

 
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY