Import dnspython_1.14.0.orig.tar.gz
Scott Kitterman
7 years ago
0 | 2016-05-27 Bob Halley <halley@dnspython.org> | |
1 | ||
2 | * (Version 1.14.0 released) | |
3 | ||
4 | * Add CSYNC RR support | |
5 | ||
6 | * Fix bug in LOC which destroyed N/S and E/W distinctions within | |
7 | a degree of the equator or prime merdian respectively. | |
8 | ||
9 | * Misc. fixes to deal with fallout from the Python 2 & 3 merge. | |
10 | [issue #156], [issue #157], [issue #158], [issue #159], | |
11 | [issue #160]. | |
12 | ||
13 | * Running with python optimization on caused issues when | |
14 | stripped docstrings were referenced. [issue #154] | |
15 | ||
16 | * dns.zone.from_text() erroneously required the zone to be provided. | |
17 | [issue #153] | |
18 | ||
19 | 2016-05-13 Bob Halley <halley@dnspython.org> | |
20 | ||
21 | * dns/message.py (make_query): Setting any value which implies | |
22 | EDNS will turn on EDNS if 'use_edns' has not been specified. | |
23 | ||
24 | 2016-05-12 Bob Halley <halley@dnspython.org> | |
25 | ||
26 | * TSIG signature algorithm setting was broken by the Python 2 | |
27 | and Python 3 code line merge. Fixed. | |
28 | ||
0 | 29 | 2016-05-10 Bob Halley <halley@dnspython.org> |
1 | 30 | |
2 | 31 | * (Version 1.13.0 released) |
33 | 62 | |
34 | 63 | * Comparing two rdata is now always done by comparing the binary |
35 | 64 | data of the DNSSEC digestable forms. This corrects a number of |
36 | errors where dnspython's rdata comparsion order was not the | |
65 | errors where dnspython's rdata comparison order was not the | |
37 | 66 | DNSSEC order. |
38 | 67 | |
39 | 68 | * Add CAA implementation. Thanks to Brian Wellington for the |
915 | 944 | 2003-11-13 Bob Halley <halley@dnspython.org> |
916 | 945 | |
917 | 946 | * dns/rdtypes/ANY/LOC.py (LOC.to_wire): We encoded and decoded LOC |
918 | incorrectly, since we were interpreting the values of altitiude, | |
947 | incorrectly, since we were interpreting the values of altitude, | |
919 | 948 | size, hprec, and vprec in meters instead of centimeters. |
920 | 949 | |
921 | 950 | * dns/rdtypes/IN/WKS.py (WKS.from_wire): The WKS protocol value is |
1199 | 1228 | |
1200 | 1229 | bar.foo 300 IN MX 0 blaz.foo |
1201 | 1230 | |
1202 | after the second step (relativiation to zone origin). | |
1231 | after the second step (relativization to zone origin). | |
1203 | 1232 | |
1204 | 1233 | * dns/namedict.py: added. |
1205 | 1234 | |
1220 | 1249 | * dns/renderer.py: added new wire format rendering module and |
1221 | 1250 | converted message.py to use it. Applications which want |
1222 | 1251 | fine-grained control over the conversion to wire format may call |
1223 | the renderer directy, instead of having it called on their behalf | |
1252 | the renderer directly, instead of having it called on their behalf | |
1224 | 1253 | by the message code. |
1225 | 1254 | |
1226 | 1255 | 2003-07-02 Bob Halley <halley@dnspython.org> |
0 | 0 | Metadata-Version: 1.1 |
1 | 1 | Name: dnspython |
2 | Version: 1.13.0 | |
2 | Version: 1.14.0 | |
3 | 3 | Summary: DNS toolkit |
4 | 4 | Home-page: http://www.dnspython.org |
5 | 5 | Author: Bob Halley |
6 | 6 | Author-email: halley@dnspython.org |
7 | 7 | License: BSD-like |
8 | Download-URL: http://www.dnspython.org/kits/1.13.0/dnspython-1.13.0.tar.gz | |
8 | Download-URL: http://www.dnspython.org/kits/1.14.0/dnspython-1.14.0.tar.gz | |
9 | 9 | Description: dnspython is a DNS toolkit for Python. It supports almost all |
10 | 10 | record types. It can be used for queries, zone transfers, and dynamic |
11 | 11 | updates. It supports TSIG authenticated messages and EDNS0. |
0 | dnspython [![Build Status](https://travis-ci.org/rthalley/dnspython.svg?branch=master)](https://travis-ci.org/rthalley/dnspython) | |
1 | ||
2 | ## INTRODUCTION | |
3 | ||
4 | dnspython is a DNS toolkit for Python. It supports almost all record | |
5 | types. It can be used for queries, zone transfers, and dynamic | |
6 | updates. It supports TSIG authenticated messages and EDNS0. | |
7 | ||
8 | dnspython provides both high and low level access to DNS. The high | |
9 | level classes perform queries for data of a given name, type, and | |
10 | class, and return an answer set. The low level classes allow direct | |
11 | manipulation of DNS zones, messages, names, and records. | |
12 | ||
13 | To see a few of the ways dnspython can be used, look in the examples/ | |
14 | directory. | |
15 | ||
16 | dnspython originated at Nominum where it was developed to facilitate | |
17 | the testing of DNS software. Nominum has generously allowed it to be | |
18 | open sourced under a BSD-style license, and helps support its future | |
19 | development by continuing to employ the author :). | |
20 | ||
21 | ## INSTALLATION | |
22 | - If you have pip installed, you can do this | |
23 | `pip install dnspython` | |
24 | - If not just download the source file and unzip it, then run this | |
25 | `sudo python setup.py install` | |
26 | ||
27 | ## ABOUT THIS RELEASE | |
28 | ||
29 | This is dnspython 1.14.0 | |
30 | ||
31 | New since 1.13.0: | |
32 | ||
33 | CSYNC RRs are now supported. | |
34 | ||
35 | dns/message.py (make_query): Setting any value which implies | |
36 | EDNS will turn on EDNS if 'use_edns' has not been specified. | |
37 | ||
38 | Bugs fixed since 1.13.0: | |
39 | ||
40 | TSIG signature algorithm setting was broken by the Python 2 | |
41 | and Python 3 code line merge. | |
42 | ||
43 | A bug in the LOC RR destroyed N/S and E/W distinctions within | |
44 | a degree of the equator or prime merdian respectively. | |
45 | ||
46 | Misc. fixes to deal with fallout from the Python 2 & 3 merge. | |
47 | [issue #156], [issue #157], [issue #158], [issue #159], | |
48 | [issue #160]. | |
49 | ||
50 | Running with python optimization on caused issues when | |
51 | stripped docstrings were referenced. [issue #154] | |
52 | ||
53 | dns.zone.from_text() erroneously required the zone to be provided. | |
54 | [issue #153] | |
55 | ||
56 | New since 1.12.0: | |
57 | ||
58 | Dnspython now uses a single source for Python 2 and Python 3, | |
59 | eliminating the painful merging between the Python 2 and Python 3 | |
60 | branches. Thank you so much to Arthur Gautier for taking on this | |
61 | challenge and making it work! It was a big job! | |
62 | ||
63 | Support for Python older than 2.6 dropped. | |
64 | ||
65 | Support for Python older than 3.3 dropped. | |
66 | ||
67 | Zone origin can be specified as a string. | |
68 | ||
69 | A rich string representation for all DNSExceptions. | |
70 | ||
71 | setuptools has replaced distutils | |
72 | ||
73 | Added support for CAA, CDS, CDNSKEY, EUI48, EUI64, and URI RR | |
74 | types. | |
75 | ||
76 | Names now support the pickle protocol. | |
77 | ||
78 | Ports can be specified per-nameserver in the stub resolver. | |
79 | ||
80 | Bugs fixed since 1.12.0: | |
81 | ||
82 | A number of Unicode name bugs have been fixed. | |
83 | ||
84 | resolv.conf processing now rejects lines with too few tokens. | |
85 | ||
86 | NameDicts now keep the max-depth value correct, and update properly. | |
87 | ||
88 | New since 1.11.1: | |
89 | ||
90 | Added dns.zone.to_text(). | |
91 | ||
92 | Added support for "options rotate" in /etc/resolv.conf. | |
93 | ||
94 | dns.rdtypes.ANY.DNSKEY now has helpers functions to convert | |
95 | between the numeric form of the flags and a set of | |
96 | human-friendly strings | |
97 | ||
98 | The reverse name of an IPv6 mapped IPv4 address is now in the | |
99 | IPv4 reverse namespace. | |
100 | ||
101 | The test system can now run the tests without requiring | |
102 | dnspython to be installed. | |
103 | ||
104 | Preliminary Elliptic Curve DNSSEC Validation (requires ecdsa module) | |
105 | ||
106 | Bugs fixed since 1.11.1: | |
107 | ||
108 | dnspython raised an exception when reading a masterfile starting | |
109 | with leading whitespace | |
110 | ||
111 | dnspython was affected by a python slicing API bug present on | |
112 | 64-bit windows. | |
113 | ||
114 | Unicode escaping was applied at the wrong time. | |
115 | ||
116 | RRSIG to_text() did not respect the relativize setting. | |
117 | ||
118 | APL RRs with zero rdlength were rejected. | |
119 | ||
120 | The tokenizer could put back an unescaped token. | |
121 | ||
122 | Making a response to a message signed with TSIG was broken. | |
123 | ||
124 | The IXFR state machine didn't handle long IXFR diffs. | |
125 | ||
126 | New since 1.11.0: | |
127 | ||
128 | Nothing | |
129 | ||
130 | Bugs fixed since 1.11.0: | |
131 | ||
132 | dns.resolver.Resolver erroneously referred to 'retry_servfail' | |
133 | instead of 'self.retry_servfail'. | |
134 | ||
135 | dns.tsigkeyring.to_text() would fail trying to convert the | |
136 | keyname to text. | |
137 | ||
138 | Multi-message TSIGs were broken for algorithms other than | |
139 | HMAC-MD5 because we weren't passing the right digest module to | |
140 | the HMAC code. | |
141 | ||
142 | dns.dnssec._find_candidate_keys() tried to extract the key | |
143 | from the wrong variable name. | |
144 | ||
145 | $GENERATE tests were not backward compatible with python 2.4. | |
146 | ||
147 | New since 1.10.0: | |
148 | ||
149 | $GENERATE support | |
150 | ||
151 | TLSA RR support | |
152 | ||
153 | Added set_flags() method to dns.resolver.Resolver | |
154 | ||
155 | Bugs fixed since 1.10.0: | |
156 | ||
157 | Names with offsets >= 2^14 are no longer added to the compression | |
158 | table. | |
159 | ||
160 | The "::" syntax is not used to shorten a single 16-bit section of | |
161 | the text form an IPv6 address. | |
162 | ||
163 | Caches are now locked. | |
164 | ||
165 | YXDOMAIN is raised if seen by the resolver. | |
166 | ||
167 | Empty rdatasets are not printed. | |
168 | ||
169 | DNSKEY key tags are no longer assumed to be unique. | |
170 | ||
171 | New since 1.9.4: | |
172 | ||
173 | Added dns.resolver.LRUCache. In this cache implementation, | |
174 | the cache size is limited to a user-specified number of nodes, | |
175 | and when adding a new node to a full cache the least-recently | |
176 | used node is removed. If you're crawling the web or otherwise | |
177 | doing lots of resolutions and you are using a cache, switching | |
178 | to the LRUCache is recommended. | |
179 | ||
180 | dns.resolver.query() will try TCP if a UDP response is | |
181 | truncated. | |
182 | ||
183 | The python socket module's DNS methods can be now be overridden | |
184 | with implementations that use dnspython's resolver. | |
185 | ||
186 | Old DNSSEC types KEY, NXT, and SIG have been removed. | |
187 | ||
188 | Whitespace is allowed in SSHFP fingerprints. | |
189 | ||
190 | Origin checking in dns.zone.from_xfr() can be disabled. | |
191 | ||
192 | Trailing junk checking can be disabled. | |
193 | ||
194 | A source port can be specified when creating a resolver query. | |
195 | ||
196 | All EDNS values may now be specified to dns.message.make_query(). | |
197 | ||
198 | Bugs fixed since 1.9.4: | |
199 | ||
200 | IPv4 and IPv6 address processing is now stricter. | |
201 | ||
202 | Bounds checking of slices in rdata wire processing is now more | |
203 | strict, and bounds errors (e.g. we got less data than was | |
204 | expected) now raise dns.exception.FormError rather than | |
205 | IndexError. | |
206 | ||
207 | Specifying a source port without specifying source used to | |
208 | have no effect, but now uses the wildcard address and the | |
209 | specified port. | |
210 | ||
211 | New since 1.9.3: | |
212 | ||
213 | Nothing. | |
214 | ||
215 | Bugs fixed since 1.9.3: | |
216 | ||
217 | The rdata _wire_cmp() routine now handles relative names. | |
218 | ||
219 | The SIG RR implementation was missing 'import struct'. | |
220 | ||
221 | New since 1.9.2: | |
222 | ||
223 | A boolean parameter, 'raise_on_no_answer', has been added to | |
224 | the query() methods. In no-error, no-data situations, this | |
225 | parameter determines whether NoAnswer should be raised or not. | |
226 | If True, NoAnswer is raised. If False, then an Answer() | |
227 | object with a None rrset will be returned. | |
228 | ||
229 | Resolver Answer() objects now have a canonical_name field. | |
230 | ||
231 | Rdata now have a __hash__ method. | |
232 | ||
233 | Bugs fixed since 1.9.2: | |
234 | ||
235 | Dnspython was erroneously doing case-insensitive comparisons | |
236 | of the names in NSEC and RRSIG RRs. | |
237 | ||
238 | We now use "is" and not "==" when testing what section an RR | |
239 | is in. | |
240 | ||
241 | The resolver now disallows metaqueries. | |
242 | ||
243 | New since 1.9.1: | |
244 | ||
245 | Nothing. | |
246 | ||
247 | Bugs fixed since 1.9.1: | |
248 | ||
249 | The dns.dnssec module didn't work at all due to missing | |
250 | imports that escaped detection in testing because the test | |
251 | suite also did the imports. The third time is the charm! | |
252 | ||
253 | New since 1.9.0: | |
254 | ||
255 | Nothing. | |
256 | ||
257 | Bugs fixed since 1.9.0: | |
258 | ||
259 | The dns.dnssec module didn't work with DSA due to namespace | |
260 | contamination from a "from"-style import. | |
261 | ||
262 | New since 1.8.0: | |
263 | ||
264 | dnspython now uses poll() instead of select() when available. | |
265 | ||
266 | Basic DNSSEC validation can be done using dns.dnsec.validate() | |
267 | and dns.dnssec.validate_rrsig() if you have PyCrypto 2.3 or | |
268 | later installed. Complete secure resolution is not yet | |
269 | available. | |
270 | ||
271 | Added key_id() to the DNSSEC module, which computes the DNSSEC | |
272 | key id of a DNSKEY rdata. | |
273 | ||
274 | Added make_ds() to the DNSSEC module, which returns the DS RR | |
275 | for a given DNSKEY rdata. | |
276 | ||
277 | dnspython now raises an exception if HMAC-SHA284 or | |
278 | HMAC-SHA512 are used with a Python older than 2.5.2. (Older | |
279 | Pythons do not compute the correct value.) | |
280 | ||
281 | Symbolic constants are now available for TSIG algorithm names. | |
282 | ||
283 | Bugs fixed since 1.8.0 | |
284 | ||
285 | dns.resolver.zone_for_name() didn't handle a query response | |
286 | with a CNAME or DNAME correctly in some cases. | |
287 | ||
288 | When specifying rdata types and classes as text, Unicode | |
289 | strings may now be used. | |
290 | ||
291 | Hashlib compatibility issues have been fixed. | |
292 | ||
293 | dns.message now imports dns.edns. | |
294 | ||
295 | The TSIG algorithm value was passed incorrectly to use_tsig() | |
296 | in some cases. | |
297 | ||
298 | New since 1.7.1: | |
299 | ||
300 | Support for hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384 | |
301 | and hmac-sha512 has been contributed by Kevin Chen. | |
302 | ||
303 | The tokenizer's tokens are now Token objects instead of (type, | |
304 | value) tuples. | |
305 | ||
306 | Bugs fixed since 1.7.1: | |
307 | ||
308 | Escapes in masterfiles now work correctly. Previously they | |
309 | were only working correctly when the text involved was part of | |
310 | a domain name. | |
311 | ||
312 | When constructing a DDNS update, if the present() method was | |
313 | used with a single rdata, a zero TTL was not added. | |
314 | ||
315 | The entropy pool needed locking to be thread safe. | |
316 | ||
317 | The entropy pool's reading of /dev/random could cause | |
318 | dnspython to block. | |
319 | ||
320 | The entropy pool did buffered reads, potentially consuming more | |
321 | randomness than we needed. | |
322 | ||
323 | The entropy pool did not seed with high quality randomness on | |
324 | Windows. | |
325 | ||
326 | SRV records were compared incorrectly. | |
327 | ||
328 | In the e164 query function, the resolver parameter was not | |
329 | used. | |
330 | ||
331 | New since 1.7.0: | |
332 | ||
333 | Nothing | |
334 | ||
335 | Bugs fixed since 1.7.0: | |
336 | ||
337 | The 1.7.0 kitting process inadvertently omitted the code for the | |
338 | DLV RR. | |
339 | ||
340 | Negative DDNS prerequisites are now handled correctly. | |
341 | ||
342 | New since 1.6.0: | |
343 | ||
344 | Rdatas now have a to_digestable() method, which returns the | |
345 | DNSSEC canonical form of the rdata, suitable for use in | |
346 | signature computations. | |
347 | ||
348 | The NSEC3, NSEC3PARAM, DLV, and HIP RR types are now supported. | |
349 | ||
350 | An entropy module has been added and is used to randomize query ids. | |
351 | ||
352 | EDNS0 options are now supported. | |
353 | ||
354 | UDP IXFR is now supported. | |
355 | ||
356 | The wire format parser now has a 'one_rr_per_rrset' mode, which | |
357 | suppresses the usual coalescing of all RRs of a given type into a | |
358 | single RRset. | |
359 | ||
360 | Various helpful DNSSEC-related constants are now defined. | |
361 | ||
362 | The resolver's query() method now has an optional 'source' parameter, | |
363 | allowing the source IP address to be specified. | |
364 | ||
365 | Bugs fixed since 1.6.0: | |
366 | ||
367 | On Windows, the resolver set the domain incorrectly. | |
368 | ||
369 | DS RR parsing only allowed one Base64 chunk. | |
370 | ||
371 | TSIG validation didn't always use absolute names. | |
372 | ||
373 | NSEC.to_text() only printed the last window. | |
374 | ||
375 | We did not canonicalize IPv6 addresses before comparing them; we | |
376 | would thus treat equivalent but different textual forms, e.g. | |
377 | "1:00::1" and "1::1" as being non-equivalent. | |
378 | ||
379 | If the peer set a TSIG error, we didn't raise an exception. | |
380 | ||
381 | Some EDNS bugs in the message code have been fixed (see the ChangeLog | |
382 | for details). | |
383 | ||
384 | New since 1.5.0: | |
385 | Added dns.inet.is_multicast(). | |
386 | ||
387 | Bugs fixed since 1.5.0: | |
388 | ||
389 | If select() raises an exception due to EINTR, we should just | |
390 | select() again. | |
391 | ||
392 | If the queried address is a multicast address, then don't | |
393 | check that the address of the response is the same as the | |
394 | address queried. | |
395 | ||
396 | NAPTR comparisons didn't compare the preference field due to a | |
397 | typo. | |
398 | ||
399 | Testing of whether a Windows NIC is enabled now works on Vista | |
400 | thanks to code contributed by Paul Marks. | |
401 | ||
402 | New since 1.4.0: | |
403 | ||
404 | Answer objects now support more of the python sequence | |
405 | protocol, forwarding the requests to the answer rrset. | |
406 | E.g. "for a in answer" is equivalent to "for a in | |
407 | answer.rrset", "answer[i]" is equivalent to "answer.rrset[i]", | |
408 | and "answer[i:j]" is equivalent to "answer.rrset[i:j]". | |
409 | ||
410 | Making requests using EDNS, including indicating DNSSEC awareness, | |
411 | is now easier. For example, you can now say: | |
412 | ||
413 | q = dns.message.make_query('www.dnspython.org', 'MX', | |
414 | want_dnssec=True) | |
415 | ||
416 | dns.query.xfr() can now be used for IXFR. | |
417 | ||
418 | Support has been added for the DHCID, IPSECKEY, and SPF RR types. | |
419 | ||
420 | UDP messages from unexpected sources can now be ignored by | |
421 | setting ignore_unexpected to True when calling dns.query.udp. | |
422 | ||
423 | Bugs fixed since 1.4.0: | |
424 | ||
425 | If /etc/resolv.conf didn't exist, we raised an exception | |
426 | instead of simply using the default resolver configuration. | |
427 | ||
428 | In dns.resolver.Resolver._config_win32_fromkey(), we were | |
429 | passing the wrong variable to self._config_win32_search(). | |
430 | ||
431 | New since 1.3.5: | |
432 | ||
433 | You can now convert E.164 numbers to/from their ENUM name | |
434 | forms: | |
435 | ||
436 | >>> import dns.e164 | |
437 | >>> n = dns.e164.from_e164("+1 555 1212") | |
438 | >>> n | |
439 | <DNS name 2.1.2.1.5.5.5.1.e164.arpa.> | |
440 | >>> dns.e164.to_e164(n) | |
441 | '+15551212' | |
442 | ||
443 | You can now convert IPv4 and IPv6 address to/from their | |
444 | corresponding DNS reverse map names: | |
445 | ||
446 | >>> import dns.reversename | |
447 | >>> n = dns.reversename.from_address("127.0.0.1") | |
448 | >>> n | |
449 | <DNS name 1.0.0.127.in-addr.arpa.> | |
450 | >>> dns.reversename.to_address(n) | |
451 | '127.0.0.1' | |
452 | ||
453 | You can now convert between Unicode strings and their IDN ACE | |
454 | form: | |
455 | ||
456 | >>> n = dns.name.from_text(u'les-\u00e9l\u00e8ves.example.') | |
457 | >>> n | |
458 | <DNS name xn--les-lves-50ai.example.> | |
459 | >>> n.to_unicode() | |
460 | u'les-\xe9l\xe8ves.example.' | |
461 | ||
462 | The origin parameter to dns.zone.from_text() and dns.zone.to_text() | |
463 | is now optional. If not specified, the origin will be taken from | |
464 | the first $ORIGIN statement in the master file. | |
465 | ||
466 | Sanity checking of a zone can be disabled; this is useful when | |
467 | working with files which are zone fragments. | |
468 | ||
469 | Bugs fixed since 1.3.5: | |
470 | ||
471 | The correct delimiter was not used when retrieving the | |
472 | list of nameservers from the registry in certain versions of | |
473 | windows. | |
474 | ||
475 | The floating-point version of latitude and longitude in LOC RRs | |
476 | (float_latitude and float_longitude) had incorrect signs for | |
477 | south latitudes and west longitudes. | |
478 | ||
479 | BIND 8 TTL syntax is now accepted in all TTL-like places (i.e. | |
480 | SOA fields refresh, retry, expire, and minimum; SIG/RRSIG | |
481 | field original_ttl). | |
482 | ||
483 | TTLs are now bounds checked when their text form is parsed, | |
484 | and their values must be in the closed interval [0, 2^31 - 1]. | |
485 | ||
486 | New since 1.3.4: | |
487 | ||
488 | In the resolver, if time goes backward a little bit, ignore | |
489 | it. | |
490 | ||
491 | zone_for_name() has been added to the resolver module. It | |
492 | returns the zone which is authoritative for the specified | |
493 | name, which is handy for dynamic update. E.g. | |
494 | ||
495 | import dns.resolver | |
496 | print dns.resolver.zone_for_name('www.dnspython.org') | |
497 | ||
498 | will output "dnspython.org." and | |
499 | ||
500 | print dns.resolver.zone_for_name('a.b.c.d.e.f.example.') | |
501 | ||
502 | will output ".". | |
503 | ||
504 | The default resolver can be fetched with the | |
505 | get_default_resolver() method. | |
506 | ||
507 | You can now get the parent (immediate superdomain) of a name | |
508 | by using the parent() method. | |
509 | ||
510 | Zone.iterate_rdatasets() and Zone.iterate_rdatas() now have | |
511 | a default rdtype of dns.rdatatype.ANY like the documentation | |
512 | says. | |
513 | ||
514 | A Dynamic DNS example, ddns.py, has been added. | |
515 | ||
516 | New since 1.3.3: | |
517 | ||
518 | The source address and port may now be specified when calling | |
519 | dns.query.{udp,tcp,xfr}. | |
520 | ||
521 | The resolver now does exponential backoff each time it runs | |
522 | through all of the nameservers. | |
523 | ||
524 | Rcodes which indicate a nameserver is likely to be a | |
525 | "permanent failure" for a query cause the nameserver to be removed | |
526 | from the mix for that query. | |
527 | ||
528 | New since 1.3.2: | |
529 | ||
530 | dns.message.Message.find_rrset() now uses an index, vastly | |
531 | improving the from_wire() performance of large messages such | |
532 | as zone transfers. | |
533 | ||
534 | Added dns.message.make_response(), which creates a skeletal | |
535 | response for the specified query. | |
536 | ||
537 | Added opcode() and set_opcode() convenience methods to the | |
538 | dns.message.Message class. Added the request_payload | |
539 | attribute to the Message class. | |
540 | ||
541 | The 'file' parameter of dns.name.Name.to_wire() is now | |
542 | optional; if omitted, the wire form will be returned as the | |
543 | value of the function. | |
544 | ||
545 | dns.zone.from_xfr() in relativization mode incorrectly set | |
546 | zone.origin to the empty name. | |
547 | ||
548 | The masterfile parser incorrectly rejected TXT records where a | |
549 | value was not quoted. | |
550 | ||
551 | New since 1.3.1: | |
552 | ||
553 | The NSEC format doesn't allow specifying types by number, so | |
554 | we shouldn't either. (Using the unknown type format is still | |
555 | OK though.) | |
556 | ||
557 | The resolver wasn't catching dns.exception.Timeout, so a timeout | |
558 | erroneously caused the whole resolution to fail instead of just | |
559 | going on to the next server. | |
560 | ||
561 | The renderer module didn't import random, causing an exception | |
562 | to be raised if a query id wasn't provided when a Renderer was | |
563 | created. | |
564 | ||
565 | The conversion of LOC milliseconds values from text to binary was | |
566 | incorrect if the length of the milliseconds string was not 3. | |
567 | ||
568 | New since 1.3.0: | |
569 | ||
570 | Added support for the SSHFP type. | |
571 | ||
572 | New since 1.2.0: | |
573 | ||
574 | Added support for new DNSSEC types RRSIG, NSEC, and DNSKEY. | |
575 | ||
576 | This release fixes all known bugs. | |
577 | ||
578 | See the ChangeLog file for more detailed information on changes since | |
579 | the prior release. | |
580 | ||
581 | ||
582 | ## REQUIREMENTS | |
583 | ||
584 | Python 2.6 or later. | |
585 | ||
586 | ||
587 | ## HOME PAGE | |
588 | ||
589 | For the latest in releases, documentation, and information, visit the | |
590 | dnspython home page at | |
591 | ||
592 | http://www.dnspython.org/ | |
593 | ||
594 | ||
595 | ||
596 | ## DOCUMENTATION | |
597 | ||
598 | Documentation is sparse at the moment. Use pydoc, or read the HTML | |
599 | documentation at the dnspython home page, or download the HTML | |
600 | documentation. | |
601 | ||
602 | ||
603 | ## BUG REPORTS | |
604 | ||
605 | Bug reports may be sent to bugs@dnspython.org | |
606 | ||
607 | ||
608 | ## MAILING LISTS | |
609 | ||
610 | A number of mailing lists are available. Visit the dnspython home | |
611 | page to subscribe or unsubscribe. |
42 | 42 | @type otype: int |
43 | 43 | @param wire: The wire-format message |
44 | 44 | @type wire: string |
45 | @param current: The offet in wire of the beginning of the rdata. | |
45 | @param current: The offset in wire of the beginning of the rdata. | |
46 | 46 | @type current: int |
47 | 47 | @param olen: The length of the wire-format option data |
48 | 48 | @type olen: int |
139 | 139 | @type otype: int |
140 | 140 | @param wire: The wire-format message |
141 | 141 | @type wire: string |
142 | @param current: The offet in wire of the beginning of the rdata. | |
142 | @param current: The offset in wire of the beginning of the rdata. | |
143 | 143 | @type current: int |
144 | 144 | @param olen: The length of the wire-format option data |
145 | 145 | @type olen: int |
33 | 33 | In the new mode *args has to be empty and all kwargs has to exactly match |
34 | 34 | set in class variable self.supp_kwargs. All kwargs are stored inside |
35 | 35 | self.kwargs and used in new __str__ implementation to construct |
36 | formated message based on self.fmt string. | |
36 | formatted message based on self.fmt string. | |
37 | 37 | |
38 | 38 | In the simplest case it is enough to override supp_kwargs and fmt |
39 | 39 | class variables to get nice parametrized messages. |
120 | 120 | |
121 | 121 | """The DNS operation timed out.""" |
122 | 122 | supp_kwargs = set(['timeout']) |
123 | fmt = "%s after {timeout} seconds" % __doc__[:-1] | |
123 | fmt = "The DNS operation timed out after {timeout} seconds" |
57 | 57 | |
58 | 58 | class BadEDNS(dns.exception.FormError): |
59 | 59 | |
60 | """OPT record occured somewhere other than the start of | |
60 | """OPT record occurred somewhere other than the start of | |
61 | 61 | the additional data section.""" |
62 | 62 | |
63 | 63 | |
64 | 64 | class BadTSIG(dns.exception.FormError): |
65 | 65 | |
66 | """A TSIG record occured somewhere other than the end of | |
66 | """A TSIG record occurred somewhere other than the end of | |
67 | 67 | the additional data section.""" |
68 | 68 | |
69 | 69 | |
1042 | 1042 | |
1043 | 1043 | |
1044 | 1044 | def make_query(qname, rdtype, rdclass=dns.rdataclass.IN, use_edns=None, |
1045 | want_dnssec=False, ednsflags=0, payload=1280, | |
1045 | want_dnssec=False, ednsflags=None, payload=None, | |
1046 | 1046 | request_payload=None, options=None): |
1047 | 1047 | """Make a query message. |
1048 | 1048 | |
1049 | 1049 | The query name, type, and class may all be specified either |
1050 | 1050 | as objects of the appropriate type, or as strings. |
1051 | 1051 | |
1052 | The query will have a randomly choosen query id, and its DNS flags | |
1052 | The query will have a randomly chosen query id, and its DNS flags | |
1053 | 1053 | will be set to dns.flags.RD. |
1054 | 1054 | |
1055 | 1055 | @param qname: The query name. |
1087 | 1087 | m.flags |= dns.flags.RD |
1088 | 1088 | m.find_rrset(m.question, qname, rdclass, rdtype, create=True, |
1089 | 1089 | force_unique=True) |
1090 | m.use_edns(use_edns, ednsflags, payload, request_payload, options) | |
1090 | # only pass keywords on to use_edns if they have been set to a | |
1091 | # non-None value. Setting a field will turn EDNS on if it hasn't | |
1092 | # been configured. | |
1093 | kwargs = {} | |
1094 | if ednsflags is not None: | |
1095 | kwargs['ednsflags'] = ednsflags | |
1096 | if use_edns is None: | |
1097 | use_edns = 0 | |
1098 | if payload is not None: | |
1099 | kwargs['payload'] = payload | |
1100 | if use_edns is None: | |
1101 | use_edns = 0 | |
1102 | if request_payload is not None: | |
1103 | kwargs['request_payload'] = request_payload | |
1104 | if use_edns is None: | |
1105 | use_edns = 0 | |
1106 | if options is not None: | |
1107 | kwargs['options'] = options | |
1108 | if use_edns is None: | |
1109 | use_edns = 0 | |
1110 | kwargs['edns'] = use_edns | |
1111 | m.use_edns(**kwargs) | |
1091 | 1112 | m.want_dnssec(want_dnssec) |
1092 | 1113 | return m |
1093 | 1114 |
225 | 225 | def fullcompare(self, other): |
226 | 226 | """Compare two names, returning a 3-tuple (relation, order, nlabels). |
227 | 227 | |
228 | I{relation} describes the relation ship beween the names, | |
228 | I{relation} describes the relation ship between the names, | |
229 | 229 | and is one of: dns.name.NAMERELN_NONE, |
230 | 230 | dns.name.NAMERELN_SUPERDOMAIN, dns.name.NAMERELN_SUBDOMAIN, |
231 | 231 | dns.name.NAMERELN_EQUAL, or dns.name.NAMERELN_COMMONANCESTOR |
378 | 378 | def to_unicode(self, omit_final_dot=False): |
379 | 379 | """Convert name to Unicode text format. |
380 | 380 | |
381 | IDN ACE lables are converted to Unicode. | |
381 | IDN ACE labels are converted to Unicode. | |
382 | 382 | |
383 | 383 | @param omit_final_dot: If True, don't emit the final dot (denoting the |
384 | 384 | root label) for absolute names. The default is False. |
586 | 586 | def from_unicode(text, origin=root): |
587 | 587 | """Convert unicode text into a Name object. |
588 | 588 | |
589 | Lables are encoded in IDN ACE form. | |
589 | Labels are encoded in IDN ACE form. | |
590 | 590 | |
591 | 591 | @rtype: dns.name.Name object |
592 | 592 | """ |
263 | 263 | A Timeout exception will be raised if the operation is not completed |
264 | 264 | by the expiration time. |
265 | 265 | """ |
266 | s = '' | |
266 | s = b'' | |
267 | 267 | while count > 0: |
268 | 268 | _wait_for_readable(sock, expiration) |
269 | 269 | n = sock.recv(count) |
270 | if n == '': | |
270 | if n == b'': | |
271 | 271 | raise EOFError |
272 | 272 | count = count - len(n) |
273 | 273 | s = s + n |
291 | 291 | s.connect(address) |
292 | 292 | except socket.error: |
293 | 293 | (ty, v) = sys.exc_info()[:2] |
294 | if v[0] != errno.EINPROGRESS and \ | |
295 | v[0] != errno.EWOULDBLOCK and \ | |
296 | v[0] != errno.EALREADY: | |
294 | ||
295 | if hasattr(v, 'errno'): | |
296 | v_err = v.errno | |
297 | else: | |
298 | v_err = v[0] | |
299 | if v_err not in [errno.EINPROGRESS, errno.EWOULDBLOCK, errno.EALREADY]: | |
297 | 300 | raise v |
298 | 301 | |
299 | 302 |
61 | 61 | def from_text(text): |
62 | 62 | """Convert text into an rcode. |
63 | 63 | |
64 | @param text: the texual rcode | |
64 | @param text: the textual rcode | |
65 | 65 | @type text: string |
66 | 66 | @raises UnknownRcode: the rcode is unknown |
67 | 67 | @rtype: int |
285 | 285 | @type rdtype: int |
286 | 286 | @param wire: The wire-format message |
287 | 287 | @type wire: string |
288 | @param current: The offet in wire of the beginning of the rdata. | |
288 | @param current: The offset in wire of the beginning of the rdata. | |
289 | 289 | @type current: int |
290 | 290 | @param rdlen: The length of the wire-format rdata |
291 | 291 | @type rdlen: int |
450 | 450 | @type rdtype: int |
451 | 451 | @param wire: The wire-format message |
452 | 452 | @type wire: string |
453 | @param current: The offet in wire of the beginning of the rdata. | |
453 | @param current: The offset in wire of the beginning of the rdata. | |
454 | 454 | @type current: int |
455 | 455 | @param rdlen: The length of the wire-format rdata |
456 | 456 | @type rdlen: int |
81 | 81 | HIP = 55 |
82 | 82 | CDS = 59 |
83 | 83 | CDNSKEY = 60 |
84 | CSYNC = 62 | |
84 | 85 | SPF = 99 |
85 | 86 | UNSPEC = 103 |
86 | 87 | EUI48 = 108 |
150 | 151 | 'HIP': HIP, |
151 | 152 | 'CDS': CDS, |
152 | 153 | 'CDNSKEY': CDNSKEY, |
154 | 'CSYNC': CSYNC, | |
153 | 155 | 'SPF': SPF, |
154 | 156 | 'UNSPEC': UNSPEC, |
155 | 157 | 'EUI48': EUI48, |
0 | # Copyright (C) 2004-2007, 2009-2011, 2016 Nominum, Inc. | |
1 | # | |
2 | # Permission to use, copy, modify, and distribute this software and its | |
3 | # documentation for any purpose with or without fee is hereby granted, | |
4 | # provided that the above copyright notice and this permission notice | |
5 | # appear in all copies. | |
6 | # | |
7 | # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES | |
8 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
9 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR | |
10 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
11 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
12 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT | |
13 | # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
14 | ||
15 | import struct | |
16 | ||
17 | import dns.exception | |
18 | import dns.rdata | |
19 | import dns.rdatatype | |
20 | import dns.name | |
21 | from dns._compat import xrange | |
22 | ||
23 | class CSYNC(dns.rdata.Rdata): | |
24 | ||
25 | """CSYNC record | |
26 | ||
27 | @ivar serial: the SOA serial number | |
28 | @type serial: int | |
29 | @ivar flags: the CSYNC flags | |
30 | @type flags: int | |
31 | @ivar windows: the windowed bitmap list | |
32 | @type windows: list of (window number, string) tuples""" | |
33 | ||
34 | __slots__ = ['serial', 'flags', 'windows'] | |
35 | ||
36 | def __init__(self, rdclass, rdtype, serial, flags, windows): | |
37 | super(CSYNC, self).__init__(rdclass, rdtype) | |
38 | self.serial = serial | |
39 | self.flags = flags | |
40 | self.windows = windows | |
41 | ||
42 | def to_text(self, origin=None, relativize=True, **kw): | |
43 | text = '' | |
44 | for (window, bitmap) in self.windows: | |
45 | bits = [] | |
46 | for i in xrange(0, len(bitmap)): | |
47 | byte = bitmap[i] | |
48 | for j in xrange(0, 8): | |
49 | if byte & (0x80 >> j): | |
50 | bits.append(dns.rdatatype.to_text(window * 256 + | |
51 | i * 8 + j)) | |
52 | text += (' ' + ' '.join(bits)) | |
53 | return '%d %d%s' % (self.serial, self.flags, text) | |
54 | ||
55 | @classmethod | |
56 | def from_text(cls, rdclass, rdtype, tok, origin=None, relativize=True): | |
57 | serial = tok.get_uint32() | |
58 | flags = tok.get_uint16() | |
59 | rdtypes = [] | |
60 | while 1: | |
61 | token = tok.get().unescape() | |
62 | if token.is_eol_or_eof(): | |
63 | break | |
64 | nrdtype = dns.rdatatype.from_text(token.value) | |
65 | if nrdtype == 0: | |
66 | raise dns.exception.SyntaxError("CSYNC with bit 0") | |
67 | if nrdtype > 65535: | |
68 | raise dns.exception.SyntaxError("CSYNC with bit > 65535") | |
69 | rdtypes.append(nrdtype) | |
70 | rdtypes.sort() | |
71 | window = 0 | |
72 | octets = 0 | |
73 | prior_rdtype = 0 | |
74 | bitmap = bytearray(b'\0' * 32) | |
75 | windows = [] | |
76 | for nrdtype in rdtypes: | |
77 | if nrdtype == prior_rdtype: | |
78 | continue | |
79 | prior_rdtype = nrdtype | |
80 | new_window = nrdtype // 256 | |
81 | if new_window != window: | |
82 | windows.append((window, bitmap[0:octets])) | |
83 | bitmap = bytearray(b'\0' * 32) | |
84 | window = new_window | |
85 | offset = nrdtype % 256 | |
86 | byte = offset // 8 | |
87 | bit = offset % 8 | |
88 | octets = byte + 1 | |
89 | bitmap[byte] = bitmap[byte] | (0x80 >> bit) | |
90 | ||
91 | windows.append((window, bitmap[0:octets])) | |
92 | return cls(rdclass, rdtype, serial, flags, windows) | |
93 | ||
94 | def to_wire(self, file, compress=None, origin=None): | |
95 | file.write(struct.pack('!IH', self.serial, self.flags)) | |
96 | for (window, bitmap) in self.windows: | |
97 | file.write(struct.pack('!BB', window, len(bitmap))) | |
98 | file.write(bitmap) | |
99 | ||
100 | @classmethod | |
101 | def from_wire(cls, rdclass, rdtype, wire, current, rdlen, origin=None): | |
102 | if rdlen < 6: | |
103 | raise dns.exception.FormError("CSYNC too short") | |
104 | (serial, flags) = struct.unpack("!IH", wire[current: current + 6]) | |
105 | current += 6 | |
106 | rdlen -= 6 | |
107 | windows = [] | |
108 | while rdlen > 0: | |
109 | if rdlen < 3: | |
110 | raise dns.exception.FormError("CSYNC too short") | |
111 | window = wire[current] | |
112 | octets = wire[current + 1] | |
113 | if octets == 0 or octets > 32: | |
114 | raise dns.exception.FormError("bad CSYNC octets") | |
115 | current += 2 | |
116 | rdlen -= 2 | |
117 | if rdlen < octets: | |
118 | raise dns.exception.FormError("bad CSYNC bitmap length") | |
119 | bitmap = bytearray(wire[current: current + octets].unwrap()) | |
120 | current += octets | |
121 | rdlen -= octets | |
122 | windows.append((window, bitmap)) | |
123 | return cls(rdclass, rdtype, serial, flags, windows) |
54 | 54 | seconds = int(what // 1000) |
55 | 55 | what -= int(seconds * 1000) |
56 | 56 | what = int(what) |
57 | return (degrees * sign, minutes, seconds, what) | |
57 | return (degrees, minutes, seconds, what, sign) | |
58 | 58 | |
59 | 59 | |
60 | 60 | def _tuple_to_float(what): |
61 | if what[0] < 0: | |
62 | sign = -1 | |
63 | value = float(what[0]) * -1 | |
64 | else: | |
65 | sign = 1 | |
66 | value = float(what[0]) | |
61 | value = float(what[0]) | |
67 | 62 | value += float(what[1]) / 60.0 |
68 | 63 | value += float(what[2]) / 3600.0 |
69 | 64 | value += float(what[3]) / 3600000.0 |
70 | return sign * value | |
65 | return float(what[4]) * value | |
71 | 66 | |
72 | 67 | |
73 | 68 | def _encode_size(what, desc): |
92 | 87 | """LOC record |
93 | 88 | |
94 | 89 | @ivar latitude: latitude |
95 | @type latitude: (int, int, int, int) tuple specifying the degrees, minutes, | |
96 | seconds, and milliseconds of the coordinate. | |
90 | @type latitude: (int, int, int, int, sign) tuple specifying the degrees, minutes, | |
91 | seconds, milliseconds, and sign of the coordinate. | |
97 | 92 | @ivar longitude: longitude |
98 | @type longitude: (int, int, int, int) tuple specifying the degrees, | |
99 | minutes, seconds, and milliseconds of the coordinate. | |
93 | @type longitude: (int, int, int, int, sign) tuple specifying the degrees, | |
94 | minutes, seconds, milliseconds, and sign of the coordinate. | |
100 | 95 | @ivar altitude: altitude |
101 | 96 | @type altitude: float |
102 | 97 | @ivar size: size of the sphere |
138 | 133 | self.vertical_precision = float(vprec) |
139 | 134 | |
140 | 135 | def to_text(self, origin=None, relativize=True, **kw): |
141 | if self.latitude[0] > 0: | |
136 | if self.latitude[4] > 0: | |
142 | 137 | lat_hemisphere = 'N' |
143 | 138 | lat_degrees = self.latitude[0] |
144 | 139 | else: |
145 | 140 | lat_hemisphere = 'S' |
146 | 141 | lat_degrees = -1 * self.latitude[0] |
147 | if self.longitude[0] > 0: | |
142 | if self.longitude[4] > 0: | |
148 | 143 | long_hemisphere = 'E' |
149 | 144 | long_degrees = self.longitude[0] |
150 | 145 | else: |
151 | 146 | long_hemisphere = 'W' |
152 | 147 | long_degrees = -1 * self.longitude[0] |
153 | 148 | text = "%d %d %d.%03d %s %d %d %d.%03d %s %0.2fm" % ( |
154 | lat_degrees, self.latitude[1], self.latitude[2], self.latitude[3], | |
155 | lat_hemisphere, long_degrees, self.longitude[1], self.longitude[2], | |
156 | self.longitude[3], long_hemisphere, self.altitude / 100.0 | |
149 | self.latitude[0], self.latitude[1], | |
150 | self.latitude[2], self.latitude[3], lat_hemisphere, | |
151 | self.longitude[0], self.longitude[1], self.longitude[2], | |
152 | self.longitude[3], long_hemisphere, | |
153 | self.altitude / 100.0 | |
157 | 154 | ) |
158 | 155 | |
159 | 156 | # do not print default values |
168 | 165 | |
169 | 166 | @classmethod |
170 | 167 | def from_text(cls, rdclass, rdtype, tok, origin=None, relativize=True): |
171 | latitude = [0, 0, 0, 0] | |
172 | longitude = [0, 0, 0, 0] | |
168 | latitude = [0, 0, 0, 0, 1] | |
169 | longitude = [0, 0, 0, 0, 1] | |
173 | 170 | size = _default_size |
174 | 171 | hprec = _default_hprec |
175 | 172 | vprec = _default_vprec |
203 | 200 | latitude[2] = int(t) |
204 | 201 | t = tok.get_string() |
205 | 202 | if t == 'S': |
206 | latitude[0] *= -1 | |
203 | latitude[4] = -1 | |
207 | 204 | elif t != 'N': |
208 | 205 | raise dns.exception.SyntaxError('bad latitude hemisphere value') |
209 | 206 | |
236 | 233 | longitude[2] = int(t) |
237 | 234 | t = tok.get_string() |
238 | 235 | if t == 'W': |
239 | longitude[0] *= -1 | |
236 | longitude[4] = -1 | |
240 | 237 | elif t != 'E': |
241 | 238 | raise dns.exception.SyntaxError('bad longitude hemisphere value') |
242 | 239 | |
269 | 266 | size, hprec, vprec) |
270 | 267 | |
271 | 268 | def to_wire(self, file, compress=None, origin=None): |
272 | if self.latitude[0] < 0: | |
273 | sign = -1 | |
274 | degrees = long(-1 * self.latitude[0]) | |
275 | else: | |
276 | sign = 1 | |
277 | degrees = long(self.latitude[0]) | |
278 | milliseconds = (degrees * 3600000 + | |
269 | milliseconds = (self.latitude[0] * 3600000 + | |
279 | 270 | self.latitude[1] * 60000 + |
280 | 271 | self.latitude[2] * 1000 + |
281 | self.latitude[3]) * sign | |
272 | self.latitude[3]) * self.latitude[4] | |
282 | 273 | latitude = long(0x80000000) + milliseconds |
283 | if self.longitude[0] < 0: | |
284 | sign = -1 | |
285 | degrees = long(-1 * self.longitude[0]) | |
286 | else: | |
287 | sign = 1 | |
288 | degrees = long(self.longitude[0]) | |
289 | milliseconds = (degrees * 3600000 + | |
274 | milliseconds = (self.longitude[0] * 3600000 + | |
290 | 275 | self.longitude[1] * 60000 + |
291 | 276 | self.longitude[2] * 1000 + |
292 | self.longitude[3]) * sign | |
277 | self.longitude[3]) * self.longitude[4] | |
293 | 278 | longitude = long(0x80000000) + milliseconds |
294 | 279 | altitude = long(self.altitude) + long(10000000) |
295 | 280 | size = _encode_size(self.size, "size") |
87 | 87 | then L{dns.exception.TooBig} will be raised. |
88 | 88 | @type max_size: int |
89 | 89 | @param origin: the origin to use when rendering relative names |
90 | @type origin: dns.name.Namem or None. | |
90 | @type origin: dns.name.Name or None. | |
91 | 91 | """ |
92 | 92 | |
93 | 93 | self.output = BytesIO() |
42 | 42 | from ._compat import xrange, string_types |
43 | 43 | |
44 | 44 | if sys.platform == 'win32': |
45 | import _winreg | |
46 | ||
45 | try: | |
46 | import winreg as _winreg | |
47 | except ImportError: | |
48 | import _winreg | |
47 | 49 | |
48 | 50 | class NXDOMAIN(dns.exception.DNSException): |
49 | 51 | |
79 | 81 | class NoAnswer(dns.exception.DNSException): |
80 | 82 | |
81 | 83 | """The DNS response does not contain an answer to the question.""" |
82 | fmt = '%s: {query}' % __doc__[:-1] | |
84 | fmt = 'The DNS response does not contain an answer ' + \ | |
85 | 'to the question: {query}' | |
83 | 86 | supp_kwargs = set(['response']) |
84 | 87 | |
85 | 88 | def _fmt_kwargs(self, **kwargs): |
24 | 24 | import dns.name |
25 | 25 | from ._compat import long, string_types |
26 | 26 | |
27 | ||
28 | 27 | class BadTime(dns.exception.DNSException): |
29 | 28 | |
30 | 29 | """The current time is not within the TSIG's validity time.""" |
67 | 66 | HMAC_SHA256 = dns.name.from_text("hmac-sha256") |
68 | 67 | HMAC_SHA384 = dns.name.from_text("hmac-sha384") |
69 | 68 | HMAC_SHA512 = dns.name.from_text("hmac-sha512") |
69 | ||
70 | _hashes = { | |
71 | HMAC_SHA224: 'SHA224', | |
72 | HMAC_SHA256: 'SHA256', | |
73 | HMAC_SHA384: 'SHA384', | |
74 | HMAC_SHA512: 'SHA512', | |
75 | HMAC_SHA1: 'SHA1', | |
76 | HMAC_MD5: 'MD5', | |
77 | } | |
70 | 78 | |
71 | 79 | default_algorithm = HMAC_MD5 |
72 | 80 | |
201 | 209 | algorithm = dns.name.from_text(algorithm) |
202 | 210 | |
203 | 211 | try: |
204 | return (algorithm.to_digestable(), dns.hash.hashes[algorithm]) | |
212 | return (algorithm.to_digestable(), dns.hash.hashes[_hashes[algorithm]]) | |
205 | 213 | except KeyError: |
206 | 214 | raise NotImplementedError("TSIG algorithm " + str(algorithm) + |
207 | 215 | " is not supported") |
15 | 15 | """dnspython release version information.""" |
16 | 16 | |
17 | 17 | MAJOR = 1 |
18 | MINOR = 13 | |
18 | MINOR = 14 | |
19 | 19 | MICRO = 0 |
20 | 20 | RELEASELEVEL = 0x0f |
21 | 21 | SERIAL = 0 |
89 | 89 | @param rdclass: The zone's rdata class; the default is class IN. |
90 | 90 | @type rdclass: int""" |
91 | 91 | |
92 | if isinstance(origin, string_types): | |
93 | origin = dns.name.from_text(origin) | |
94 | elif not isinstance(origin, dns.name.Name): | |
95 | raise ValueError("origin parameter must be convertable to a " | |
96 | "DNS name") | |
97 | if not origin.is_absolute(): | |
98 | raise ValueError("origin parameter must be an absolute name") | |
92 | if origin is not None: | |
93 | if isinstance(origin, string_types): | |
94 | origin = dns.name.from_text(origin) | |
95 | elif not isinstance(origin, dns.name.Name): | |
96 | raise ValueError("origin parameter must be convertible to a " | |
97 | "DNS name") | |
98 | if not origin.is_absolute(): | |
99 | raise ValueError("origin parameter must be an absolute name") | |
99 | 100 | self.origin = origin |
100 | 101 | self.rdclass = rdclass |
101 | 102 | self.nodes = {} |
126 | 127 | if isinstance(name, string_types): |
127 | 128 | name = dns.name.from_text(name, None) |
128 | 129 | elif not isinstance(name, dns.name.Name): |
129 | raise KeyError("name parameter must be convertable to a DNS name") | |
130 | raise KeyError("name parameter must be convertible to a DNS name") | |
130 | 131 | if name.is_absolute(): |
131 | 132 | if not name.is_subdomain(self.origin): |
132 | 133 | raise KeyError( |
0 | 0 | Metadata-Version: 1.1 |
1 | 1 | Name: dnspython |
2 | Version: 1.13.0 | |
2 | Version: 1.14.0 | |
3 | 3 | Summary: DNS toolkit |
4 | 4 | Home-page: http://www.dnspython.org |
5 | 5 | Author: Bob Halley |
6 | 6 | Author-email: halley@dnspython.org |
7 | 7 | License: BSD-like |
8 | Download-URL: http://www.dnspython.org/kits/1.13.0/dnspython-1.13.0.tar.gz | |
8 | Download-URL: http://www.dnspython.org/kits/1.14.0/dnspython-1.14.0.tar.gz | |
9 | 9 | Description: dnspython is a DNS toolkit for Python. It supports almost all |
10 | 10 | record types. It can be used for queries, zone transfers, and dynamic |
11 | 11 | updates. It supports TSIG authenticated messages and EDNS0. |
0 | 0 | ChangeLog |
1 | 1 | LICENSE |
2 | 2 | MANIFEST.in |
3 | README.md | |
3 | 4 | setup.py |
4 | 5 | dns/__init__.py |
5 | 6 | dns/_compat.py |
51 | 52 | dns/rdtypes/ANY/CDS.py |
52 | 53 | dns/rdtypes/ANY/CERT.py |
53 | 54 | dns/rdtypes/ANY/CNAME.py |
55 | dns/rdtypes/ANY/CSYNC.py | |
54 | 56 | dns/rdtypes/ANY/DLV.py |
55 | 57 | dns/rdtypes/ANY/DNAME.py |
56 | 58 | dns/rdtypes/ANY/DNSKEY.py |
198 | 198 | p.print_help() |
199 | 199 | sys.exit(64) |
200 | 200 | |
201 | # Open file desriptors | |
201 | # Open file descriptors | |
202 | 202 | if not opts.use_vc: |
203 | 203 | oldn, newn = args |
204 | 204 | else: |
17 | 17 | import sys |
18 | 18 | from setuptools import setup |
19 | 19 | |
20 | version = '1.13.0' | |
20 | version = '1.14.0' | |
21 | 21 | |
22 | 22 | kwargs = { |
23 | 23 | 'name' : 'dnspython', |
12 | 12 | ; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
13 | 13 | ; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
14 | 14 | |
15 | ; $Id: example,v 1.13 2004/03/19 00:06:37 halley Exp $ | |
15 | ; $Id: example 265924 2016-05-20 18:26:42Z bwelling $ | |
16 | 16 | |
17 | 17 | $ORIGIN . |
18 | 18 | $TTL 300 ; 5 minutes |
19 | example IN SOA ns1.example. hostmaster.example. ( | |
20 | 1 ; serial | |
21 | 2000 ; refresh (2000 seconds) | |
22 | 2000 ; retry (2000 seconds) | |
23 | 1814400 ; expire (3 weeks) | |
24 | 3600 ; minimum (1 hour) | |
25 | ) | |
19 | example IN SOA ns1.example. hostmaster.example. 1 2 3 4 5 | |
26 | 20 | example. NS ns1.example. |
27 | 21 | ns1.example. A 10.53.0.1 |
28 | 22 | example. NS ns2.example. |
29 | 23 | ns2.example. A 10.53.0.2 |
30 | 24 | |
31 | 25 | $ORIGIN example. |
26 | @ NSEC3PARAM 1 1 12 aabbccdd | |
27 | @ NSEC3PARAM 1 1 12 - | |
32 | 28 | * MX 10 mail |
33 | 29 | a TXT "foo foo foo" |
34 | 30 | PTR foo.net. |
35 | ;; The next line not starting with ';;' is leading whitespace followed by | |
36 | ;; EOL. We want to treat that as if EOL had appeared alone. | |
37 | ||
38 | ;; The next line not starting with ';;' is leading whitespace followed by | |
39 | ;; a comment followed by EOL. We want to treat that as if EOL had appeared | |
40 | ;; alone. | |
41 | ; foo | |
42 | 31 | $TTL 3600 ; 1 hour |
43 | 32 | a01 A 0.0.0.0 |
44 | 33 | a02 A 255.255.255.255 |
45 | 34 | ;; |
46 | ;; XXXRTH dnspython doesn't currently implement A6, and since | |
47 | ;; A6 records are effectively dead, it may never do so. | |
48 | ;; | |
49 | ;;a601 A6 0 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | |
50 | ;; A6 64 ::ffff:ffff:ffff:ffff foo. | |
51 | ;; A6 127 ::1 foo. | |
52 | ;; A6 128 . | |
35 | ;a601 A6 0 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | |
36 | ; A6 64 ::ffff:ffff:ffff:ffff foo. | |
37 | ; A6 127 ::1 foo. | |
38 | ; A6 128 . | |
53 | 39 | aaaa01 AAAA ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff |
54 | 40 | aaaa02 AAAA ::1 |
55 | 41 | afsdb01 AFSDB 0 hostname |
58 | 44 | b CNAME foo.net. |
59 | 45 | c A 73.80.65.49 |
60 | 46 | $TTL 3600 ; 1 hour |
61 | cert01 CERT 65534 65535 PRIVATEOID ( | |
62 | MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45IkskceFGgi | |
63 | WCn/GxHhai6VAuHAoNUz4YoU1tVfSCSqQYn6//11U6Nl | |
64 | d80jEeC8aTrO+KKmCaY= ) | |
47 | cert01 CERT 65534 65535 PRIVATEOID MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45IkskceFGgi WCn/GxHhai6VAuHAoNUz4YoU1tVfSCSqQYn6//11U6Nl d80jEeC8aTrO+KKmCaY= | |
65 | 48 | cname01 CNAME cname-target. |
66 | 49 | cname02 CNAME cname-target |
67 | 50 | cname03 CNAME . |
51 | dhcid01 DHCID AAIBY2/AuCccgoJbsaxcQc9TUapptP69lOjxfNuVAA2kjEA= | |
52 | dhcid02 DHCID AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQdWL3b/NaiUDlW2No= | |
53 | dhcid03 DHCID AAABxLmlskllE0MVjd57zHcWmEH3pCQ6VytcKD//7es/deY= | |
68 | 54 | $TTL 300 ; 5 minutes |
69 | 55 | d A 73.80.65.49 |
70 | 56 | $TTL 3600 ; 1 hour |
71 | dhcid01 DHCID ( AAIBY2/AuCccgoJbsaxcQc9TUapptP69l | |
72 | OjxfNuVAA2kjEA= ) | |
73 | dhcid02 DHCID ( AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQdW | |
74 | L3b/NaiUDlW2No= ) | |
75 | dhcid03 DHCID ( AAABxLmlskllE0MVjd57zHcWmEH3pCQ6V | |
76 | ytcKD//7es/deY= ) | |
77 | 57 | dname01 DNAME dname-target. |
78 | 58 | dname02 DNAME dname-target |
79 | 59 | dname03 DNAME . |
100 | 80 | isdn02 ISDN "isdn-address" "subaddress" |
101 | 81 | isdn03 ISDN "isdn-address" |
102 | 82 | isdn04 ISDN "isdn-address" "subaddress" |
103 | ;; dnspython no longer supports old DNSSEC | |
104 | ;;key01 KEY 512 255 1 ( | |
105 | ;; AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR | |
106 | ;; yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 | |
107 | ;; GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o | |
108 | ;; jqf0BaqHT+8= ) | |
109 | ;;key02 KEY HOST|FLAG4 DNSSEC RSAMD5 ( | |
110 | ;; AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR | |
111 | ;; yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 | |
112 | ;; GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o | |
113 | ;; jqf0BaqHT+8= ) | |
83 | ;key01 KEY 512 255 1 AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o jqf0BaqHT+8= | |
84 | ;key02 KEY HOST|FLAG4 DNSSEC RSAMD5 AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o jqf0BaqHT+8= | |
114 | 85 | kx01 KX 10 kdc |
115 | 86 | kx02 KX 10 . |
116 | 87 | loc01 LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20m 2000m 20m |
117 | 88 | loc02 LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20m 2000m 20m |
118 | 89 | loc03 LOC 60 9 0.000 N 24 39 0.000 E 10.00m 90000000.00m 2000m 20m |
119 | loc04 LOC 60 9 1.5 N 24 39 0.000 E 10.00m 20m 2000m 20m | |
120 | loc05 LOC 60 9 1.51 N 24 39 0.000 E 10.00m 20m 2000m 20m | |
90 | loc04 LOC 60 9 1.5 N 24 39 0.000 E 10.00m 90000000.00m 2000m 20m | |
91 | loc05 LOC 60 9 1.51 N 24 39 0.000 E 10.00m 90000000.00m 2000m 20m | |
92 | loc06 LOC 60 9 1 N 24 39 0.000 E 10.00m 90000000.00m 2000m 20m | |
93 | loc07 LOC 0 9 1 N 24 39 0.000 E 10.00m 90000000.00m 2000m 20m | |
94 | loc08 LOC 0 9 1 S 24 39 0.000 E 10.00m 90000000.00m 2000m 20m | |
121 | 95 | ;; |
122 | 96 | ;; XXXRTH These are all obsolete and unused. dnspython doesn't implement |
123 | 97 | ;; them |
137 | 111 | NSAP-PTR . |
138 | 112 | nsap01 NSAP 0x47000580005a0000000001e133ffffff00016100 |
139 | 113 | nsap02 NSAP 0x47.000580005a0000000001e133ffffff000161.00 |
140 | ;;nxt01 NXT a.secure ( NS SOA MX SIG KEY LOC NXT ) | |
141 | ;;nxt02 NXT . ( NSAP-PTR NXT ) | |
142 | ;;nxt03 NXT . ( A ) | |
143 | ;;nxt04 NXT . ( 127 ) | |
114 | ;nxt01 NXT a.secure ( NS SOA MX SIG KEY LOC NXT ) | |
115 | ;nxt02 NXT . ( NSAP-PTR NXT ) | |
116 | ;nxt03 NXT . ( A ) | |
117 | ;nxt04 NXT . ( 127 ) | |
144 | 118 | ptr01 PTR example. |
145 | 119 | px01 PX 65535 foo. bar. |
146 | 120 | px02 PX 65535 . . |
154 | 128 | ns A 73.80.65.49 |
155 | 129 | $ORIGIN example. |
156 | 130 | $TTL 3600 ; 1 hour |
157 | ;;sig01 SIG NXT 1 3 3600 ( | |
158 | ;; 20200101000000 20030101000000 2143 foo | |
159 | ;; MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45IkskceFGgi | |
160 | ;; WCn/GxHhai6VAuHAoNUz4YoU1tVfSCSqQYn6//11U6Nl | |
161 | ;; d80jEeC8aTrO+KKmCaY= ) | |
131 | ;sig01 SIG NXT 1 3 3600 20200101000000 20030101000000 2143 foo MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45IkskceFGgi WCn/GxHhai6VAuHAoNUz4YoU1tVfSCSqQYn6//11U6Nl d80jEeC8aTrO+KKmCaY= | |
162 | 132 | srv01 SRV 0 0 0 . |
163 | 133 | srv02 SRV 65535 65535 65535 old-slow-box.example.com. |
164 | 134 | $TTL 301 ; 5 minutes 1 second |
165 | 135 | t A 73.80.65.49 |
166 | 136 | $TTL 3600 ; 1 hour |
167 | tlsa1 TLSA 3 1 1 a9cdf989b504fe5dca90c0d2167b6550570734f7c763e09fdf88904e06157065 | |
168 | tlsa2 TLSA 1 0 1 efddf0d915c7bdc5782c0881e1b2a95ad099fbdd06d7b1f77982d9364338d955 | |
169 | tlsa3 TLSA 1 0 2 81ee7f6c0ecc6b09b7785a9418f54432de630dd54dc6ee9e3c49de547708d236d4c413c3e97e44f969e635958aa410495844127c04883503e5b024cf7a8f6a94 | |
137 | tlsa1 TLSA 3 1 1 a9cdf989b504fe5dca90c0d2167b6550570734f7c763e09fdf88904e06157065 | |
138 | tlsa2 TLSA 1 0 1 efddf0d915c7bdc5782c0881e1b2a95ad099fbdd06d7b1f77982d9364338d955 | |
139 | tlsa3 TLSA 1 0 2 81ee7f6c0ecc6b09b7785a9418f54432de630dd54dc6ee9e3c49de547708d236d4c413c3e97e44f969e635958aa410495844127c04883503e5b024cf7a8f6a94 | |
170 | 140 | txt01 TXT "foo" |
171 | 141 | txt02 TXT "foo" "bar" |
172 | 142 | txt03 TXT "foo" |
191 | 161 | wks02 WKS 10.0.0.1 17 ( 0 1 2 53 ) |
192 | 162 | wks03 WKS 10.0.0.2 6 ( 65535 ) |
193 | 163 | x2501 X25 "123456789" |
194 | dlv01 DLV 12345 3 1 123456789abcdef67890123456789abcdef67890 | |
195 | 164 | ds01 DS 12345 3 1 123456789abcdef67890123456789abcdef67890 |
196 | cds01 CDS 12345 3 1 123456789abcdef67890123456789abcdef67890 | |
197 | 165 | apl01 APL 1:192.168.32.0/21 !1:192.168.38.0/28 |
198 | 166 | apl02 APL 1:224.0.0.0/4 2:FF00:0:0:0:0:0:0:0/8 |
199 | 167 | unknown2 TYPE999 \# 8 0a0000010a000001 |
200 | rrsig01 RRSIG NSEC 1 3 3600 20200101000000 20030101000000 2143 foo MxFcby9k/yvedMfQgKzhH5er0Mu/ vILz45IkskceFGgiWCn/GxHhai6V AuHAoNUz4YoU1tVfSCSqQYn6//11 U6Nld80jEeC8aTrO+KKmCaY= | |
201 | nsec01 NSEC a.secure. A MX RRSIG NSEC TYPE1234 | |
202 | nsec02 NSEC . NSAP-PTR NSEC | |
203 | nsec03 NSEC . NSEC TYPE65535 | |
204 | dnskey01 DNSKEY 512 255 1 ( | |
205 | AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR | |
206 | yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 | |
207 | GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o | |
208 | jqf0BaqHT+8= ) | |
209 | dnskey02 DNSKEY 257 3 RSAMD5 ( | |
210 | AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR | |
211 | yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 | |
212 | GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o | |
213 | jqf0BaqHT+8= ) | |
214 | cdnskey01 CDNSKEY 256 3 8 ( | |
215 | AwEAAbmiLgh411Pz3v3XCSBrvYf52A/Gv55ItN1NbOLH | |
216 | Cqt3Ec3p+VB/kQ87VjjMrycanZFnZT4l9uCFuYh21Ccy | |
217 | xVpcxExbM0UuhX5rJoDyeFSXoQlkHrB01osPl5Vri5Ym | |
218 | KtcmqGxZ9An0VSunohkyiX1SrNRZSdQnk9/pIHDe/c8D | |
219 | ) | |
220 | ; | |
221 | ; test known type using unknown RR syntax | |
222 | ; | |
223 | unknown3 A \# 4 7f000002 | |
168 | unknown3 A \# 4 7f000002 | |
169 | rrsig01 RRSIG NSEC 1 3 3600 20200101000000 20030101000000 2143 foo MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45IkskceFGgi WCn/GxHhai6VAuHAoNUz4YoU1tVfSCSqQYn6//11U6Nl d80jEeC8aTrO+KKmCaY= | |
170 | nsec01 NSEC a.secure A MX RRSIG NSEC TYPE1234 | |
171 | nsec02 NSEC . ( NSAP-PTR NSEC ) | |
172 | nsec03 NSEC . ( NSEC TYPE65535 ) | |
173 | nsec301 NSEC3 1 1 12 aabbccdd 2t7b4g4vsa5smi47k61mv5bv1a22bojr MX DNSKEY NS SOA NSEC3PARAM RRSIG | |
174 | nsec302 NSEC3 1 1 12 - 2t7b4g4vsa5smi47k61mv5bv1a22bojr MX DNSKEY NS SOA NSEC3PARAM RRSIG | |
175 | dnskey01 DNSKEY 512 255 1 AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o jqf0BaqHT+8= | |
176 | dnskey02 DNSKEY 257 3 RSAMD5 ( AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w0aR yzWZriO6i2odGWWQVucZqKVsENW91IOW4vqudngPZsY3 GvQ/xVA8/7pyFj6b7Esga60zyGW6LFe9r8n6paHrlG5o jqf0BaqHT+8= ) | |
224 | 177 | sshfp1 SSHFP 1 1 aa549bfe898489c02d1715d97d79c57ba2fa76ab |
225 | 178 | spf SPF "v=spf1 mx -all" |
226 | 179 | ipseckey01 IPSECKEY 10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== |
228 | 181 | ipseckey03 IPSECKEY 10 3 2 mygateway.example.com. AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== |
229 | 182 | ipseckey04 IPSECKEY 10 2 2 2001:0DB8:0:8002::2000:1 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== |
230 | 183 | ipseckey05 IPSECKEY 10 3 2 mygateway2 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== |
231 | nsec301 NSEC3 1 1 12 aabbccdd 2t7b4g4vsa5smi47k61mv5bv1a22bojr MX DNSKEY NS SOA NSEC3PARAM RRSIG | |
232 | nsec302 NSEC3 1 1 12 - 2t7b4g4vsa5smi47k61mv5bv1a22bojr MX DNSKEY NS SOA NSEC3PARAM RRSIG | |
233 | nsec3param01 NSEC3PARAM 1 1 12 aabbccdd | |
234 | nsec3param02 NSEC3PARAM 1 1 12 - | |
235 | hip01 HIP 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs1.example.com. rvs2 | |
184 | hip01 HIP 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D | |
185 | hip02 HIP 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs.example.com. | |
186 | hip03 HIP 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs1.example.com. rvs2.example.com. | |
187 | cds01 CDS 12345 3 1 123456789abcdef67890123456789abcdef67890 | |
188 | cdnskey01 CDNSKEY 256 3 8 ( AwEAAbmiLgh411Pz3v3XCSBrvYf52A/Gv55ItN1NbOLH Cqt3Ec3p+VB/kQ87VjjMrycanZFnZT4l9uCFuYh21Ccy xVpcxExbM0UuhX5rJoDyeFSXoQlkHrB01osPl5Vri5Ym KtcmqGxZ9An0VSunohkyiX1SrNRZSdQnk9/pIHDe/c8D ) | |
189 | uri01 URI 10 1 "ftp://ftp1.example.com/public" | |
190 | uri02 URI 10 1 "http://www.example.com/path" | |
236 | 191 | caa01 CAA 0 issue "ca.example.net" |
237 | 192 | caa02 CAA 0 iodef "mailto:security@example.com" |
238 | 193 | caa03 CAA 0 iodef "http://iodef.example.com/" |
239 | 194 | caa04 CAA 0 issue "ca.example.net; account=230123" |
240 | 195 | caa05 CAA 0 issue "ca.example.net; policy=ev" |
241 | 196 | caa06 CAA 128 tbs "Unknown" |
242 | uri0q URI 10 1 "http://www.example.com/" | |
197 | csync0 CSYNC 12345 0 A MX RRSIG NSEC TYPE1234 |
0 | @ 300 IN SOA ns1 hostmaster 1 2000 2000 1814400 3600 | |
0 | @ 300 IN SOA ns1 hostmaster 1 2 3 4 5 | |
1 | 1 | @ 300 IN NS ns1 |
2 | 2 | @ 300 IN NS ns2 |
3 | @ 300 IN NSEC3PARAM 1 1 12 aabbccdd | |
4 | @ 300 IN NSEC3PARAM 1 1 12 - | |
3 | 5 | * 300 IN MX 10 mail |
4 | 6 | a 300 IN TXT "foo foo foo" |
5 | 7 | a 300 IN PTR foo.net. |
25 | 27 | cname01 3600 IN CNAME cname-target. |
26 | 28 | cname02 3600 IN CNAME cname-target |
27 | 29 | cname03 3600 IN CNAME . |
30 | csync0 3600 IN CSYNC 12345 0 A MX RRSIG NSEC TYPE1234 | |
28 | 31 | d 300 IN A 73.80.65.49 |
29 | 32 | dhcid01 3600 IN DHCID AAIBY2/AuCccgoJbsaxcQc9TUapptP69 lOjxfNuVAA2kjEA= |
30 | 33 | dhcid02 3600 IN DHCID AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQd WL3b/NaiUDlW2No= |
31 | 34 | dhcid03 3600 IN DHCID AAABxLmlskllE0MVjd57zHcWmEH3pCQ6 VytcKD//7es/deY= |
32 | dlv01 3600 IN DLV 12345 3 1 123456789abcdef67890123456789abcdef67890 | |
33 | 35 | dname01 3600 IN DNAME dname-target. |
34 | 36 | dname02 3600 IN DNAME dname-target |
35 | 37 | dname03 3600 IN DNAME . |
48 | 50 | gpos01 3600 IN GPOS -22.6882 116.8652 250.0 |
49 | 51 | hinfo01 3600 IN HINFO "Generic PC clone" "NetBSD-1.4" |
50 | 52 | hinfo02 3600 IN HINFO "PC" "NetBSD" |
51 | hip01 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs1.example.com. rvs2 | |
53 | hip01 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D | |
54 | hip02 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs.example.com. | |
55 | hip03 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs1.example.com. rvs2.example.com. | |
52 | 56 | ipseckey01 3600 IN IPSECKEY 10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
53 | 57 | ipseckey02 3600 IN IPSECKEY 10 0 2 . AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
54 | 58 | ipseckey03 3600 IN IPSECKEY 10 3 2 mygateway.example.com. AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
63 | 67 | loc01 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m |
64 | 68 | loc02 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m |
65 | 69 | loc03 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m |
66 | loc04 3600 IN LOC 60 9 1.500 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m | |
67 | loc05 3600 IN LOC 60 9 1.510 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m | |
70 | loc04 3600 IN LOC 60 9 1.500 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
71 | loc05 3600 IN LOC 60 9 1.510 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
72 | loc06 3600 IN LOC 60 9 1.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
73 | loc07 3600 IN LOC 0 9 1.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
74 | loc08 3600 IN LOC 0 9 1.000 S 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
68 | 75 | mx01 3600 IN MX 10 mail |
69 | 76 | mx02 3600 IN MX 10 . |
70 | 77 | naptr01 3600 IN NAPTR 0 0 "" "" "" . |
75 | 82 | nsap-ptr01 3600 IN NSAP-PTR . |
76 | 83 | nsap01 3600 IN NSAP 0x47000580005a0000000001e133ffffff00016100 |
77 | 84 | nsap02 3600 IN NSAP 0x47000580005a0000000001e133ffffff00016100 |
78 | nsec01 3600 IN NSEC a.secure. A MX RRSIG NSEC TYPE1234 | |
85 | nsec01 3600 IN NSEC a.secure A MX RRSIG NSEC TYPE1234 | |
79 | 86 | nsec02 3600 IN NSEC . NSAP-PTR NSEC |
80 | 87 | nsec03 3600 IN NSEC . NSEC TYPE65535 |
81 | 88 | nsec301 3600 IN NSEC3 1 1 12 aabbccdd 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM |
82 | 89 | nsec302 3600 IN NSEC3 1 1 12 - 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM |
83 | nsec3param01 3600 IN NSEC3PARAM 1 1 12 aabbccdd | |
84 | nsec3param02 3600 IN NSEC3PARAM 1 1 12 - | |
85 | 90 | ptr01 3600 IN PTR @ |
86 | 91 | px01 3600 IN PX 65535 foo. bar. |
87 | 92 | px02 3600 IN PX 65535 . . |
118 | 123 | b.u 300 IN A 73.80.65.49 |
119 | 124 | unknown2 3600 IN TYPE999 \# 8 0a0000010a000001 |
120 | 125 | unknown3 3600 IN A 127.0.0.2 |
121 | uri0q 3600 IN URI 10 1 "http://www.example.com/" | |
126 | uri01 3600 IN URI 10 1 "ftp://ftp1.example.com/public" | |
127 | uri02 3600 IN URI 10 1 "http://www.example.com/path" | |
122 | 128 | wks01 3600 IN WKS 10.0.0.1 6 0 1 2 21 23 |
123 | 129 | wks02 3600 IN WKS 10.0.0.1 17 0 1 2 53 |
124 | 130 | wks03 3600 IN WKS 10.0.0.2 6 65535 |
0 | example. 300 IN SOA ns1.example. hostmaster.example. 1 2000 2000 1814400 3600 | |
0 | example. 300 IN SOA ns1.example. hostmaster.example. 1 2 3 4 5 | |
1 | 1 | example. 300 IN NS ns1.example. |
2 | 2 | example. 300 IN NS ns2.example. |
3 | example. 300 IN NSEC3PARAM 1 1 12 aabbccdd | |
4 | example. 300 IN NSEC3PARAM 1 1 12 - | |
3 | 5 | *.example. 300 IN MX 10 mail.example. |
4 | 6 | a.example. 300 IN TXT "foo foo foo" |
5 | 7 | a.example. 300 IN PTR foo.net. |
25 | 27 | cname01.example. 3600 IN CNAME cname-target. |
26 | 28 | cname02.example. 3600 IN CNAME cname-target.example. |
27 | 29 | cname03.example. 3600 IN CNAME . |
30 | csync0.example. 3600 IN CSYNC 12345 0 A MX RRSIG NSEC TYPE1234 | |
28 | 31 | d.example. 300 IN A 73.80.65.49 |
29 | 32 | dhcid01.example. 3600 IN DHCID AAIBY2/AuCccgoJbsaxcQc9TUapptP69 lOjxfNuVAA2kjEA= |
30 | 33 | dhcid02.example. 3600 IN DHCID AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQd WL3b/NaiUDlW2No= |
31 | 34 | dhcid03.example. 3600 IN DHCID AAABxLmlskllE0MVjd57zHcWmEH3pCQ6 VytcKD//7es/deY= |
32 | dlv01.example. 3600 IN DLV 12345 3 1 123456789abcdef67890123456789abcdef67890 | |
33 | 35 | dname01.example. 3600 IN DNAME dname-target. |
34 | 36 | dname02.example. 3600 IN DNAME dname-target.example. |
35 | 37 | dname03.example. 3600 IN DNAME . |
48 | 50 | gpos01.example. 3600 IN GPOS -22.6882 116.8652 250.0 |
49 | 51 | hinfo01.example. 3600 IN HINFO "Generic PC clone" "NetBSD-1.4" |
50 | 52 | hinfo02.example. 3600 IN HINFO "PC" "NetBSD" |
51 | hip01.example. 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs1.example.com. rvs2.example. | |
53 | hip01.example. 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D | |
54 | hip02.example. 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs.example.com. | |
55 | hip03.example. 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs1.example.com. rvs2.example.com. | |
52 | 56 | ipseckey01.example. 3600 IN IPSECKEY 10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
53 | 57 | ipseckey02.example. 3600 IN IPSECKEY 10 0 2 . AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
54 | 58 | ipseckey03.example. 3600 IN IPSECKEY 10 3 2 mygateway.example.com. AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
63 | 67 | loc01.example. 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m |
64 | 68 | loc02.example. 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m |
65 | 69 | loc03.example. 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m |
66 | loc04.example. 3600 IN LOC 60 9 1.500 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m | |
67 | loc05.example. 3600 IN LOC 60 9 1.510 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m | |
70 | loc04.example. 3600 IN LOC 60 9 1.500 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
71 | loc05.example. 3600 IN LOC 60 9 1.510 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
72 | loc06.example. 3600 IN LOC 60 9 1.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
73 | loc07.example. 3600 IN LOC 0 9 1.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
74 | loc08.example. 3600 IN LOC 0 9 1.000 S 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
68 | 75 | mx01.example. 3600 IN MX 10 mail.example. |
69 | 76 | mx02.example. 3600 IN MX 10 . |
70 | 77 | naptr01.example. 3600 IN NAPTR 0 0 "" "" "" . |
75 | 82 | nsap-ptr01.example. 3600 IN NSAP-PTR . |
76 | 83 | nsap01.example. 3600 IN NSAP 0x47000580005a0000000001e133ffffff00016100 |
77 | 84 | nsap02.example. 3600 IN NSAP 0x47000580005a0000000001e133ffffff00016100 |
78 | nsec01.example. 3600 IN NSEC a.secure. A MX RRSIG NSEC TYPE1234 | |
85 | nsec01.example. 3600 IN NSEC a.secure.example. A MX RRSIG NSEC TYPE1234 | |
79 | 86 | nsec02.example. 3600 IN NSEC . NSAP-PTR NSEC |
80 | 87 | nsec03.example. 3600 IN NSEC . NSEC TYPE65535 |
81 | 88 | nsec301.example. 3600 IN NSEC3 1 1 12 aabbccdd 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM |
82 | 89 | nsec302.example. 3600 IN NSEC3 1 1 12 - 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM |
83 | nsec3param01.example. 3600 IN NSEC3PARAM 1 1 12 aabbccdd | |
84 | nsec3param02.example. 3600 IN NSEC3PARAM 1 1 12 - | |
85 | 90 | ptr01.example. 3600 IN PTR example. |
86 | 91 | px01.example. 3600 IN PX 65535 foo. bar. |
87 | 92 | px02.example. 3600 IN PX 65535 . . |
118 | 123 | b.u.example. 300 IN A 73.80.65.49 |
119 | 124 | unknown2.example. 3600 IN TYPE999 \# 8 0a0000010a000001 |
120 | 125 | unknown3.example. 3600 IN A 127.0.0.2 |
121 | uri0q.example. 3600 IN URI 10 1 "http://www.example.com/" | |
126 | uri01.example. 3600 IN URI 10 1 "ftp://ftp1.example.com/public" | |
127 | uri02.example. 3600 IN URI 10 1 "http://www.example.com/path" | |
122 | 128 | wks01.example. 3600 IN WKS 10.0.0.1 6 0 1 2 21 23 |
123 | 129 | wks02.example. 3600 IN WKS 10.0.0.1 17 0 1 2 53 |
124 | 130 | wks03.example. 3600 IN WKS 10.0.0.2 6 65535 |
0 | @ 300 IN SOA ns1 hostmaster 1 2000 2000 1814400 3600 | |
0 | @ 300 IN SOA ns1 hostmaster 1 2 3 4 5 | |
1 | 1 | @ 300 IN NS ns1 |
2 | 2 | @ 300 IN NS ns2 |
3 | @ 300 IN NSEC3PARAM 1 1 12 aabbccdd | |
4 | @ 300 IN NSEC3PARAM 1 1 12 - | |
3 | 5 | * 300 IN MX 10 mail |
4 | 6 | a 300 IN TXT "foo foo foo" |
5 | 7 | a 300 IN PTR foo.net. |
25 | 27 | cname01 3600 IN CNAME cname-target. |
26 | 28 | cname02 3600 IN CNAME cname-target |
27 | 29 | cname03 3600 IN CNAME . |
30 | csync0 3600 IN CSYNC 12345 0 A MX RRSIG NSEC TYPE1234 | |
28 | 31 | d 300 IN A 73.80.65.49 |
29 | 32 | dhcid01 3600 IN DHCID AAIBY2/AuCccgoJbsaxcQc9TUapptP69 lOjxfNuVAA2kjEA= |
30 | 33 | dhcid02 3600 IN DHCID AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQd WL3b/NaiUDlW2No= |
31 | 34 | dhcid03 3600 IN DHCID AAABxLmlskllE0MVjd57zHcWmEH3pCQ6 VytcKD//7es/deY= |
32 | dlv01 3600 IN DLV 12345 3 1 123456789abcdef67890123456789abcdef67890 | |
33 | 35 | dname01 3600 IN DNAME dname-target. |
34 | 36 | dname02 3600 IN DNAME dname-target |
35 | 37 | dname03 3600 IN DNAME . |
48 | 50 | gpos01 3600 IN GPOS -22.6882 116.8652 250.0 |
49 | 51 | hinfo01 3600 IN HINFO "Generic PC clone" "NetBSD-1.4" |
50 | 52 | hinfo02 3600 IN HINFO "PC" "NetBSD" |
51 | hip01 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs1.example.com. rvs2 | |
53 | hip01 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D | |
54 | hip02 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs.example.com. | |
55 | hip03 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D rvs1.example.com. rvs2.example.com. | |
52 | 56 | ipseckey01 3600 IN IPSECKEY 10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
53 | 57 | ipseckey02 3600 IN IPSECKEY 10 0 2 . AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
54 | 58 | ipseckey03 3600 IN IPSECKEY 10 3 2 mygateway.example.com. AQNRU3mG7TVTO2BkR47usntb102uFJtu gbo6BSGvgqt4AQ== |
63 | 67 | loc01 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m |
64 | 68 | loc02 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m |
65 | 69 | loc03 3600 IN LOC 60 9 0.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m |
66 | loc04 3600 IN LOC 60 9 1.500 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m | |
67 | loc05 3600 IN LOC 60 9 1.510 N 24 39 0.000 E 10.00m 20.00m 2000.00m 20.00m | |
70 | loc04 3600 IN LOC 60 9 1.500 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
71 | loc05 3600 IN LOC 60 9 1.510 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
72 | loc06 3600 IN LOC 60 9 1.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
73 | loc07 3600 IN LOC 0 9 1.000 N 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
74 | loc08 3600 IN LOC 0 9 1.000 S 24 39 0.000 E 10.00m 90000000.00m 2000.00m 20.00m | |
68 | 75 | mx01 3600 IN MX 10 mail |
69 | 76 | mx02 3600 IN MX 10 . |
70 | 77 | naptr01 3600 IN NAPTR 0 0 "" "" "" . |
75 | 82 | nsap-ptr01 3600 IN NSAP-PTR . |
76 | 83 | nsap01 3600 IN NSAP 0x47000580005a0000000001e133ffffff00016100 |
77 | 84 | nsap02 3600 IN NSAP 0x47000580005a0000000001e133ffffff00016100 |
78 | nsec01 3600 IN NSEC a.secure. A MX RRSIG NSEC TYPE1234 | |
85 | nsec01 3600 IN NSEC a.secure A MX RRSIG NSEC TYPE1234 | |
79 | 86 | nsec02 3600 IN NSEC . NSAP-PTR NSEC |
80 | 87 | nsec03 3600 IN NSEC . NSEC TYPE65535 |
81 | 88 | nsec301 3600 IN NSEC3 1 1 12 aabbccdd 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM |
82 | 89 | nsec302 3600 IN NSEC3 1 1 12 - 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM |
83 | nsec3param01 3600 IN NSEC3PARAM 1 1 12 aabbccdd | |
84 | nsec3param02 3600 IN NSEC3PARAM 1 1 12 - | |
85 | 90 | ptr01 3600 IN PTR @ |
86 | 91 | px01 3600 IN PX 65535 foo. bar. |
87 | 92 | px02 3600 IN PX 65535 . . |
118 | 123 | b.u 300 IN A 73.80.65.49 |
119 | 124 | unknown2 3600 IN TYPE999 \# 8 0a0000010a000001 |
120 | 125 | unknown3 3600 IN A 127.0.0.2 |
121 | uri0q 3600 IN URI 10 1 "http://www.example.com/" | |
126 | uri01 3600 IN URI 10 1 "ftp://ftp1.example.com/public" | |
127 | uri02 3600 IN URI 10 1 "http://www.example.com/path" | |
122 | 128 | wks01 3600 IN WKS 10.0.0.1 6 0 1 2 21 23 |
123 | 129 | wks02 3600 IN WKS 10.0.0.1 17 0 1 2 53 |
124 | 130 | wks03 3600 IN WKS 10.0.0.2 6 65535 |
208 | 208 | self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) |
209 | 209 | |
210 | 210 | @unittest.skipIf(not dns.dnssec._have_ecdsa, |
211 | "python ECDSA can not be imported") | |
211 | "python ECDSA cannot be imported") | |
212 | 212 | def testAbsoluteECDSA384Good(self): |
213 | 213 | dns.dnssec.validate(abs_ecdsa384_soa, abs_ecdsa384_soa_rrsig, |
214 | 214 | abs_ecdsa384_keys, None, when4) |
215 | 215 | |
216 | 216 | @unittest.skipIf(not dns.dnssec._have_ecdsa, |
217 | "python ECDSA can not be imported") | |
217 | "python ECDSA cannot be imported") | |
218 | 218 | def testAbsoluteECDSA384Bad(self): |
219 | 219 | def bad(): |
220 | 220 | dns.dnssec.validate(abs_other_ecdsa384_soa, abs_ecdsa384_soa_rrsig, |
20 | 20 | import binascii |
21 | 21 | |
22 | 22 | import dns.exception |
23 | import dns.flags | |
23 | 24 | import dns.message |
24 | 25 | from dns._compat import xrange |
25 | 26 | |
178 | 179 | m.use_edns(1) |
179 | 180 | self.failUnless((m.ednsflags >> 16) & 0xFF == 1) |
180 | 181 | |
182 | def test_SettingNoEDNSOptionsImpliesNoEDNS(self): | |
183 | m = dns.message.make_query('foo', 'A') | |
184 | self.failUnless(m.edns == -1) | |
185 | ||
186 | def test_SettingEDNSFlagsImpliesEDNS(self): | |
187 | m = dns.message.make_query('foo', 'A', ednsflags=dns.flags.DO) | |
188 | self.failUnless(m.edns == 0) | |
189 | ||
190 | def test_SettingEDNSPayloadImpliesEDNS(self): | |
191 | m = dns.message.make_query('foo', 'A', payload=4096) | |
192 | self.failUnless(m.edns == 0) | |
193 | ||
194 | def test_SettingEDNSRequestPayloadImpliesEDNS(self): | |
195 | m = dns.message.make_query('foo', 'A', request_payload=4096) | |
196 | self.failUnless(m.edns == 0) | |
197 | ||
198 | def test_SettingOptionsImpliesEDNS(self): | |
199 | m = dns.message.make_query('foo', 'A', options=[]) | |
200 | self.failUnless(m.edns == 0) | |
201 | ||
181 | 202 | if __name__ == '__main__': |
182 | 203 | unittest.main() |
34 | 34 | |
35 | 35 | def testEqual2(self): |
36 | 36 | '''Test default values for size, horizontal and vertical precision.''' |
37 | r1 = dns.rdtypes.ANY.LOC.LOC(1, 29, (49, 11, 42, 400), | |
38 | (16, 36, 29, 600), 22764.0) # centimeters | |
39 | r2 = dns.rdtypes.ANY.LOC.LOC(1, 29, (49, 11, 42, 400), | |
40 | (16, 36, 29, 600), 22764.0, # centimeters | |
37 | r1 = dns.rdtypes.ANY.LOC.LOC(1, 29, (49, 11, 42, 400, 1), | |
38 | (16, 36, 29, 600, 1), | |
39 | 22764.0) # centimeters | |
40 | r2 = dns.rdtypes.ANY.LOC.LOC(1, 29, (49, 11, 42, 400, 1), | |
41 | (16, 36, 29, 600, 1), | |
42 | 22764.0, # centimeters | |
41 | 43 | 100.0, 1000000.00, 1000.0) # centimeters |
42 | 44 | self.failUnless(r1 == r2, '"%s" != "%s"' % (r1, r2)) |
43 | 45 | |
45 | 47 | '''Test size, horizontal and vertical precision parsers: 100 cm == 1 m. |
46 | 48 | |
47 | 49 | Parsers in from_text() and __init__() have to produce equal results.''' |
48 | r1 = dns.rdtypes.ANY.LOC.LOC(1, 29, (49, 11, 42, 400), | |
49 | (16, 36, 29, 600), 22764.0, | |
50 | r1 = dns.rdtypes.ANY.LOC.LOC(1, 29, (49, 11, 42, 400, 1), | |
51 | (16, 36, 29, 600, 1), 22764.0, | |
50 | 52 | 200.0, 1000.00, 200.0) # centimeters |
51 | 53 | r2 = dns.rrset.from_text('FOO', 600, 'in', 'loc', |
52 | 54 | '49 11 42.400 N 16 36 29.600 E 227.64m ' |
58 | 60 | |
59 | 61 | Parsers in from_text() and __init__() have produce equal result |
60 | 62 | for values with and without trailing "m".''' |
61 | r1 = dns.rdtypes.ANY.LOC.LOC(1, 29, (49, 11, 42, 400), | |
62 | (16, 36, 29, 600), 22764.0, | |
63 | r1 = dns.rdtypes.ANY.LOC.LOC(1, 29, (49, 11, 42, 400, 1), | |
64 | (16, 36, 29, 600, 1), 22764.0, | |
63 | 65 | 200.0, 1000.00, 200.0) # centimeters |
64 | 66 | r2 = dns.rrset.from_text('FOO', 600, 'in', 'loc', |
65 | 67 | '49 11 42.400 N 16 36 29.600 E 227.64 ' |
413 | 413 | self.failUnlessRaises(dns.exception.SyntaxError, bad) |
414 | 414 | |
415 | 415 | def testFirstRRStartsWithWhitespace(self): |
416 | # no name is specified, so default to the intial origin | |
416 | # no name is specified, so default to the initial origin | |
417 | 417 | # no ttl is specified, so default to the initial TTL of 0 |
418 | 418 | z = dns.zone.from_text(' IN A 10.0.0.1', origin='example.', |
419 | 419 | check_origin=False) |
432 | 432 | z = dns.zone.Zone(1.0) |
433 | 433 | self.failUnlessRaises(ValueError, bad2) |
434 | 434 | |
435 | def testZoneOriginNone(self): | |
436 | z = dns.zone.Zone(None) | |
437 | ||
435 | 438 | if __name__ == '__main__': |
436 | 439 | unittest.main() |