__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.217.152: ~ $
3

�b�W'�@s`dZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
Gdd�dejj�Z
dS)zDNS Dynamic Update Support�N�)�string_typescsxeZdZejjddejjf�fdd�	Zddd�Z	dd�Z
dd	�Zd
d�Zdd
�Z
dd�Zddd�Zd�fdd�	Z�ZS)�UpdateNcs�tt|�j�|jtjjtjj�O_t|t	�r>tj
j|�}||_t|t	�rZtj
j|�}||_|j|j|j|tjjddd�|dk	r�|j|||d�dS)a�Initialize a new DNS Update object.

        @param zone: The zone which is being updated.
        @type zone: A dns.name.Name or string
        @param rdclass: The class of the zone; defaults to dns.rdataclass.IN.
        @type rdclass: An int designating the class, or a string whose value
        is the name of a class.
        @param keyring: The TSIG keyring to use; defaults to None.
        @type keyring: dict
        @param keyname: The name of the TSIG key to use; defaults to None.
        The key must be defined in the keyring.  If a keyring is specified
        but a keyname is not, then the key used will be the first key in the
        keyring.  Note that the order of keys in a dictionary is not defined,
        so applications should supply a keyname when a keyring is used, unless
        they know the keyring contains only one key.
        @type keyname: dns.name.Name or string
        @param keyalgorithm: The TSIG algorithm to use; defaults to
        dns.tsig.default_algorithm.  Constants for TSIG algorithms are defined
        in dns.tsig, and the currently implemented algorithms are
        HMAC_MD5, HMAC_SHA1, HMAC_SHA224, HMAC_SHA256, HMAC_SHA384, and
        HMAC_SHA512.
        @type keyalgorithm: string
        T)ZcreateZforce_uniqueN)�	algorithm)�superr�__init__�flags�dnsZopcodeZto_flagsZUPDATE�
isinstancer�name�	from_text�origin�
rdataclass�zone_rdclass�
find_rrsetZquestion�	rdatatypeZSOAZuse_tsig)�selfZzoneZrdclassZkeyringZkeynameZkeyalgorithm)�	__class__��/usr/lib/python3.6/update.pyrs


zUpdate.__init__c	CsB|dkr|j}|j�}|j|||j|j||dd�}|j||�dS)z&Add a single RR to the update section.NT)�	authority�coversrr�rdtype�add)rr�ttl�rdZdeleting�sectionrZrrsetrrr�_add_rrEszUpdate._add_rrc
Gs:t|t�rtjj|d�}t|dtjj�rnx@|D]8}|rF|j||j�x |D]}|j	||j
||d�qLWq0Wn�t|�}t|j
d��}t|dtjj�r�|r�|j||dj�x�|D]}|j	||||d�q�Wnh|j
d�}t|t�r�tjj|�}|r�|j||�x6|D].}	tjj|j||	|j�}|j	||||d��qWdS)a�Add records.  The first argument is the replace mode.  If
        false, RRs are added to an existing RRset; if true, the RRset
        is replaced with the specified contents.  The second
        argument is the section to add to.  The third argument
        is always a name.  The other arguments can be:

                - rdataset...

                - ttl, rdata...

                - ttl, rdtype, string...Nr)r)r
rr	rr�rdataset�Rdataset�deleterrr�list�int�pop�rdata�Rdatarrr
)
r�replacerr�args�rdsrrr�srrr�_addOs0






zUpdate._addcGs|jd|j|f|��dS)z�Add records.  The first argument is always a name.  The other
        arguments can be:

                - rdataset...

                - ttl, rdata...

                - ttl, rdtype, string...FN)r*r)rrr'rrrrws	z
