HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/examples/__pycache__/example_zones.cpython-310.pyc
o

�h@	�@sXdZddlZddlZddlZej�dej�d��ddlZdd�Ze	dkr*e�dSdS)�Cloudflare API code - example�Nz..cs<ztjd}|dd�}Wn
tyddi}Ynwt��}z	|jj|d�}Wn3tjjyC}ztd||f�WYd}~nd}~wt	yZ}ztd|�WYd}~nd}~wwt
|d	d
�d�D]�}|d}|d
}|d}d|dvr~|dd}n
d|ddd}|dd}	td|||||	f�z	|jj�|�}
Wntjjy�}ztj
�d||f�WYd}~qcd}~wwt�d|d��t
|
�fdd
�d�}
|
D]<}|d}|d}
d|vr�|d}nd}d|vr�|d}nd}|d}|dk�rd}n|d
}td||||
||f�q�td�qctd�dS)r�)�name�per_pager�2)�paramsz/zones %d %s - api call failedNz!/zones.get - %s - api call failedcSs|dS)Nr���vrr�I/usr/local/CyberCP/lib/python3.10/site-packages/examples/example_zones.py�<lambda> szmain.<locals>.<lambda>)�keyr�id�type�email�owner�"�planz%s %-35s %-30s %-20s %sz+/zones/dns_records %d %s - api call failed
z\.*�$cs��d|d�d|dS)N�r�_r)�subr	��progrrr3s�contentr�priority�ttl�	secondaryz	%s %60s %6d %-5s %4s %sr)�sys�argv�
IndexError�
CloudFlare�zones�get�
exceptions�CloudFlareAPIError�exit�	Exception�sorted�print�dns_records�stderr�write�re�compile)�	zone_namer�cfr"�e�zone�zone_id�	zone_type�
zone_owner�	zone_planr*�
dns_record�r_name�r_type�r_value�
r_priority�r_ttl�r_idrrr�mainsd
������



r>�__main__)
�__doc__�osrr-�path�insert�abspathr!r>�__name__rrrr�<module>s@
