⚝
One Hat Cyber Team
⚝
Your IP:
3.145.157.63
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.9
/
site-packages
/
dns
/
__pycache__
/
View File Name :
namedict.cpython-39.pyc
a �����M�e�����������������������@���s,���d�Z�ddlmZ�ddlZG�dd��de�ZdS�)zDNS name dictionary�����)�MutableMappingNc�����������������������sh���e�Zd�ZdZg�d�Z��fdd�Zdd��Zdd��Zd d ��Zdd��Z d d��Z dd��Zdd��Zdd��Z ���ZS�)�NameDictz�A dictionary whose keys are dns.name.Name objects. In addition to being like a regular Python dictionary, this dictionary can also get the deepest match for a given key. )� max_depth�max_depth_itemsZ__storec��������������������s6���t�������t��|�_d|�_d|�_|��t|i�|����d�S�)Nr���)�super�__init__�dict�_NameDict__storer���r����update)�self�args�kwargs�� __class__���0/usr/lib/python3.9/site-packages/dns/namedict.pyr���-���s ���� zNameDict.__init__c�����������������C���s>���t�|�|�jkr|�jd�|�_nt�|�|�jkr:t�|�|�_d|�_d�S�)N����)�lenr���r����r����keyr���r���r���Z__update_max_depth6���s ���� zNameDict.__update_max_depthc�����������������C���s ���|�j�|�S��N�r ���r���r���r���r����__getitem__=���s����zNameDict.__getitem__c�����������������C���s.���t�|tjj�std��||�j|<�|��|��d�S�)NzNameDict key must be a name)� isinstance�dns�name�Name� ValueErrorr ����_NameDict__update_max_depth)r���r����valuer���r���r����__setitem__@���s���� zNameDict.__setitem__c�����������������C���sP���|�j��|��t|�|�jkr&|�jd�|�_|�jdkrLd|�_|�j�D�]}|��|��q<d�S�)Nr���r���)r ����popr���r���r���r���)r���r����kr���r���r����__delitem__F���s���� zNameDict.__delitem__c�����������������C���s ���t�|�j�S�r���)�iterr ����r���r���r���r����__iter__O���s����zNameDict.__iter__c�����������������C���s ���t�|�j�S�r���)r���r ���r%���r���r���r����__len__R���s����zNameDict.__len__c�����������������C���s ���||�j�v�S�r���r���r���r���r���r����has_keyU���s����zNameDict.has_keyc�����������������C���sn���t�|�}||�jkr|�j}t|�d�D�]0}tj�||d���}||�v�r$||�|�f��S�q$|�tjj�}tjj|fS�)a���Find the deepest match to *name* in the dictionary. The deepest match is the longest name in the dictionary which is a superdomain of *name*. Note that *superdomain* includes matching *name* itself. *name*, a ``dns.name.Name``, the name to find. Returns a ``(key, value)`` where *key* is the deepest ``dns.name.Name``, and *value* is the value associated with *key*. r���N)r���r����ranger���r���r����empty)r���r����depth�i�n�vr���r���r����get_deepest_matchX���s���� zNameDict.get_deepest_match)�__name__� __module__�__qualname__�__doc__� __slots__r���r���r���r ���r#���r&���r'���r(���r/���� __classcell__r���r���r���r���r���$���s��� r���)r3����collections.abcr���Zdns.namer���r���r���r���r���r����<module>���s���