Update.addc	Gsft|t�rtjj|d�}t|�dkrR|j|j|tjj	tj
j	tj
jtj
j	dd��nt|dtjj
�r�x�|D]&}x |D]}|j|d|tjj�qtWqjWn�t|�}t|dtjj�r�x�|D]}|j|d|tjj�q�Wn�|jd�}t|t�r�tj
j|�}t|�dk�r(|j|j||j|tj
jtjj	dd�n:x8|D]0}tjj|j|||j�}|j|d|tjj��q.WdS)z�Delete records.  The first argument is always a name.  The other
        arguments can be:

                - I{nothing}

                - rdataset...

                - rdata...

                - rdtype, [string...]NrT)r
rr	rr�lenrrr�ANYr�NONErrrr!r$r%r#rr
)rrr'r(rrr)rrrr �s6








z
Update.deletecGs|jd|j|f|��dS)aQReplace records.  The first argument is always a name.  The other
        arguments can be:

                - rdataset...

                - ttl, rdata...

                - ttl, rdtype, string...

        Note that if you want to replace the entire node, you should do
        a delete of the name followed by one or more calls to add.TN)r*r)rrr'rrrr&�s
zUpdate.replacec	Gs�t|t�rtjj|d�}t|�dkrL|j|j|tjj	tj
j	tj
jddd�n�t|dtjj
�s|t|dtjj�s|t|�dkr�t|dtjj
�s�t|�}|jdd�|jd|j|f|��n@|d}t|t�r�tj
j|�}|j|j|tjj	|tj
jddd�dS)aBRequire that an owner name (and optionally an rdata type,
        or specific rdataset) exists as a prerequisite to the
        execution of the update.  The first argument is always a name.
        The other arguments can be:

                - rdataset...

                - rdata...

                - rdtype, string...NrTrF)r
rr	rrr+r�answerrr,rr-rrr$r%r!�insertr*)rrr'rrrr�present�s*




zUpdate.presentc	Cs�t|t�rtjj|d�}|dkrH|j|j|tjjtj	j
tj	jddd�n8t|t�r^tj	j|�}|j|j|tjj|tj	jddd�dS)z�Require that an owner name (and optionally an rdata type) does
        not exist as a prerequisite to the execution of the update.NT)r
rr	rrrr.rr-rr,)rrrrrr�absent�s




z
Update.absent�cs |dkr|j}tt|�j||�S)zcReturn a string containing the update in DNS compressed wire
        format.
        @rtype: stringN)r
rr�to_wire)rr
Zmax_size)rrrr3�szUpdate.to_wire)NN)N)Nr2)�__name__�
__module__�__qualname__r	r�INZtsigZdefault_algorithmrrr*rr r&r0r1r3�
__classcell__rr)rrrs%

