Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +1 -0
- evalkit_tf437/lib/python3.10/site-packages/nvidia/curand/lib/libcurand.so.10 +3 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/GPOS.py +126 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/NINFO.py +26 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/NSEC.py +67 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/SOA.py +86 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/URI.py +79 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/AFSDB.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/AMTRELAY.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/AVC.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CDNSKEY.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CDS.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CERT.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CNAME.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CSYNC.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/DLV.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/DNAME.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/DNSKEY.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/DS.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/EUI48.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/EUI64.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/GPOS.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/HINFO.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/HIP.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/ISDN.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/L32.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/LOC.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/LP.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/MX.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/NID.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/NSEC.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/NSEC3.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/OPENPGPKEY.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/OPT.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/PTR.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/RESINFO.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/RP.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/RRSIG.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/RT.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/SPF.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/SSHFP.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/TKEY.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/TLSA.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/TSIG.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/TXT.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/URI.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/WALLET.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/__init__.cpython-310.pyc +0 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/IN/A.py +51 -0
- infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/IN/AAAA.py +51 -0
.gitattributes
CHANGED
@@ -1790,3 +1790,4 @@ infer_4_30_0/lib/python3.10/site-packages/sympy/solvers/__pycache__/solveset.cpy
|
|
1790 |
infer_4_30_0/lib/python3.10/site-packages/tiktoken/_tiktoken.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
1791 |
infer_4_30_0/lib/python3.10/site-packages/sympy/solvers/diophantine/__pycache__/diophantine.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
1792 |
infer_4_30_0/lib/python3.10/site-packages/sympy/tensor/__pycache__/tensor.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
1790 |
infer_4_30_0/lib/python3.10/site-packages/tiktoken/_tiktoken.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
1791 |
infer_4_30_0/lib/python3.10/site-packages/sympy/solvers/diophantine/__pycache__/diophantine.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
1792 |
infer_4_30_0/lib/python3.10/site-packages/sympy/tensor/__pycache__/tensor.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
1793 |
+
evalkit_tf437/lib/python3.10/site-packages/nvidia/curand/lib/libcurand.so.10 filter=lfs diff=lfs merge=lfs -text
|
evalkit_tf437/lib/python3.10/site-packages/nvidia/curand/lib/libcurand.so.10
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:41a8780d7760aa91cca7232d085f55183c7e6cfaecabc2f32e719260831035fc
|
3 |
+
size 96681392
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/GPOS.py
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
2 |
+
|
3 |
+
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
|
4 |
+
#
|
5 |
+
# Permission to use, copy, modify, and distribute this software and its
|
6 |
+
# documentation for any purpose with or without fee is hereby granted,
|
7 |
+
# provided that the above copyright notice and this permission notice
|
8 |
+
# appear in all copies.
|
9 |
+
#
|
10 |
+
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
11 |
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
12 |
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
13 |
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
14 |
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
15 |
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
16 |
+
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
17 |
+
|
18 |
+
import struct
|
19 |
+
|
20 |
+
import dns.exception
|
21 |
+
import dns.immutable
|
22 |
+
import dns.rdata
|
23 |
+
import dns.tokenizer
|
24 |
+
|
25 |
+
|
26 |
+
def _validate_float_string(what):
|
27 |
+
if len(what) == 0:
|
28 |
+
raise dns.exception.FormError
|
29 |
+
if what[0] == b"-"[0] or what[0] == b"+"[0]:
|
30 |
+
what = what[1:]
|
31 |
+
if what.isdigit():
|
32 |
+
return
|
33 |
+
try:
|
34 |
+
(left, right) = what.split(b".")
|
35 |
+
except ValueError:
|
36 |
+
raise dns.exception.FormError
|
37 |
+
if left == b"" and right == b"":
|
38 |
+
raise dns.exception.FormError
|
39 |
+
if not left == b"" and not left.decode().isdigit():
|
40 |
+
raise dns.exception.FormError
|
41 |
+
if not right == b"" and not right.decode().isdigit():
|
42 |
+
raise dns.exception.FormError
|
43 |
+
|
44 |
+
|
45 |
+
@dns.immutable.immutable
|
46 |
+
class GPOS(dns.rdata.Rdata):
|
47 |
+
"""GPOS record"""
|
48 |
+
|
49 |
+
# see: RFC 1712
|
50 |
+
|
51 |
+
__slots__ = ["latitude", "longitude", "altitude"]
|
52 |
+
|
53 |
+
def __init__(self, rdclass, rdtype, latitude, longitude, altitude):
|
54 |
+
super().__init__(rdclass, rdtype)
|
55 |
+
if isinstance(latitude, float) or isinstance(latitude, int):
|
56 |
+
latitude = str(latitude)
|
57 |
+
if isinstance(longitude, float) or isinstance(longitude, int):
|
58 |
+
longitude = str(longitude)
|
59 |
+
if isinstance(altitude, float) or isinstance(altitude, int):
|
60 |
+
altitude = str(altitude)
|
61 |
+
latitude = self._as_bytes(latitude, True, 255)
|
62 |
+
longitude = self._as_bytes(longitude, True, 255)
|
63 |
+
altitude = self._as_bytes(altitude, True, 255)
|
64 |
+
_validate_float_string(latitude)
|
65 |
+
_validate_float_string(longitude)
|
66 |
+
_validate_float_string(altitude)
|
67 |
+
self.latitude = latitude
|
68 |
+
self.longitude = longitude
|
69 |
+
self.altitude = altitude
|
70 |
+
flat = self.float_latitude
|
71 |
+
if flat < -90.0 or flat > 90.0:
|
72 |
+
raise dns.exception.FormError("bad latitude")
|
73 |
+
flong = self.float_longitude
|
74 |
+
if flong < -180.0 or flong > 180.0:
|
75 |
+
raise dns.exception.FormError("bad longitude")
|
76 |
+
|
77 |
+
def to_text(self, origin=None, relativize=True, **kw):
|
78 |
+
return (
|
79 |
+
f"{self.latitude.decode()} {self.longitude.decode()} "
|
80 |
+
f"{self.altitude.decode()}"
|
81 |
+
)
|
82 |
+
|
83 |
+
@classmethod
|
84 |
+
def from_text(
|
85 |
+
cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
|
86 |
+
):
|
87 |
+
latitude = tok.get_string()
|
88 |
+
longitude = tok.get_string()
|
89 |
+
altitude = tok.get_string()
|
90 |
+
return cls(rdclass, rdtype, latitude, longitude, altitude)
|
91 |
+
|
92 |
+
def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
|
93 |
+
l = len(self.latitude)
|
94 |
+
assert l < 256
|
95 |
+
file.write(struct.pack("!B", l))
|
96 |
+
file.write(self.latitude)
|
97 |
+
l = len(self.longitude)
|
98 |
+
assert l < 256
|
99 |
+
file.write(struct.pack("!B", l))
|
100 |
+
file.write(self.longitude)
|
101 |
+
l = len(self.altitude)
|
102 |
+
assert l < 256
|
103 |
+
file.write(struct.pack("!B", l))
|
104 |
+
file.write(self.altitude)
|
105 |
+
|
106 |
+
@classmethod
|
107 |
+
def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
|
108 |
+
latitude = parser.get_counted_bytes()
|
109 |
+
longitude = parser.get_counted_bytes()
|
110 |
+
altitude = parser.get_counted_bytes()
|
111 |
+
return cls(rdclass, rdtype, latitude, longitude, altitude)
|
112 |
+
|
113 |
+
@property
|
114 |
+
def float_latitude(self):
|
115 |
+
"latitude as a floating point value"
|
116 |
+
return float(self.latitude)
|
117 |
+
|
118 |
+
@property
|
119 |
+
def float_longitude(self):
|
120 |
+
"longitude as a floating point value"
|
121 |
+
return float(self.longitude)
|
122 |
+
|
123 |
+
@property
|
124 |
+
def float_altitude(self):
|
125 |
+
"altitude as a floating point value"
|
126 |
+
return float(self.altitude)
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/NINFO.py
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
2 |
+
|
3 |
+
# Copyright (C) 2006, 2007, 2009-2011 Nominum, Inc.
|
4 |
+
#
|
5 |
+
# Permission to use, copy, modify, and distribute this software and its
|
6 |
+
# documentation for any purpose with or without fee is hereby granted,
|
7 |
+
# provided that the above copyright notice and this permission notice
|
8 |
+
# appear in all copies.
|
9 |
+
#
|
10 |
+
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
11 |
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
12 |
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
13 |
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
14 |
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
15 |
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
16 |
+
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
17 |
+
|
18 |
+
import dns.immutable
|
19 |
+
import dns.rdtypes.txtbase
|
20 |
+
|
21 |
+
|
22 |
+
@dns.immutable.immutable
|
23 |
+
class NINFO(dns.rdtypes.txtbase.TXTBase):
|
24 |
+
"""NINFO record"""
|
25 |
+
|
26 |
+
# see: draft-reid-dnsext-zs-01
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/NSEC.py
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
2 |
+
|
3 |
+
# Copyright (C) 2004-2007, 2009-2011 Nominum, Inc.
|
4 |
+
#
|
5 |
+
# Permission to use, copy, modify, and distribute this software and its
|
6 |
+
# documentation for any purpose with or without fee is hereby granted,
|
7 |
+
# provided that the above copyright notice and this permission notice
|
8 |
+
# appear in all copies.
|
9 |
+
#
|
10 |
+
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
11 |
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
12 |
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
13 |
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
14 |
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
15 |
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
16 |
+
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
17 |
+
|
18 |
+
import dns.exception
|
19 |
+
import dns.immutable
|
20 |
+
import dns.name
|
21 |
+
import dns.rdata
|
22 |
+
import dns.rdatatype
|
23 |
+
import dns.rdtypes.util
|
24 |
+
|
25 |
+
|
26 |
+
@dns.immutable.immutable
|
27 |
+
class Bitmap(dns.rdtypes.util.Bitmap):
|
28 |
+
type_name = "NSEC"
|
29 |
+
|
30 |
+
|
31 |
+
@dns.immutable.immutable
|
32 |
+
class NSEC(dns.rdata.Rdata):
|
33 |
+
"""NSEC record"""
|
34 |
+
|
35 |
+
__slots__ = ["next", "windows"]
|
36 |
+
|
37 |
+
def __init__(self, rdclass, rdtype, next, windows):
|
38 |
+
super().__init__(rdclass, rdtype)
|
39 |
+
self.next = self._as_name(next)
|
40 |
+
if not isinstance(windows, Bitmap):
|
41 |
+
windows = Bitmap(windows)
|
42 |
+
self.windows = tuple(windows.windows)
|
43 |
+
|
44 |
+
def to_text(self, origin=None, relativize=True, **kw):
|
45 |
+
next = self.next.choose_relativity(origin, relativize)
|
46 |
+
text = Bitmap(self.windows).to_text()
|
47 |
+
return f"{next}{text}"
|
48 |
+
|
49 |
+
@classmethod
|
50 |
+
def from_text(
|
51 |
+
cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
|
52 |
+
):
|
53 |
+
next = tok.get_name(origin, relativize, relativize_to)
|
54 |
+
windows = Bitmap.from_text(tok)
|
55 |
+
return cls(rdclass, rdtype, next, windows)
|
56 |
+
|
57 |
+
def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
|
58 |
+
# Note that NSEC downcasing, originally mandated by RFC 4034
|
59 |
+
# section 6.2 was removed by RFC 6840 section 5.1.
|
60 |
+
self.next.to_wire(file, None, origin, False)
|
61 |
+
Bitmap(self.windows).to_wire(file)
|
62 |
+
|
63 |
+
@classmethod
|
64 |
+
def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
|
65 |
+
next = parser.get_name(origin)
|
66 |
+
bitmap = Bitmap.from_wire_parser(parser)
|
67 |
+
return cls(rdclass, rdtype, next, bitmap)
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/SOA.py
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
2 |
+
|
3 |
+
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
|
4 |
+
#
|
5 |
+
# Permission to use, copy, modify, and distribute this software and its
|
6 |
+
# documentation for any purpose with or without fee is hereby granted,
|
7 |
+
# provided that the above copyright notice and this permission notice
|
8 |
+
# appear in all copies.
|
9 |
+
#
|
10 |
+
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
11 |
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
12 |
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
13 |
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
14 |
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
15 |
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
16 |
+
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
17 |
+
|
18 |
+
import struct
|
19 |
+
|
20 |
+
import dns.exception
|
21 |
+
import dns.immutable
|
22 |
+
import dns.name
|
23 |
+
import dns.rdata
|
24 |
+
|
25 |
+
|
26 |
+
@dns.immutable.immutable
|
27 |
+
class SOA(dns.rdata.Rdata):
|
28 |
+
"""SOA record"""
|
29 |
+
|
30 |
+
# see: RFC 1035
|
31 |
+
|
32 |
+
__slots__ = ["mname", "rname", "serial", "refresh", "retry", "expire", "minimum"]
|
33 |
+
|
34 |
+
def __init__(
|
35 |
+
self, rdclass, rdtype, mname, rname, serial, refresh, retry, expire, minimum
|
36 |
+
):
|
37 |
+
super().__init__(rdclass, rdtype)
|
38 |
+
self.mname = self._as_name(mname)
|
39 |
+
self.rname = self._as_name(rname)
|
40 |
+
self.serial = self._as_uint32(serial)
|
41 |
+
self.refresh = self._as_ttl(refresh)
|
42 |
+
self.retry = self._as_ttl(retry)
|
43 |
+
self.expire = self._as_ttl(expire)
|
44 |
+
self.minimum = self._as_ttl(minimum)
|
45 |
+
|
46 |
+
def to_text(self, origin=None, relativize=True, **kw):
|
47 |
+
mname = self.mname.choose_relativity(origin, relativize)
|
48 |
+
rname = self.rname.choose_relativity(origin, relativize)
|
49 |
+
return "%s %s %d %d %d %d %d" % (
|
50 |
+
mname,
|
51 |
+
rname,
|
52 |
+
self.serial,
|
53 |
+
self.refresh,
|
54 |
+
self.retry,
|
55 |
+
self.expire,
|
56 |
+
self.minimum,
|
57 |
+
)
|
58 |
+
|
59 |
+
@classmethod
|
60 |
+
def from_text(
|
61 |
+
cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
|
62 |
+
):
|
63 |
+
mname = tok.get_name(origin, relativize, relativize_to)
|
64 |
+
rname = tok.get_name(origin, relativize, relativize_to)
|
65 |
+
serial = tok.get_uint32()
|
66 |
+
refresh = tok.get_ttl()
|
67 |
+
retry = tok.get_ttl()
|
68 |
+
expire = tok.get_ttl()
|
69 |
+
minimum = tok.get_ttl()
|
70 |
+
return cls(
|
71 |
+
rdclass, rdtype, mname, rname, serial, refresh, retry, expire, minimum
|
72 |
+
)
|
73 |
+
|
74 |
+
def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
|
75 |
+
self.mname.to_wire(file, compress, origin, canonicalize)
|
76 |
+
self.rname.to_wire(file, compress, origin, canonicalize)
|
77 |
+
five_ints = struct.pack(
|
78 |
+
"!IIIII", self.serial, self.refresh, self.retry, self.expire, self.minimum
|
79 |
+
)
|
80 |
+
file.write(five_ints)
|
81 |
+
|
82 |
+
@classmethod
|
83 |
+
def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
|
84 |
+
mname = parser.get_name(origin)
|
85 |
+
rname = parser.get_name(origin)
|
86 |
+
return cls(rdclass, rdtype, mname, rname, *parser.get_struct("!IIIII"))
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/URI.py
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
2 |
+
|
3 |
+
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
|
4 |
+
# Copyright (C) 2015 Red Hat, Inc.
|
5 |
+
#
|
6 |
+
# Permission to use, copy, modify, and distribute this software and its
|
7 |
+
# documentation for any purpose with or without fee is hereby granted,
|
8 |
+
# provided that the above copyright notice and this permission notice
|
9 |
+
# appear in all copies.
|
10 |
+
#
|
11 |
+
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
12 |
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
13 |
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
14 |
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
15 |
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
16 |
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
17 |
+
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
18 |
+
|
19 |
+
import struct
|
20 |
+
|
21 |
+
import dns.exception
|
22 |
+
import dns.immutable
|
23 |
+
import dns.name
|
24 |
+
import dns.rdata
|
25 |
+
import dns.rdtypes.util
|
26 |
+
|
27 |
+
|
28 |
+
@dns.immutable.immutable
|
29 |
+
class URI(dns.rdata.Rdata):
|
30 |
+
"""URI record"""
|
31 |
+
|
32 |
+
# see RFC 7553
|
33 |
+
|
34 |
+
__slots__ = ["priority", "weight", "target"]
|
35 |
+
|
36 |
+
def __init__(self, rdclass, rdtype, priority, weight, target):
|
37 |
+
super().__init__(rdclass, rdtype)
|
38 |
+
self.priority = self._as_uint16(priority)
|
39 |
+
self.weight = self._as_uint16(weight)
|
40 |
+
self.target = self._as_bytes(target, True)
|
41 |
+
if len(self.target) == 0:
|
42 |
+
raise dns.exception.SyntaxError("URI target cannot be empty")
|
43 |
+
|
44 |
+
def to_text(self, origin=None, relativize=True, **kw):
|
45 |
+
return '%d %d "%s"' % (self.priority, self.weight, self.target.decode())
|
46 |
+
|
47 |
+
@classmethod
|
48 |
+
def from_text(
|
49 |
+
cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
|
50 |
+
):
|
51 |
+
priority = tok.get_uint16()
|
52 |
+
weight = tok.get_uint16()
|
53 |
+
target = tok.get().unescape()
|
54 |
+
if not (target.is_quoted_string() or target.is_identifier()):
|
55 |
+
raise dns.exception.SyntaxError("URI target must be a string")
|
56 |
+
return cls(rdclass, rdtype, priority, weight, target.value)
|
57 |
+
|
58 |
+
def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
|
59 |
+
two_ints = struct.pack("!HH", self.priority, self.weight)
|
60 |
+
file.write(two_ints)
|
61 |
+
file.write(self.target)
|
62 |
+
|
63 |
+
@classmethod
|
64 |
+
def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
|
65 |
+
(priority, weight) = parser.get_struct("!HH")
|
66 |
+
target = parser.get_remaining()
|
67 |
+
if len(target) == 0:
|
68 |
+
raise dns.exception.FormError("URI target may not be empty")
|
69 |
+
return cls(rdclass, rdtype, priority, weight, target)
|
70 |
+
|
71 |
+
def _processing_priority(self):
|
72 |
+
return self.priority
|
73 |
+
|
74 |
+
def _processing_weight(self):
|
75 |
+
return self.weight
|
76 |
+
|
77 |
+
@classmethod
|
78 |
+
def _processing_order(cls, iterable):
|
79 |
+
return dns.rdtypes.util.weighted_processing_order(iterable)
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/AFSDB.cpython-310.pyc
ADDED
Binary file (783 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/AMTRELAY.cpython-310.pyc
ADDED
Binary file (2.54 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/AVC.cpython-310.pyc
ADDED
Binary file (462 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CDNSKEY.cpython-310.pyc
ADDED
Binary file (541 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CDS.cpython-310.pyc
ADDED
Binary file (547 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CERT.cpython-310.pyc
ADDED
Binary file (2.79 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CNAME.cpython-310.pyc
ADDED
Binary file (670 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/CSYNC.cpython-310.pyc
ADDED
Binary file (2.11 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/DLV.cpython-310.pyc
ADDED
Binary file (459 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/DNAME.cpython-310.pyc
ADDED
Binary file (668 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/DNSKEY.cpython-310.pyc
ADDED
Binary file (538 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/DS.cpython-310.pyc
ADDED
Binary file (456 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/EUI48.cpython-310.pyc
ADDED
Binary file (523 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/EUI64.cpython-310.pyc
ADDED
Binary file (523 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/GPOS.cpython-310.pyc
ADDED
Binary file (3.28 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/HINFO.cpython-310.pyc
ADDED
Binary file (1.82 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/HIP.cpython-310.pyc
ADDED
Binary file (2.68 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/ISDN.cpython-310.pyc
ADDED
Binary file (2.01 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/L32.cpython-310.pyc
ADDED
Binary file (1.66 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/LOC.cpython-310.pyc
ADDED
Binary file (7.75 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/LP.cpython-310.pyc
ADDED
Binary file (1.65 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/MX.cpython-310.pyc
ADDED
Binary file (456 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/NID.cpython-310.pyc
ADDED
Binary file (1.86 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/NSEC.cpython-310.pyc
ADDED
Binary file (1.98 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/NSEC3.cpython-310.pyc
ADDED
Binary file (3.46 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/OPENPGPKEY.cpython-310.pyc
ADDED
Binary file (1.65 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/OPT.cpython-310.pyc
ADDED
Binary file (2.39 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/PTR.cpython-310.pyc
ADDED
Binary file (459 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/RESINFO.cpython-310.pyc
ADDED
Binary file (474 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/RP.cpython-310.pyc
ADDED
Binary file (1.66 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/RRSIG.cpython-310.pyc
ADDED
Binary file (3.72 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/RT.cpython-310.pyc
ADDED
Binary file (474 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/SPF.cpython-310.pyc
ADDED
Binary file (462 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/SSHFP.cpython-310.pyc
ADDED
Binary file (1.97 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/TKEY.cpython-310.pyc
ADDED
Binary file (2.75 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/TLSA.cpython-310.pyc
ADDED
Binary file (468 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/TSIG.cpython-310.pyc
ADDED
Binary file (3.23 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/TXT.cpython-310.pyc
ADDED
Binary file (462 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/URI.cpython-310.pyc
ADDED
Binary file (2.6 kB). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/WALLET.cpython-310.pyc
ADDED
Binary file (471 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/ANY/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (552 Bytes). View file
|
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/IN/A.py
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
2 |
+
|
3 |
+
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
|
4 |
+
#
|
5 |
+
# Permission to use, copy, modify, and distribute this software and its
|
6 |
+
# documentation for any purpose with or without fee is hereby granted,
|
7 |
+
# provided that the above copyright notice and this permission notice
|
8 |
+
# appear in all copies.
|
9 |
+
#
|
10 |
+
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
11 |
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
12 |
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
13 |
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
14 |
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
15 |
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
16 |
+
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
17 |
+
|
18 |
+
import dns.exception
|
19 |
+
import dns.immutable
|
20 |
+
import dns.ipv4
|
21 |
+
import dns.rdata
|
22 |
+
import dns.tokenizer
|
23 |
+
|
24 |
+
|
25 |
+
@dns.immutable.immutable
|
26 |
+
class A(dns.rdata.Rdata):
|
27 |
+
"""A record."""
|
28 |
+
|
29 |
+
__slots__ = ["address"]
|
30 |
+
|
31 |
+
def __init__(self, rdclass, rdtype, address):
|
32 |
+
super().__init__(rdclass, rdtype)
|
33 |
+
self.address = self._as_ipv4_address(address)
|
34 |
+
|
35 |
+
def to_text(self, origin=None, relativize=True, **kw):
|
36 |
+
return self.address
|
37 |
+
|
38 |
+
@classmethod
|
39 |
+
def from_text(
|
40 |
+
cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
|
41 |
+
):
|
42 |
+
address = tok.get_identifier()
|
43 |
+
return cls(rdclass, rdtype, address)
|
44 |
+
|
45 |
+
def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
|
46 |
+
file.write(dns.ipv4.inet_aton(self.address))
|
47 |
+
|
48 |
+
@classmethod
|
49 |
+
def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
|
50 |
+
address = parser.get_remaining()
|
51 |
+
return cls(rdclass, rdtype, address)
|
infer_4_30_0/lib/python3.10/site-packages/dns/rdtypes/IN/AAAA.py
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
|
2 |
+
|
3 |
+
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
|
4 |
+
#
|
5 |
+
# Permission to use, copy, modify, and distribute this software and its
|
6 |
+
# documentation for any purpose with or without fee is hereby granted,
|
7 |
+
# provided that the above copyright notice and this permission notice
|
8 |
+
# appear in all copies.
|
9 |
+
#
|
10 |
+
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
|
11 |
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
12 |
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
|
13 |
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
14 |
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
15 |
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
16 |
+
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
17 |
+
|
18 |
+
import dns.exception
|
19 |
+
import dns.immutable
|
20 |
+
import dns.ipv6
|
21 |
+
import dns.rdata
|
22 |
+
import dns.tokenizer
|
23 |
+
|
24 |
+
|
25 |
+
@dns.immutable.immutable
|
26 |
+
class AAAA(dns.rdata.Rdata):
|
27 |
+
"""AAAA record."""
|
28 |
+
|
29 |
+
__slots__ = ["address"]
|
30 |
+
|
31 |
+
def __init__(self, rdclass, rdtype, address):
|
32 |
+
super().__init__(rdclass, rdtype)
|
33 |
+
self.address = self._as_ipv6_address(address)
|
34 |
+
|
35 |
+
def to_text(self, origin=None, relativize=True, **kw):
|
36 |
+
return self.address
|
37 |
+
|
38 |
+
@classmethod
|
39 |
+
def from_text(
|
40 |
+
cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
|
41 |
+
):
|
42 |
+
address = tok.get_identifier()
|
43 |
+
return cls(rdclass, rdtype, address)
|
44 |
+
|
45 |
+
def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
|
46 |
+
file.write(dns.ipv6.inet_aton(self.address))
|
47 |
+
|
48 |
+
@classmethod
|
49 |
+
def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
|
50 |
+
address = parser.get_remaining()
|
51 |
+
return cls(rdclass, rdtype, address)
|