Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
3
bW' @ s` d Z ddlZddlZddlZddlZddlZddlZddlZddl m
Z
G dd dejjZ
dS )zDNS Dynamic Update Support N )string_typesc sx e Zd Zejjddejjf fdd ZdddZ dd Z
dd Zd
d Zdd
Z
dd ZdddZd fdd Z ZS )UpdateNc s t t| j | jtjjtjjO _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)ZcreateZforce_uniqueN) algorithm)superr __init__flagsdnsZopcodeZto_flagsZUPDATE
isinstancer name from_textorigin
rdataclasszone_rdclass
find_rrsetZquestion rdatatypeZSOAZuse_tsig)selfZzoneZrdclassZkeyringZkeynameZkeyalgorithm) __class__ /usr/lib/python3.6/update.pyr s
zUpdate.__init__c C sB |dkr| j }|j }| j||| j|j||dd}|j|| dS )z&Add a single RR to the update section.NT) authoritycoversr r rdtypeadd)r r ttlrdZdeletingsectionr Zrrsetr r r _add_rrE s zUpdate._add_rrc
G s: t |trtjj|d}t |d tjjrnx@|D ]8}|rF| j||j x |D ]}| j ||j
||d qLW q0W nt|}t|j
d}t |d tjjr|r| j||d j x|D ]}| j ||||d qW nh|j
d}t |trtjj|}|r| j|| x6|D ].} tjj| j|| | j}| j ||||d qW dS )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
r r r r rdatasetRdatasetdeleter r r listintpoprdataRdatar r r
)
r replacer r argsrdsr r r sr r r _addO s0
zUpdate._addc G s | j d| j|f| dS )zAdd records. The first argument is always a name. The other
arguments can be:
- rdataset...
- ttl, rdata...
- ttl, rdtype, string...FN)r* r )r r r' r r r r w s z
Update.addc G sf t |trtjj|d}t|dkrR| j| j|tjj tj
j tj
jtj
j dd nt |d tjj
rx|D ]&}x |D ]}| j|d|tjj qtW qjW nt|}t |d tjjrx|D ]}| j|d|tjj qW n|jd}t |trtj
j|}t|dkr(| j| j|| j|tj
jtjj dd n:x8|D ]0}tjj| j||| j}| j|d|tjj q.W dS )zDelete records. The first argument is always a name. The other
arguments can be:
- I{nothing}
- rdataset...
- rdata...
- rdtype, [string...]Nr T)r
r r r r lenr r r ANYr NONEr r r r! r$ r% r# r r
)r r r' r( r r r) r r r r s6
z
Update.deletec G s | j d| j|f| dS )aQ Replace 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 )r r r' r r r r&