Загрузить файлы в «venv/Lib/site-packages/dns/rdtypes/ANY»
This commit is contained in:
24
venv/Lib/site-packages/dns/rdtypes/ANY/DLV.py
Normal file
24
venv/Lib/site-packages/dns/rdtypes/ANY/DLV.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
||||
|
||||
# Copyright (C) 2009-2011 Nominum, Inc.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose with or without fee is hereby granted,
|
||||
# provided that the above copyright notice and this permission notice
|
||||
# appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import dns.immutable
|
||||
import dns.rdtypes.dsbase
|
||||
|
||||
|
||||
@dns.immutable.immutable
|
||||
class DLV(dns.rdtypes.dsbase.DSBase):
|
||||
"""DLV record"""
|
||||
27
venv/Lib/site-packages/dns/rdtypes/ANY/DNAME.py
Normal file
27
venv/Lib/site-packages/dns/rdtypes/ANY/DNAME.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
||||
|
||||
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose with or without fee is hereby granted,
|
||||
# provided that the above copyright notice and this permission notice
|
||||
# appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import dns.immutable
|
||||
import dns.rdtypes.nsbase
|
||||
|
||||
|
||||
@dns.immutable.immutable
|
||||
class DNAME(dns.rdtypes.nsbase.UncompressedNS):
|
||||
"""DNAME record"""
|
||||
|
||||
def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
|
||||
self.target.to_wire(file, None, origin, canonicalize)
|
||||
33
venv/Lib/site-packages/dns/rdtypes/ANY/DNSKEY.py
Normal file
33
venv/Lib/site-packages/dns/rdtypes/ANY/DNSKEY.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
||||
|
||||
# Copyright (C) 2004-2007, 2009-2011 Nominum, Inc.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose with or without fee is hereby granted,
|
||||
# provided that the above copyright notice and this permission notice
|
||||
# appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import dns.immutable
|
||||
import dns.rdtypes.dnskeybase # lgtm[py/import-and-import-from]
|
||||
|
||||
# pylint: disable=unused-import
|
||||
from dns.rdtypes.dnskeybase import ( # noqa: F401 lgtm[py/unused-import]
|
||||
REVOKE,
|
||||
SEP,
|
||||
ZONE,
|
||||
)
|
||||
|
||||
# pylint: enable=unused-import
|
||||
|
||||
|
||||
@dns.immutable.immutable
|
||||
class DNSKEY(dns.rdtypes.dnskeybase.DNSKEYBase):
|
||||
"""DNSKEY record"""
|
||||
24
venv/Lib/site-packages/dns/rdtypes/ANY/DS.py
Normal file
24
venv/Lib/site-packages/dns/rdtypes/ANY/DS.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
||||
|
||||
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose with or without fee is hereby granted,
|
||||
# provided that the above copyright notice and this permission notice
|
||||
# appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import dns.immutable
|
||||
import dns.rdtypes.dsbase
|
||||
|
||||
|
||||
@dns.immutable.immutable
|
||||
class DS(dns.rdtypes.dsbase.DSBase):
|
||||
"""DS record"""
|
||||
72
venv/Lib/site-packages/dns/rdtypes/ANY/DSYNC.py
Normal file
72
venv/Lib/site-packages/dns/rdtypes/ANY/DSYNC.py
Normal file
@@ -0,0 +1,72 @@
|
||||
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
||||
|
||||
import struct
|
||||
|
||||
import dns.enum
|
||||
import dns.exception
|
||||
import dns.immutable
|
||||
import dns.rdata
|
||||
import dns.rdatatype
|
||||
import dns.rdtypes.util
|
||||
|
||||
|
||||
class UnknownScheme(dns.exception.DNSException):
|
||||
"""Unknown DSYNC scheme"""
|
||||
|
||||
|
||||
class Scheme(dns.enum.IntEnum):
|
||||
"""DSYNC SCHEME"""
|
||||
|
||||
NOTIFY = 1
|
||||
|
||||
@classmethod
|
||||
def _maximum(cls):
|
||||
return 255
|
||||
|
||||
@classmethod
|
||||
def _unknown_exception_class(cls):
|
||||
return UnknownScheme
|
||||
|
||||
|
||||
@dns.immutable.immutable
|
||||
class DSYNC(dns.rdata.Rdata):
|
||||
"""DSYNC record"""
|
||||
|
||||
# see: draft-ietf-dnsop-generalized-notify
|
||||
|
||||
__slots__ = ["rrtype", "scheme", "port", "target"]
|
||||
|
||||
def __init__(self, rdclass, rdtype, rrtype, scheme, port, target):
|
||||
super().__init__(rdclass, rdtype)
|
||||
self.rrtype = self._as_rdatatype(rrtype)
|
||||
self.scheme = Scheme.make(scheme)
|
||||
self.port = self._as_uint16(port)
|
||||
self.target = self._as_name(target)
|
||||
|
||||
def to_text(self, origin=None, relativize=True, **kw):
|
||||
target = self.target.choose_relativity(origin, relativize)
|
||||
return (
|
||||
f"{dns.rdatatype.to_text(self.rrtype)} {Scheme.to_text(self.scheme)} "
|
||||
f"{self.port} {target}"
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_text(
|
||||
cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
|
||||
):
|
||||
rrtype = dns.rdatatype.from_text(tok.get_string())
|
||||
scheme = Scheme.make(tok.get_string())
|
||||
port = tok.get_uint16()
|
||||
target = tok.get_name(origin, relativize, relativize_to)
|
||||
return cls(rdclass, rdtype, rrtype, scheme, port, target)
|
||||
|
||||
def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
|
||||
three_ints = struct.pack("!HBH", self.rrtype, self.scheme, self.port)
|
||||
file.write(three_ints)
|
||||
self.target.to_wire(file, None, origin, False)
|
||||
|
||||
@classmethod
|
||||
def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
|
||||
(rrtype, scheme, port) = parser.get_struct("!HBH")
|
||||
target = parser.get_name(origin)
|
||||
return cls(rdclass, rdtype, rrtype, scheme, port, target)
|
||||
Reference in New Issue
Block a user