dnsruby 1.2 → 1.23
Sign up to get free protection for your applications and to get access to all the features.
- data/demo/axfr.rb +176 -0
- data/demo/check_soa.rb +141 -0
- data/demo/check_zone.rb +157 -0
- data/demo/example_recurse.rb +11 -0
- data/demo/mresolv.rb +67 -0
- data/demo/mx.rb +33 -0
- data/demo/rubydig.rb +58 -0
- data/demo/to_resolve.txt +3088 -0
- data/demo/trace_dns.rb +15 -0
- data/doc/classes/Dnsruby.html +463 -0
- data/doc/classes/Dnsruby/Algorithms.html +171 -0
- data/doc/classes/Dnsruby/Classes.html +197 -0
- data/doc/classes/Dnsruby/Classes.src/M000209.html +23 -0
- data/doc/classes/Dnsruby/Classes.src/M000210.html +19 -0
- data/doc/classes/Dnsruby/CodeMapper.html +375 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000186.html +18 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000187.html +33 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000188.html +21 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000189.html +19 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000190.html +19 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000191.html +18 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000192.html +22 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000193.html +22 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000194.html +22 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000195.html +31 -0
- data/doc/classes/Dnsruby/CodeMapper.src/M000196.html +19 -0
- data/doc/classes/Dnsruby/Config.html +413 -0
- data/doc/classes/Dnsruby/Config.src/M000148.html +18 -0
- data/doc/classes/Dnsruby/Config.src/M000149.html +19 -0
- data/doc/classes/Dnsruby/Config.src/M000150.html +19 -0
- data/doc/classes/Dnsruby/Config.src/M000151.html +25 -0
- data/doc/classes/Dnsruby/Config.src/M000152.html +21 -0
- data/doc/classes/Dnsruby/Config.src/M000153.html +38 -0
- data/doc/classes/Dnsruby/Config.src/M000154.html +26 -0
- data/doc/classes/Dnsruby/Config.src/M000155.html +22 -0
- data/doc/classes/Dnsruby/Config.src/M000156.html +27 -0
- data/doc/classes/Dnsruby/Config.src/M000157.html +22 -0
- data/doc/classes/Dnsruby/Config.src/M000158.html +21 -0
- data/doc/classes/Dnsruby/DNS.html +571 -0
- data/doc/classes/Dnsruby/DNS.src/M000258.html +24 -0
- data/doc/classes/Dnsruby/DNS.src/M000259.html +18 -0
- data/doc/classes/Dnsruby/DNS.src/M000260.html +18 -0
- data/doc/classes/Dnsruby/DNS.src/M000261.html +20 -0
- data/doc/classes/Dnsruby/DNS.src/M000262.html +19 -0
- data/doc/classes/Dnsruby/DNS.src/M000263.html +20 -0
- data/doc/classes/Dnsruby/DNS.src/M000264.html +18 -0
- data/doc/classes/Dnsruby/DNS.src/M000265.html +19 -0
- data/doc/classes/Dnsruby/DNS.src/M000266.html +20 -0
- data/doc/classes/Dnsruby/DNS.src/M000267.html +28 -0
- data/doc/classes/Dnsruby/DNS.src/M000268.html +19 -0
- data/doc/classes/Dnsruby/DNS.src/M000269.html +20 -0
- data/doc/classes/Dnsruby/DNS.src/M000270.html +31 -0
- data/doc/classes/Dnsruby/DecodeError.html +120 -0
- data/doc/classes/Dnsruby/Dnssec.html +287 -0
- data/doc/classes/Dnsruby/Dnssec.src/M000249.html +23 -0
- data/doc/classes/Dnsruby/Dnssec.src/M000250.html +19 -0
- data/doc/classes/Dnsruby/Dnssec.src/M000251.html +90 -0
- data/doc/classes/Dnsruby/Dnssec.src/M000252.html +76 -0
- data/doc/classes/Dnsruby/EncodeError.html +120 -0
- data/doc/classes/Dnsruby/FormErr.html +119 -0
- data/doc/classes/Dnsruby/Header.html +501 -0
- data/doc/classes/Dnsruby/Header.src/M000231.html +35 -0
- data/doc/classes/Dnsruby/Header.src/M000232.html +18 -0
- data/doc/classes/Dnsruby/Header.src/M000233.html +18 -0
- data/doc/classes/Dnsruby/Header.src/M000234.html +21 -0
- data/doc/classes/Dnsruby/Header.src/M000235.html +20 -0
- data/doc/classes/Dnsruby/Header.src/M000236.html +32 -0
- data/doc/classes/Dnsruby/Header.src/M000237.html +27 -0
- data/doc/classes/Dnsruby/Header.src/M000238.html +26 -0
- data/doc/classes/Dnsruby/Header.src/M000239.html +47 -0
- data/doc/classes/Dnsruby/Header.src/M000240.html +28 -0
- data/doc/classes/Dnsruby/Header.src/M000241.html +30 -0
- data/doc/classes/Dnsruby/Hosts.html +316 -0
- data/doc/classes/Dnsruby/Hosts.src/M000197.html +20 -0
- data/doc/classes/Dnsruby/Hosts.src/M000198.html +19 -0
- data/doc/classes/Dnsruby/Hosts.src/M000199.html +20 -0
- data/doc/classes/Dnsruby/Hosts.src/M000200.html +21 -0
- data/doc/classes/Dnsruby/Hosts.src/M000201.html +19 -0
- data/doc/classes/Dnsruby/Hosts.src/M000202.html +20 -0
- data/doc/classes/Dnsruby/Hosts.src/M000203.html +21 -0
- data/doc/classes/Dnsruby/IPv4.html +233 -0
- data/doc/classes/Dnsruby/IPv4.src/M000204.html +32 -0
- data/doc/classes/Dnsruby/IPv4.src/M000205.html +19 -0
- data/doc/classes/Dnsruby/IPv4.src/M000206.html +18 -0
- data/doc/classes/Dnsruby/IPv4.src/M000207.html +18 -0
- data/doc/classes/Dnsruby/IPv4.src/M000208.html +18 -0
- data/doc/classes/Dnsruby/IPv6.html +281 -0
- data/doc/classes/Dnsruby/IPv6.src/M000242.html +60 -0
- data/doc/classes/Dnsruby/IPv6.src/M000243.html +22 -0
- data/doc/classes/Dnsruby/IPv6.src/M000244.html +20 -0
- data/doc/classes/Dnsruby/IPv6.src/M000245.html +18 -0
- data/doc/classes/Dnsruby/Message.html +803 -0
- data/doc/classes/Dnsruby/Message.src/M000119.html +38 -0
- data/doc/classes/Dnsruby/Message.src/M000120.html +26 -0
- data/doc/classes/Dnsruby/Message.src/M000121.html +22 -0
- data/doc/classes/Dnsruby/Message.src/M000122.html +22 -0
- data/doc/classes/Dnsruby/Message.src/M000123.html +20 -0
- data/doc/classes/Dnsruby/Message.src/M000124.html +20 -0
- data/doc/classes/Dnsruby/Message.src/M000125.html +20 -0
- data/doc/classes/Dnsruby/Message.src/M000126.html +20 -0
- data/doc/classes/Dnsruby/Message.src/M000127.html +18 -0
- data/doc/classes/Dnsruby/Message.src/M000128.html +20 -0
- data/doc/classes/Dnsruby/Message.src/M000129.html +23 -0
- data/doc/classes/Dnsruby/Message.src/M000130.html +30 -0
- data/doc/classes/Dnsruby/Message.src/M000131.html +20 -0
- data/doc/classes/Dnsruby/Message.src/M000132.html +18 -0
- data/doc/classes/Dnsruby/Message.src/M000133.html +56 -0
- data/doc/classes/Dnsruby/Message.src/M000134.html +35 -0
- data/doc/classes/Dnsruby/Message.src/M000135.html +46 -0
- data/doc/classes/Dnsruby/Message/Section.html +160 -0
- data/doc/classes/Dnsruby/Message/Section.src/M000141.html +29 -0
- data/doc/classes/Dnsruby/Message/Section.src/M000142.html +30 -0
- data/doc/classes/Dnsruby/MetaTypes.html +136 -0
- data/doc/classes/Dnsruby/Modes.html +171 -0
- data/doc/classes/Dnsruby/NXDomain.html +119 -0
- data/doc/classes/Dnsruby/Name.html +330 -0
- data/doc/classes/Dnsruby/Name.src/M000104.html +28 -0
- data/doc/classes/Dnsruby/Name.src/M000105.html +20 -0
- data/doc/classes/Dnsruby/Name.src/M000106.html +18 -0
- data/doc/classes/Dnsruby/Name.src/M000107.html +21 -0
- data/doc/classes/Dnsruby/Name.src/M000108.html +22 -0
- data/doc/classes/Dnsruby/Name.src/M000109.html +18 -0
- data/doc/classes/Dnsruby/Name/Label.html +300 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000110.html +21 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000111.html +18 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000112.html +22 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000113.html +18 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000114.html +18 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000115.html +18 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000116.html +18 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000117.html +18 -0
- data/doc/classes/Dnsruby/Name/Label.src/M000118.html +18 -0
- data/doc/classes/Dnsruby/NotImp.html +119 -0
- data/doc/classes/Dnsruby/OpCode.html +146 -0
- data/doc/classes/Dnsruby/OtherResolvError.html +119 -0
- data/doc/classes/Dnsruby/QTypes.html +146 -0
- data/doc/classes/Dnsruby/Question.html +301 -0
- data/doc/classes/Dnsruby/Question.src/M000226.html +47 -0
- data/doc/classes/Dnsruby/Question.src/M000227.html +18 -0
- data/doc/classes/Dnsruby/Question.src/M000228.html +18 -0
- data/doc/classes/Dnsruby/Question.src/M000229.html +32 -0
- data/doc/classes/Dnsruby/Question.src/M000230.html +18 -0
- data/doc/classes/Dnsruby/RCode.html +211 -0
- data/doc/classes/Dnsruby/RR.html +648 -0
- data/doc/classes/Dnsruby/RR.src/M000001.html +18 -0
- data/doc/classes/Dnsruby/RR.src/M000002.html +22 -0
- data/doc/classes/Dnsruby/RR.src/M000003.html +18 -0
- data/doc/classes/Dnsruby/RR.src/M000004.html +18 -0
- data/doc/classes/Dnsruby/RR.src/M000005.html +26 -0
- data/doc/classes/Dnsruby/RR.src/M000006.html +18 -0
- data/doc/classes/Dnsruby/RR.src/M000007.html +36 -0
- data/doc/classes/Dnsruby/RR.src/M000008.html +100 -0
- data/doc/classes/Dnsruby/RR.src/M000009.html +18 -0
- data/doc/classes/Dnsruby/RR.src/M000010.html +18 -0
- data/doc/classes/Dnsruby/RR.src/M000011.html +22 -0
- data/doc/classes/Dnsruby/RR.src/M000012.html +29 -0
- data/doc/classes/Dnsruby/RR.src/M000013.html +24 -0
- data/doc/classes/Dnsruby/RR/ANY.html +133 -0
- data/doc/classes/Dnsruby/RR/CERT.html +180 -0
- data/doc/classes/Dnsruby/RR/CERT/CertificateTypes.html +169 -0
- data/doc/classes/Dnsruby/RR/CNAME.html +151 -0
- data/doc/classes/Dnsruby/RR/DNAME.html +150 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.html +422 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000044.html +20 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000045.html +21 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000046.html +28 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000047.html +22 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000048.html +18 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000049.html +22 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000050.html +18 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000051.html +26 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000052.html +38 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000053.html +45 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000054.html +21 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000055.html +24 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000056.html +32 -0
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000057.html +24 -0
- data/doc/classes/Dnsruby/RR/DS.html +286 -0
- data/doc/classes/Dnsruby/RR/DS.src/M000039.html +22 -0
- data/doc/classes/Dnsruby/RR/DS.src/M000040.html +28 -0
- data/doc/classes/Dnsruby/RR/DS.src/M000041.html +24 -0
- data/doc/classes/Dnsruby/RR/DS.src/M000042.html +28 -0
- data/doc/classes/Dnsruby/RR/DS.src/M000043.html +36 -0
- data/doc/classes/Dnsruby/RR/DomainName.html +175 -0
- data/doc/classes/Dnsruby/RR/DomainName.src/M000083.html +18 -0
- data/doc/classes/Dnsruby/RR/Generic.html +133 -0
- data/doc/classes/Dnsruby/RR/HINFO.html +155 -0
- data/doc/classes/Dnsruby/RR/IN.html +155 -0
- data/doc/classes/Dnsruby/RR/IN/A.html +200 -0
- data/doc/classes/Dnsruby/RR/IN/A.src/M000017.html +18 -0
- data/doc/classes/Dnsruby/RR/IN/A.src/M000018.html +18 -0
- data/doc/classes/Dnsruby/RR/IN/A.src/M000019.html +18 -0
- data/doc/classes/Dnsruby/RR/IN/AAAA.html +139 -0
- data/doc/classes/Dnsruby/RR/IN/AFSDB.html +145 -0
- data/doc/classes/Dnsruby/RR/IN/PX.html +143 -0
- data/doc/classes/Dnsruby/RR/IN/SRV.html +238 -0
- data/doc/classes/Dnsruby/RR/IN/SRV.src/M000014.html +29 -0
- data/doc/classes/Dnsruby/RR/IN/SRV.src/M000015.html +26 -0
- data/doc/classes/Dnsruby/RR/IN/SRV.src/M000016.html +22 -0
- data/doc/classes/Dnsruby/RR/IN/WKS.html +166 -0
- data/doc/classes/Dnsruby/RR/IN/WKS.src/M000020.html +20 -0
- data/doc/classes/Dnsruby/RR/ISDN.html +155 -0
- data/doc/classes/Dnsruby/RR/LOC.html +395 -0
- data/doc/classes/Dnsruby/RR/LOC.src/M000025.html +32 -0
- data/doc/classes/Dnsruby/RR/LOC.src/M000026.html +23 -0
- data/doc/classes/Dnsruby/RR/LOC.src/M000027.html +25 -0
- data/doc/classes/Dnsruby/RR/LOC.src/M000028.html +21 -0
- data/doc/classes/Dnsruby/RR/LOC.src/M000029.html +20 -0
- data/doc/classes/Dnsruby/RR/LOC.src/M000030.html +23 -0
- data/doc/classes/Dnsruby/RR/MB.html +150 -0
- data/doc/classes/Dnsruby/RR/MG.html +150 -0
- data/doc/classes/Dnsruby/RR/MINFO.html +156 -0
- data/doc/classes/Dnsruby/RR/MR.html +150 -0
- data/doc/classes/Dnsruby/RR/MX.html +155 -0
- data/doc/classes/Dnsruby/RR/NAPTR.html +190 -0
- data/doc/classes/Dnsruby/RR/NS.html +151 -0
- data/doc/classes/Dnsruby/RR/NSAP.html +293 -0
- data/doc/classes/Dnsruby/RR/NSAP.src/M000093.html +19 -0
- data/doc/classes/Dnsruby/RR/NSAP.src/M000094.html +19 -0
- data/doc/classes/Dnsruby/RR/NSAP.src/M000095.html +22 -0
- data/doc/classes/Dnsruby/RR/NSAP.src/M000096.html +31 -0
- data/doc/classes/Dnsruby/RR/NSEC.html +301 -0
- data/doc/classes/Dnsruby/RR/NSEC.src/M000031.html +19 -0
- data/doc/classes/Dnsruby/RR/NSEC.src/M000032.html +18 -0
- data/doc/classes/Dnsruby/RR/NSEC.src/M000033.html +34 -0
- data/doc/classes/Dnsruby/RR/NSEC.src/M000034.html +18 -0
- data/doc/classes/Dnsruby/RR/NSEC.src/M000035.html +71 -0
- data/doc/classes/Dnsruby/RR/NSEC.src/M000036.html +18 -0
- data/doc/classes/Dnsruby/RR/NSEC.src/M000037.html +80 -0
- data/doc/classes/Dnsruby/RR/NSEC.src/M000038.html +23 -0
- data/doc/classes/Dnsruby/RR/NSEC3.html +366 -0
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000085.html +28 -0
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000086.html +18 -0
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000087.html +18 -0
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000088.html +22 -0
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000089.html +18 -0
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000090.html +21 -0
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000091.html +21 -0
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000092.html +29 -0
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.html +279 -0
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000077.html +28 -0
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000078.html +18 -0
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000079.html +22 -0
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000080.html +21 -0
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000081.html +25 -0
- data/doc/classes/Dnsruby/RR/PTR.html +132 -0
- data/doc/classes/Dnsruby/RR/RP.html +183 -0
- data/doc/classes/Dnsruby/RR/RP.src/M000082.html +19 -0
- data/doc/classes/Dnsruby/RR/RRSIG.html +357 -0
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000097.html +26 -0
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000098.html +28 -0
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000099.html +23 -0
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000100.html +23 -0
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000101.html +46 -0
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000102.html +50 -0
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000103.html +27 -0
- data/doc/classes/Dnsruby/RR/RT.html +155 -0
- data/doc/classes/Dnsruby/RR/SOA.html +233 -0
- data/doc/classes/Dnsruby/RR/SOA.src/M000066.html +24 -0
- data/doc/classes/Dnsruby/RR/SOA.src/M000067.html +27 -0
- data/doc/classes/Dnsruby/RR/SPF.html +138 -0
- data/doc/classes/Dnsruby/RR/TKEY.html +313 -0
- data/doc/classes/Dnsruby/RR/TKEY.src/M000021.html +19 -0
- data/doc/classes/Dnsruby/RR/TKEY.src/M000022.html +29 -0
- data/doc/classes/Dnsruby/RR/TKEY.src/M000023.html +21 -0
- data/doc/classes/Dnsruby/RR/TKEY.src/M000024.html +29 -0
- data/doc/classes/Dnsruby/RR/TSIG.html +524 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000068.html +24 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000069.html +32 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000070.html +54 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000071.html +121 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000072.html +33 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000073.html +25 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000074.html +36 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000075.html +22 -0
- data/doc/classes/Dnsruby/RR/TSIG.src/M000076.html +29 -0
- data/doc/classes/Dnsruby/RR/TXT.html +233 -0
- data/doc/classes/Dnsruby/RR/TXT.src/M000061.html +18 -0
- data/doc/classes/Dnsruby/RR/TXT.src/M000062.html +18 -0
- data/doc/classes/Dnsruby/RR/TXT.src/M000063.html +20 -0
- data/doc/classes/Dnsruby/RR/TXT.src/M000064.html +27 -0
- data/doc/classes/Dnsruby/RR/TXT.src/M000065.html +25 -0
- data/doc/classes/Dnsruby/RR/X25.html +203 -0
- data/doc/classes/Dnsruby/RR/X25.src/M000058.html +18 -0
- data/doc/classes/Dnsruby/RR/X25.src/M000059.html +18 -0
- data/doc/classes/Dnsruby/RR/X25.src/M000060.html +22 -0
- data/doc/classes/Dnsruby/RRSet.html +404 -0
- data/doc/classes/Dnsruby/RRSet.src/M000211.html +23 -0
- data/doc/classes/Dnsruby/RRSet.src/M000212.html +18 -0
- data/doc/classes/Dnsruby/RRSet.src/M000213.html +18 -0
- data/doc/classes/Dnsruby/RRSet.src/M000214.html +47 -0
- data/doc/classes/Dnsruby/RRSet.src/M000215.html +42 -0
- data/doc/classes/Dnsruby/RRSet.src/M000216.html +18 -0
- data/doc/classes/Dnsruby/RRSet.src/M000217.html +20 -0
- data/doc/classes/Dnsruby/RRSet.src/M000218.html +18 -0
- data/doc/classes/Dnsruby/RRSet.src/M000219.html +18 -0
- data/doc/classes/Dnsruby/RRSet.src/M000220.html +18 -0
- data/doc/classes/Dnsruby/RRSet.src/M000221.html +18 -0
- data/doc/classes/Dnsruby/RRSet.src/M000222.html +22 -0
- data/doc/classes/Dnsruby/RRSet.src/M000223.html +18 -0
- data/doc/classes/Dnsruby/RRSet.src/M000224.html +22 -0
- data/doc/classes/Dnsruby/RRSet.src/M000225.html +18 -0
- data/doc/classes/Dnsruby/Refused.html +119 -0
- data/doc/classes/Dnsruby/Resolv.html +401 -0
- data/doc/classes/Dnsruby/Resolv.src/M000159.html +18 -0
- data/doc/classes/Dnsruby/Resolv.src/M000160.html +18 -0
- data/doc/classes/Dnsruby/Resolv.src/M000161.html +18 -0
- data/doc/classes/Dnsruby/Resolv.src/M000162.html +18 -0
- data/doc/classes/Dnsruby/Resolv.src/M000163.html +18 -0
- data/doc/classes/Dnsruby/Resolv.src/M000164.html +18 -0
- data/doc/classes/Dnsruby/Resolv.src/M000165.html +18 -0
- data/doc/classes/Dnsruby/Resolv.src/M000166.html +19 -0
- data/doc/classes/Dnsruby/Resolv.src/M000167.html +20 -0
- data/doc/classes/Dnsruby/Resolv.src/M000168.html +29 -0
- data/doc/classes/Dnsruby/Resolv.src/M000169.html +19 -0
- data/doc/classes/Dnsruby/Resolv.src/M000170.html +20 -0
- data/doc/classes/Dnsruby/Resolv.src/M000171.html +25 -0
- data/doc/classes/Dnsruby/ResolvError.html +117 -0
- data/doc/classes/Dnsruby/ResolvTimeout.html +117 -0
- data/doc/classes/Dnsruby/Resolver.html +1055 -0
- data/doc/classes/Dnsruby/Resolver.src/M000271.html +21 -0
- data/doc/classes/Dnsruby/Resolver.src/M000272.html +27 -0
- data/doc/classes/Dnsruby/Resolver.src/M000273.html +28 -0
- data/doc/classes/Dnsruby/Resolver.src/M000274.html +18 -0
- data/doc/classes/Dnsruby/Resolver.src/M000275.html +51 -0
- data/doc/classes/Dnsruby/Resolver.src/M000276.html +21 -0
- data/doc/classes/Dnsruby/Resolver.src/M000277.html +22 -0
- data/doc/classes/Dnsruby/Resolver.src/M000278.html +18 -0
- data/doc/classes/Dnsruby/Resolver.src/M000279.html +20 -0
- data/doc/classes/Dnsruby/Resolver.src/M000280.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000281.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000282.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000283.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000284.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000285.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000286.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000287.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000288.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000289.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000290.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000291.html +19 -0
- data/doc/classes/Dnsruby/Resolver.src/M000292.html +26 -0
- data/doc/classes/Dnsruby/Resolver.src/M000293.html +18 -0
- data/doc/classes/Dnsruby/Resolver.src/M000294.html +23 -0
- data/doc/classes/Dnsruby/Resolver.src/M000295.html +18 -0
- data/doc/classes/Dnsruby/ServFail.html +119 -0
- data/doc/classes/Dnsruby/SingleResolver.html +674 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000172.html +18 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000173.html +24 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000174.html +36 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000175.html +18 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000176.html +19 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000177.html +50 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000178.html +19 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000179.html +21 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000180.html +25 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000181.html +54 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000182.html +27 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000183.html +27 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000184.html +35 -0
- data/doc/classes/Dnsruby/SingleResolver.src/M000185.html +21 -0
- data/doc/classes/Dnsruby/TheLog.html +196 -0
- data/doc/classes/Dnsruby/TheLog.src/M000246.html +20 -0
- data/doc/classes/Dnsruby/TheLog.src/M000247.html +20 -0
- data/doc/classes/Dnsruby/TheLog.src/M000248.html +20 -0
- data/doc/classes/Dnsruby/Types.html +436 -0
- data/doc/classes/Dnsruby/Update.html +368 -0
- data/doc/classes/Dnsruby/Update.src/M000253.html +32 -0
- data/doc/classes/Dnsruby/Update.src/M000254.html +36 -0
- data/doc/classes/Dnsruby/Update.src/M000255.html +32 -0
- data/doc/classes/Dnsruby/Update.src/M000256.html +41 -0
- data/doc/classes/Dnsruby/Update.src/M000257.html +34 -0
- data/doc/classes/Dnsruby/VerifyError.html +119 -0
- data/doc/classes/Dnsruby/ZoneTransfer.html +300 -0
- data/doc/classes/Dnsruby/ZoneTransfer.src/M000143.html +18 -0
- data/doc/classes/Dnsruby/ZoneTransfer.src/M000144.html +24 -0
- data/doc/classes/Dnsruby/ZoneTransfer.src/M000145.html +35 -0
- data/doc/classes/Dnsruby/ZoneTransfer/Delta.html +200 -0
- data/doc/classes/Dnsruby/ZoneTransfer/Delta.src/M000146.html +19 -0
- data/doc/classes/Dnsruby/ZoneTransfer/Delta.src/M000147.html +19 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/Dnsruby/Config_rb.html +101 -0
- data/doc/files/lib/Dnsruby/DNS_rb.html +110 -0
- data/doc/files/lib/Dnsruby/Hosts_rb.html +108 -0
- data/doc/files/lib/Dnsruby/Resolver_rb.html +109 -0
- data/doc/files/lib/Dnsruby/SingleResolver_rb.html +108 -0
- data/doc/files/lib/Dnsruby/TheLog_rb.html +110 -0
- data/doc/files/lib/Dnsruby/code_mapper_rb.html +101 -0
- data/doc/files/lib/Dnsruby/dnssec_rb.html +107 -0
- data/doc/files/lib/Dnsruby/event_machine_interface_rb.html +108 -0
- data/doc/files/lib/Dnsruby/ipv4_rb.html +101 -0
- data/doc/files/lib/Dnsruby/ipv6_rb.html +101 -0
- data/doc/files/lib/Dnsruby/message_rb.html +109 -0
- data/doc/files/lib/Dnsruby/name_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/AAAA_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/AFSDB_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/A_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/CERT_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/DNSKEY_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/DS_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/HINFO_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/IN_rb.html +112 -0
- data/doc/files/lib/Dnsruby/resource/ISDN_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/LOC_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/MINFO_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/MX_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/NAPTR_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/NSAP_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/NSEC3PARAM_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/NSEC3_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/NSEC_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/OPT_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/PX_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/RP_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/RRSIG_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/RT_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/SOA_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/SPF_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/SRV_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/TKEY_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/TSIG_rb.html +114 -0
- data/doc/files/lib/Dnsruby/resource/TXT_rb.html +108 -0
- data/doc/files/lib/Dnsruby/resource/X25_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/domain_name_rb.html +101 -0
- data/doc/files/lib/Dnsruby/resource/generic_rb.html +131 -0
- data/doc/files/lib/Dnsruby/resource/resource_rb.html +110 -0
- data/doc/files/lib/Dnsruby/select_thread_rb.html +111 -0
- data/doc/files/lib/Dnsruby/update_rb.html +101 -0
- data/doc/files/lib/Dnsruby/zone_transfer_rb.html +101 -0
- data/doc/files/lib/dnsruby_rb.html +118 -0
- data/doc/fr_class_index.html +108 -0
- data/doc/fr_file_index.html +75 -0
- data/doc/fr_method_index.html +321 -0
- data/doc/index.html +24 -0
- data/lib/Dnsruby/DNS.rb +3 -3
- data/lib/Dnsruby/Resolver.rb +11 -2
- data/lib/Dnsruby/SingleResolver.rb +28 -20
- data/lib/Dnsruby/code_mapper.rb +9 -4
- data/lib/Dnsruby/dnssec.rb +6 -3
- data/lib/Dnsruby/message.rb +108 -32
- data/lib/Dnsruby/resource/DLV.rb +27 -0
- data/lib/Dnsruby/resource/DNSKEY.rb +29 -7
- data/lib/Dnsruby/resource/DS.rb +97 -18
- data/lib/Dnsruby/resource/DS.rb.new +202 -0
- data/lib/Dnsruby/resource/DS.rb.orig +162 -0
- data/lib/Dnsruby/resource/NSEC.rb +22 -6
- data/lib/Dnsruby/resource/OPT.rb +14 -13
- data/lib/Dnsruby/resource/PX.rb +1 -1
- data/lib/Dnsruby/resource/RRSIG.rb +17 -9
- data/lib/Dnsruby/resource/RT.rb +1 -1
- data/lib/Dnsruby/resource/TSIG.rb +4 -0
- data/lib/Dnsruby/resource/generic.rb +2 -1
- data/lib/Dnsruby/resource/resource.rb +23 -8
- data/lib/Dnsruby/select_thread.rb +15 -7
- data/lib/Dnsruby/update.rb +3 -3
- data/lib/Dnsruby/zone_transfer.rb +1 -1
- data/lib/dnsruby.rb +4 -2
- data/test/tc_dns.rb +1 -1
- data/test/tc_ds.rb +47 -4
- data/test/tc_em_deferrable.rb +38 -0
- data/test/tc_event_machine_res.rb +1 -1
- data/test/tc_header.rb +2 -2
- data/test/tc_inet6.rb +170 -0
- data/test/tc_nsec3.rb +6 -5
- data/test/tc_packet.rb +18 -4
- data/test/tc_queue.rb +17 -0
- data/test/tc_resolver.rb +14 -14
- data/test/tc_rr-opt.rb +21 -2
- data/test/tc_rr.rb +4 -0
- data/test/tc_rrset.rb +2 -2
- data/test/tc_rrsig.rb +2 -2
- data/test/tc_tcp.rb +1 -1
- data/test/tc_tsig.rb +6 -6
- data/test/ts_offline.rb +17 -2
- data/test/ts_online.rb +4 -0
- metadata +496 -3
data/lib/Dnsruby/resource/PX.rb
CHANGED
@@ -91,8 +91,8 @@ module Dnsruby
|
|
91
91
|
@algorithm=Algorithms.RSASHA1
|
92
92
|
@type_covered = Types.A
|
93
93
|
@original_ttl = 3600
|
94
|
-
@inception = Time.now
|
95
|
-
@expiration = Time.now
|
94
|
+
@inception = Time.now
|
95
|
+
@expiration = Time.now
|
96
96
|
@key_tag = 0
|
97
97
|
@labels = 0
|
98
98
|
self.signers_name="."
|
@@ -133,8 +133,10 @@ module Dnsruby
|
|
133
133
|
|
134
134
|
|
135
135
|
def from_data(data) #:nodoc: all
|
136
|
-
type_covered, algorithm, @labels, @original_ttl,
|
136
|
+
type_covered, algorithm, @labels, @original_ttl, expiration, inception,
|
137
137
|
@key_tag, signers_name, @signature = data
|
138
|
+
@expiration = Time.at(expiration)
|
139
|
+
@inception = Time.at(inception)
|
138
140
|
self.type_covered=(type_covered)
|
139
141
|
self.signers_name=(signers_name)
|
140
142
|
self.algorithm=(algorithm)
|
@@ -194,7 +196,7 @@ module Dnsruby
|
|
194
196
|
# digits, while the decimal representation of a 32-bit unsigned integer
|
195
197
|
# can never be longer than 10 digits.
|
196
198
|
if (input.length == 10)
|
197
|
-
return input
|
199
|
+
return input
|
198
200
|
elsif (input.length == 14)
|
199
201
|
year = input[0,4]
|
200
202
|
mon=input[4,2]
|
@@ -202,18 +204,24 @@ module Dnsruby
|
|
202
204
|
hour=input[8,2]
|
203
205
|
min=input[10,2]
|
204
206
|
sec=input[12,2]
|
205
|
-
return Time.mktime(year, mon, day, hour, min, sec)
|
207
|
+
return Time.mktime(year, mon, day, hour, min, sec)
|
206
208
|
else
|
207
209
|
raise DecodeError.new("RRSIG : Illegal time value #{input} - see RFC 4034 section 3.2")
|
208
210
|
end
|
209
211
|
end
|
210
212
|
|
213
|
+
def format_time(time)
|
214
|
+
return time.strftime("%Y%m%d%H%M%S")
|
215
|
+
end
|
216
|
+
|
211
217
|
def rdata_to_string #:nodoc: all
|
212
218
|
if (@type_covered!=nil)
|
213
219
|
# signature = Base64.encode64(@signature) # .gsub(/\n/, "")
|
214
220
|
signature = [@signature].pack("m*") # .gsub(/\n/, "")
|
221
|
+
# @TODO@ Display the expiration and inception as
|
215
222
|
return "#{@type_covered.string} #{@algorithm.string} #{@labels} #{@original_ttl} " +
|
216
|
-
"#{@expiration} ( #{@inception}
|
223
|
+
"#{format_time(@expiration)} ( #{format_time(@inception)} " +
|
224
|
+
"#{@key_tag} #{@signers_name} #{signature} )"
|
217
225
|
else
|
218
226
|
return ""
|
219
227
|
end
|
@@ -235,8 +243,8 @@ module Dnsruby
|
|
235
243
|
signers_name = msg.get_name
|
236
244
|
signature = msg.get_bytes
|
237
245
|
return self.new(
|
238
|
-
[type_covered, algorithm, labels, original_ttl, expiration,
|
239
|
-
inception, key_tag, signers_name, signature])
|
246
|
+
[type_covered, algorithm, labels, original_ttl, Time.at(expiration),
|
247
|
+
Time.at(inception), key_tag, signers_name, signature])
|
240
248
|
end
|
241
249
|
|
242
250
|
def sig_data
|
@@ -245,7 +253,7 @@ module Dnsruby
|
|
245
253
|
#the Signature field excluded;
|
246
254
|
data = MessageEncoder.new { |msg|
|
247
255
|
msg.put_pack('ncc', @type_covered.to_i, @algorithm.to_i, @labels)
|
248
|
-
msg.put_pack("NNN", @original_ttl, @expiration, @inception)
|
256
|
+
msg.put_pack("NNN", @original_ttl, @expiration.to_i, @inception.to_i)
|
249
257
|
msg.put_pack("n", @key_tag)
|
250
258
|
msg.put_name(@signers_name, true)
|
251
259
|
}.to_s
|
data/lib/Dnsruby/resource/RT.rb
CHANGED
@@ -218,7 +218,15 @@ module Dnsruby
|
|
218
218
|
alias :rr_type :type
|
219
219
|
|
220
220
|
def klass=(klass)
|
221
|
-
@
|
221
|
+
if (@type != Types.OPT)
|
222
|
+
@klass= Classes.new(klass)
|
223
|
+
else
|
224
|
+
if (klass.class == Classes)
|
225
|
+
@klass = klass
|
226
|
+
else
|
227
|
+
@klass = Classes.new("CLASS#{klass}")
|
228
|
+
end
|
229
|
+
end
|
222
230
|
end
|
223
231
|
|
224
232
|
# Determines if two Records could be part of the same RRset.
|
@@ -411,7 +419,10 @@ module Dnsruby
|
|
411
419
|
rdlength = args[4]
|
412
420
|
data = args[5]
|
413
421
|
offset = args[6]
|
414
|
-
rdata =
|
422
|
+
rdata = []
|
423
|
+
if (data != nil)
|
424
|
+
rdata = data[offset, rdlength]
|
425
|
+
end
|
415
426
|
|
416
427
|
record = nil
|
417
428
|
MessageDecoder.new(rdata) {|msg|
|
@@ -478,11 +489,15 @@ module Dnsruby
|
|
478
489
|
|
479
490
|
def ==(other)
|
480
491
|
return false unless self.class == other.class
|
481
|
-
|
492
|
+
ivars = self.instance_variables
|
493
|
+
s_ivars = []
|
494
|
+
ivars.each {|i| s_ivars << i.to_s} # Ruby 1.9
|
482
495
|
s_ivars.sort!
|
483
496
|
s_ivars.delete "@ttl" # RFC 2136 section 1.1
|
484
497
|
|
485
|
-
|
498
|
+
ivars = other.instance_variables
|
499
|
+
o_ivars = []
|
500
|
+
ivars.each {|i| o_ivars << i.to_s} # Ruby 1.9
|
486
501
|
o_ivars.sort!
|
487
502
|
o_ivars.delete "@ttl" # RFC 2136 section 1.1
|
488
503
|
|
@@ -507,9 +522,9 @@ module Dnsruby
|
|
507
522
|
|
508
523
|
#Get an RR of the specified type and class
|
509
524
|
def self.get_class(type_value, class_value) #:nodoc: all
|
510
|
-
|
511
|
-
|
512
|
-
|
525
|
+
if (type_value == Types.OPT)
|
526
|
+
return Class.new(OPT)
|
527
|
+
end
|
513
528
|
if (type_value.class == Class)
|
514
529
|
type_value = type_value.const_get(:TypeValue)
|
515
530
|
return ClassHash[[type_value, Classes.to_code(class_value)]] ||
|
@@ -526,7 +541,7 @@ module Dnsruby
|
|
526
541
|
class_value = Classes.new(class_value).code
|
527
542
|
end
|
528
543
|
return ClassHash[[type_value, class_value]] ||
|
529
|
-
|
544
|
+
Generic.create(type_value, class_value)
|
530
545
|
end
|
531
546
|
return ret
|
532
547
|
end
|
@@ -120,7 +120,7 @@ module Dnsruby
|
|
120
120
|
while true do
|
121
121
|
send_tick_to_observers
|
122
122
|
send_queued_exceptions
|
123
|
-
timeout = tick_time = 0.
|
123
|
+
timeout = tick_time = 0.5 # We provide a timer service to various Dnsruby classes
|
124
124
|
sockets=[]
|
125
125
|
timeouts=[]
|
126
126
|
has_observer = false
|
@@ -187,7 +187,13 @@ module Dnsruby
|
|
187
187
|
udp_packet_size = query_settings.udp_packet_size
|
188
188
|
msg, bytes = get_incoming_data(socket, udp_packet_size)
|
189
189
|
if (msg!=nil)
|
190
|
-
|
190
|
+
# Check that the IP we received from was the IP we sent to!
|
191
|
+
if ((msg.answerip != query_settings.dest_server) &&
|
192
|
+
(msg.answerfrom != query_settings.dest_server))
|
193
|
+
Dnsruby.log.warn("Unsolicited response received from #{answerip}")
|
194
|
+
else
|
195
|
+
send_response_to_client(msg, bytes, socket)
|
196
|
+
end
|
191
197
|
end
|
192
198
|
ready.delete(socket)
|
193
199
|
end
|
@@ -297,13 +303,13 @@ module Dnsruby
|
|
297
303
|
else
|
298
304
|
# recvfrom failed - why?
|
299
305
|
Dnsruby.log.error{"Error - recvfrom failed from #{socket}"}
|
300
|
-
handle_recvfrom_failure(socket)
|
306
|
+
handle_recvfrom_failure(socket, "")
|
301
307
|
return
|
302
308
|
end
|
303
309
|
end
|
304
310
|
rescue Exception => e
|
305
311
|
Dnsruby.log.error{"Error - recvfrom failed from #{socket}, exception : #{e}"}
|
306
|
-
handle_recvfrom_failure(socket)
|
312
|
+
handle_recvfrom_failure(socket, e)
|
307
313
|
return
|
308
314
|
end
|
309
315
|
Dnsruby.log.debug{";; answer from #{answerfrom} : #{answersize} bytes\n"}
|
@@ -325,12 +331,14 @@ module Dnsruby
|
|
325
331
|
Dnsruby.log.debug{"#{ans}"}
|
326
332
|
ans.answerfrom=(answerfrom)
|
327
333
|
ans.answersize=(answersize)
|
334
|
+
ans.answerip =(answerip)
|
328
335
|
end
|
329
336
|
return ans, buf
|
330
337
|
end
|
331
338
|
|
332
|
-
def handle_recvfrom_failure(socket)
|
333
|
-
#
|
339
|
+
def handle_recvfrom_failure(socket, exception)
|
340
|
+
# No way to notify the client about this error, unless there was only one connection on the socket
|
341
|
+
# Not a problem, as there only will ever be one connection on the socket (Kaminsky attack mitigation)
|
334
342
|
ids_for_socket = []
|
335
343
|
@@mutex.synchronize{
|
336
344
|
ids_for_socket = @@socket_hash[socket]
|
@@ -341,7 +349,7 @@ module Dnsruby
|
|
341
349
|
query_settings = @@query_hash[ids_for_socket[0]]
|
342
350
|
answerfrom=query_settings.dest_server
|
343
351
|
}
|
344
|
-
send_exception_to_client(OtherResolvError.new("recvfrom failed from #{answerfrom}"), socket, ids_for_socket[0])
|
352
|
+
send_exception_to_client(OtherResolvError.new("recvfrom failed from #{answerfrom}; #{exception}"), socket, ids_for_socket[0])
|
345
353
|
else
|
346
354
|
Dnsruby.log.fatal{"Recvfrom failed from #{socket}, no way to tell query id"}
|
347
355
|
end
|
data/lib/Dnsruby/update.rb
CHANGED
@@ -136,7 +136,7 @@ module Dnsruby
|
|
136
136
|
# update.present(name)
|
137
137
|
def present(*args)
|
138
138
|
ttl = 0
|
139
|
-
rdata =
|
139
|
+
rdata = ""
|
140
140
|
klass = Classes.ANY
|
141
141
|
if (args.length>=1) # domain (RFC2136, Section 2.4.4)
|
142
142
|
name = args[0]
|
@@ -172,7 +172,7 @@ module Dnsruby
|
|
172
172
|
#
|
173
173
|
def absent(*args)
|
174
174
|
ttl = 0
|
175
|
-
rdata =
|
175
|
+
rdata = ""
|
176
176
|
klass = Classes.NONE
|
177
177
|
if (args.length>=1) # domain (RFC2136, Section 2.4.5)
|
178
178
|
name = args[0]
|
@@ -242,7 +242,7 @@ module Dnsruby
|
|
242
242
|
def delete(*args)
|
243
243
|
ttl = 0
|
244
244
|
klass = Classes.ANY
|
245
|
-
rdata=
|
245
|
+
rdata=""
|
246
246
|
resource = nil
|
247
247
|
case args.length
|
248
248
|
when 1 # name
|
data/lib/dnsruby.rb
CHANGED
@@ -263,6 +263,7 @@ module Dnsruby
|
|
263
263
|
MAILB = 253 # RFC 1035 (MB, MG, MR)
|
264
264
|
MAILA = 254 # RFC 1035 (obsolete - see MX)
|
265
265
|
ANY = 255 # RFC 1035
|
266
|
+
DLV = 32769 # RFC 4431 (informational)
|
266
267
|
update()
|
267
268
|
|
268
269
|
def unknown_string(arg) #:nodoc: all
|
@@ -351,18 +352,19 @@ module Dnsruby
|
|
351
352
|
OPT = 41 # RFC 2671
|
352
353
|
end
|
353
354
|
|
355
|
+
# http://www.iana.org/assignments/dns-sec-alg-numbers/
|
354
356
|
class Algorithms < CodeMapper
|
355
357
|
RSAMD5 = 1
|
356
358
|
DH = 2
|
357
359
|
DSA = 3
|
358
360
|
ECC = 4
|
359
361
|
RSASHA1 = 5
|
360
|
-
DSANSEC3SHA1 = 131
|
361
|
-
RSASHA1NSEC3SHA1 = 133
|
362
362
|
INDIRECT = 252
|
363
363
|
PRIVATEDNS = 253
|
364
364
|
PRIVATEOID = 254
|
365
365
|
update()
|
366
|
+
add_pair("DSA-NSEC3-SHA1", 131)
|
367
|
+
add_pair("RSASHA1-NSEC3-SHA1", 133)
|
366
368
|
end
|
367
369
|
|
368
370
|
#An error raised while querying for a resource
|
data/test/tc_dns.rb
CHANGED
@@ -80,7 +80,7 @@ class TestDNS < Test::Unit::TestCase
|
|
80
80
|
#
|
81
81
|
Dnsruby.log.level=Logger::FATAL
|
82
82
|
[:nameserver].each do |test|
|
83
|
-
[{}, '
|
83
|
+
[{}, 'kjghdfkjhase',1,'\1',nil].each do |input|
|
84
84
|
res=nil
|
85
85
|
begin
|
86
86
|
res = Dnsruby::DNS.new({test => input})
|
data/test/tc_ds.rb
CHANGED
@@ -1,16 +1,30 @@
|
|
1
1
|
require 'test/unit'
|
2
|
+
require 'openssl'
|
2
3
|
require 'dnsruby'
|
3
4
|
|
4
5
|
class DsTest < Test::Unit::TestCase
|
5
6
|
INPUT = "dskey.example.com. 86400 IN DS 60485 5 1 ( 2BB183AF5F22588179A53B0A" +
|
6
7
|
"98631FAD1A292118 )"
|
8
|
+
DNSKEY = "dskey.example.com. 86400 IN DNSKEY 256 3 5 ( AQOeiiR0GOMYkDshWoSKz9Xz" +
|
9
|
+
"fwJr1AYtsmx3TGkJaNXVbfi/" +
|
10
|
+
"2pHm822aJ5iI9BMzNXxeYCmZ"+
|
11
|
+
"DRD99WYwYqUSdjMmmAphXdvx"+
|
12
|
+
"egXd/M5+X7OrzKBaMbCVdFLU"+
|
13
|
+
"Uh6DhweJBjEVv5f2wwjM9Xzc"+
|
14
|
+
"nOf+EPbtG9DMBmADjFDc2w/r"+
|
15
|
+
"ljwvFw== )" # key id = 60485
|
16
|
+
DS1 = "dskey.example.com. 86400 IN DS 60485 5 1 ( 2BB183AF5F22588179A53B0A"+
|
17
|
+
"98631FAD1A292118 )"
|
18
|
+
DS2 = "dskey.example.com. 86400 IN DS 60485 5 2 ( D4B7D520E7BB5F0F67674A0C"+
|
19
|
+
"CEB1E3E0614B93C4F9E99B83"+
|
20
|
+
"83F6A1E4469DA50A )"
|
7
21
|
include Dnsruby
|
8
22
|
def test_ds_from_string
|
9
23
|
ds = Dnsruby::RR.create(INPUT)
|
10
24
|
assert_equal(60485, ds.key_tag)
|
11
25
|
assert_equal(Algorithms.RSASHA1, ds.algorithm)
|
12
26
|
assert_equal(1, ds.digest_type)
|
13
|
-
assert_equal("2BB183AF5F22588179A53B0A98631FAD1A292118",
|
27
|
+
assert_equal("2BB183AF5F22588179A53B0A98631FAD1A292118", ds.digest)
|
14
28
|
|
15
29
|
ds2 = Dnsruby::RR.create(ds.to_s)
|
16
30
|
assert(ds2.to_s == ds.to_s)
|
@@ -28,11 +42,40 @@ class DsTest < Test::Unit::TestCase
|
|
28
42
|
|
29
43
|
def test_ds_values
|
30
44
|
ds = Dnsruby::RR.create(INPUT)
|
45
|
+
ds.digest_type = 2
|
46
|
+
# Be liberal in what you accept...
|
47
|
+
# begin
|
48
|
+
# ds.digest_type = 3
|
49
|
+
# fail
|
50
|
+
#
|
51
|
+
# rescue DecodeError
|
52
|
+
# end
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_ds_digest
|
56
|
+
key = Dnsruby::RR.create(DNSKEY)
|
57
|
+
|
58
|
+
# and check it is the same as DS
|
59
|
+
right_ds = Dnsruby::RR.create(DS1)
|
60
|
+
ds = Dnsruby::RR::DS.from_key(key, 1);
|
61
|
+
assert_equal(ds.to_s, right_ds.to_s)
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_sha2
|
31
65
|
begin
|
32
|
-
|
33
|
-
|
34
|
-
|
66
|
+
s = OpenSSL::Digest::SHA256
|
67
|
+
rescue Exception
|
68
|
+
print "SHA256 not available - skipping that test\n"
|
69
|
+
return
|
35
70
|
end
|
71
|
+
|
72
|
+
# Create a new DS from the DNSKEY,
|
73
|
+
key = Dnsruby::RR.create(DNSKEY)
|
74
|
+
|
75
|
+
# and check it is the same as DS
|
76
|
+
right_ds = Dnsruby::RR.create(DS2)
|
77
|
+
ds = Dnsruby::RR::DS.from_key(key, 2);
|
78
|
+
assert_equal(ds.to_s, right_ds.to_s)
|
36
79
|
end
|
37
80
|
|
38
81
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__),'..','lib')
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'test/unit'
|
5
|
+
require 'eventmachine'
|
6
|
+
require 'dnsruby'
|
7
|
+
#begin
|
8
|
+
# require 'test/tc_single_resolver'
|
9
|
+
#rescue Exception
|
10
|
+
# require 'tc_single_resolver'
|
11
|
+
#end
|
12
|
+
|
13
|
+
class EmDeferrableTest < Test::Unit::TestCase
|
14
|
+
Dnsruby::Resolver.use_eventmachine(true)
|
15
|
+
def setup
|
16
|
+
Dnsruby::Resolver.use_eventmachine(true)
|
17
|
+
end
|
18
|
+
def teardown
|
19
|
+
Dnsruby::Resolver.use_eventmachine(false)
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_deferrable_success
|
23
|
+
res = Dnsruby::SingleResolver.new
|
24
|
+
Dnsruby::Resolver.use_eventmachine
|
25
|
+
q = Queue.new
|
26
|
+
id = 1
|
27
|
+
done = false
|
28
|
+
EM.run {
|
29
|
+
df = res.send_async(Dnsruby::Message.new("nominet.org.uk"))
|
30
|
+
df.callback {|id, msg| puts "callback: #{id}, #{msg}"; done = true; EM.stop}
|
31
|
+
df.errback {|id, msg, err| puts "errback: #{id}, #{msg}, #{err}"; done = true; EM.stop}
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_deferrable_timeout
|
36
|
+
flunk("IMPLEMENT!")
|
37
|
+
end
|
38
|
+
end
|
@@ -76,7 +76,7 @@ class EventMachineTestResolver < Test::Unit::TestCase
|
|
76
76
|
res.send_async(Message.new("dklfjhdFHFHDVVUIEWRFDSAJKVCNASDLFJHN.com", Types.A), q, 1)
|
77
77
|
id, m, err = q.pop
|
78
78
|
assert(id==1)
|
79
|
-
assert(m.
|
79
|
+
assert(m.rcode == RCode.NXDOMAIN)
|
80
80
|
assert(err.kind_of?(NXDomain))
|
81
81
|
end
|
82
82
|
|