(+$
r)�__doc__Zdns.messager	Zdns.nameZ
dns.opcodeZ	dns.rdataZdns.rdataclassZdns.rdatasetZdns.tsigZ_compatr�messageZMessagerrrrr�<module>s

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 585 B 0644
__init__.cpython-36.pyc File 585 B 0644
_compat.cpython-36.opt-1.pyc File 1.27 KB 0644
_compat.cpython-36.pyc File 1.27 KB 0644
dnssec.cpython-36.opt-1.pyc File 10.59 KB 0644
dnssec.cpython-36.pyc File 10.66 KB 0644
e164.cpython-36.opt-1.pyc File 2.6 KB 0644
e164.cpython-36.pyc File 2.6 KB 0644
edns.cpython-36.opt-1.pyc File 4.3 KB 0644
edns.cpython-36.pyc File 4.3 KB 0644
entropy.cpython-36.opt-1.pyc File 3.21 KB 0644
entropy.cpython-36.pyc File 3.21 KB 0644
exception.cpython-36.opt-1.pyc File 3.61 KB 0644
exception.cpython-36.pyc File 3.82 KB 0644
flags.cpython-36.opt-1.pyc File 2.12 KB 0644
flags.cpython-36.pyc File 2.12 KB 0644
grange.cpython-36.opt-1.pyc File 904 B 0644
grange.cpython-36.pyc File 962 B 0644
hash.cpython-36.opt-1.pyc File 475 B 0644
hash.cpython-36.pyc File 475 B 0644
inet.cpython-36.opt-1.pyc File 2.26 KB 0644
inet.cpython-36.pyc File 2.26 KB 0644
ipv4.cpython-36.opt-1.pyc File 1.33 KB 0644
ipv4.cpython-36.pyc File 1.33 KB 0644
ipv6.cpython-36.opt-1.pyc File 2.92 KB 0644
ipv6.cpython-36.pyc File 2.92 KB 0644
message.cpython-36.opt-1.pyc File 31.86 KB 0644
message.cpython-36.pyc File 31.86 KB 0644
name.cpython-36.opt-1.pyc File 26.49 KB 0644
name.cpython-36.pyc File 26.49 KB 0644
namedict.cpython-36.opt-1.pyc File 2.79 KB 0644
namedict.cpython-36.pyc File 2.79 KB 0644
node.cpython-36.opt-1.pyc File 5.4 KB 0644
node.cpython-36.pyc File 5.4 KB 0644
opcode.cpython-36.opt-1.pyc File 2 KB 0644
opcode.cpython-36.pyc File 2 KB 0644
query.cpython-36.opt-1.pyc File 13.43 KB 0644
query.cpython-36.pyc File 13.43 KB 0644
rcode.cpython-36.opt-1.pyc File 2.43 KB 0644
rcode.cpython-36.pyc File 2.43 KB 0644
rdata.cpython-36.opt-1.pyc File 14.02 KB 0644
rdata.cpython-36.pyc File 14.02 KB 0644
rdataclass.cpython-36.opt-1.pyc File 2.45 KB 0644
rdataclass.cpython-36.pyc File 2.45 KB 0644
rdataset.cpython-36.opt-1.pyc File 9.29 KB 0644
rdataset.cpython-36.pyc File 9.33 KB 0644
rdatatype.cpython-36.opt-1.pyc File 4.4 KB 0644
rdatatype.cpython-36.pyc File 4.4 KB 0644
renderer.cpython-36.opt-1.pyc File 9.51 KB 0644
renderer.cpython-36.pyc File 9.6 KB 0644
resolver.cpython-36.opt-1.pyc File 34.94 KB 0644
resolver.cpython-36.pyc File 34.94 KB 0644
reversename.cpython-36.opt-1.pyc File 2.53 KB 0644
reversename.cpython-36.pyc File 2.53 KB 0644
rrset.cpython-36.opt-1.pyc File 5.12 KB 0644
rrset.cpython-36.pyc File 5.12 KB 0644
set.cpython-36.opt-1.pyc File 7.72 KB 0644
set.cpython-36.pyc File 7.72 KB 0644
tokenizer.cpython-36.opt-1.pyc File 14.17 KB 0644
tokenizer.cpython-36.pyc File 14.17 KB 0644
tsig.cpython-36.opt-1.pyc File 6.06 KB 0644
tsig.cpython-36.pyc File 6.06 KB 0644
tsigkeyring.cpython-36.opt-1.pyc File 1.03 KB 0644
tsigkeyring.cpython-36.pyc File 1.03 KB 0644
ttl.cpython-36.opt-1.pyc File 1.29 KB 0644
ttl.cpython-36.pyc File 1.29 KB 0644
update.cpython-36.opt-1.pyc File 6.93 KB 0644
update.cpython-36.pyc File 6.93 KB 0644
version.cpython-36.opt-1.pyc File 450 B 0644
version.cpython-36.pyc File 450 B 0644
wiredata.cpython-36.opt-1.pyc File 2.27 KB 0644
wiredata.cpython-36.pyc File 2.27 KB 0644
zone.cpython-36.opt-1.pyc File 29.43 KB 0644
zone.cpython-36.pyc File 29.43 KB 0644