dnsruby 1.73.0 → 1.73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/RELEASE_NOTES.md +3 -0
- data/cache_delay.rb +20 -0
- data/fd.ruby +33 -0
- data/lib/dnsruby/resource/CAA.rb +2 -2
- data/lib/dnsruby/version.rb +1 -1
- data/test/tc_caa.rb +1 -0
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2a1396a168f57eb47e7c1c1717234c6339758a1662282ee9d3b20621224080b
|
|
4
|
+
data.tar.gz: f99e64b08c29d90930dd4fea1159d840f8d942e8670599352a281ce1173f7561
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6a9810d20e6a0e159ac5960a290faaa60acb4d8035b67c29c04772cfa8147922708dbef6160cc99de7442e23ed71f177c9d51d2a340f1c24b7d81ad4f9c0071
|
|
7
|
+
data.tar.gz: 2810fb4b2522d8d97db1803f7ee23d761ee982e71063f970c47ed1d00ea9cf25926d8ee84f2a8747b70a6d5b76cc5f18eaf5b8739307c17a7645cbd3a9e91462
|
data/RELEASE_NOTES.md
CHANGED
data/cache_delay.rb
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require "dnsruby"
|
|
2
|
+
Dnsruby::TheLog.level = Logger::DEBUG
|
|
3
|
+
|
|
4
|
+
def testme
|
|
5
|
+
domain1 = "example.com"
|
|
6
|
+
domain2 = "example.net"
|
|
7
|
+
|
|
8
|
+
start_time = Time.now
|
|
9
|
+
resolver = Dnsruby::Resolver.new
|
|
10
|
+
resolver.query(domain1)
|
|
11
|
+
puts "First query time: #{Time.now - start_time} seconds"
|
|
12
|
+
|
|
13
|
+
start_time = Time.now
|
|
14
|
+
resolver = Dnsruby::Resolver.new
|
|
15
|
+
resolver.query(domain2)
|
|
16
|
+
puts "Second query time: #{Time.now - start_time} seconds"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
testme
|
|
20
|
+
testme
|
data/fd.ruby
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# frozen_string_literal: true
|
|
4
|
+
|
|
5
|
+
require 'dnsruby'
|
|
6
|
+
require 'thread'
|
|
7
|
+
|
|
8
|
+
#Dnsruby.log.level = Logger::DEBUG
|
|
9
|
+
|
|
10
|
+
# speed up the repro
|
|
11
|
+
NFILES = 30
|
|
12
|
+
nfiles, _ = Process.getrlimit(Process::RLIMIT_NOFILE)
|
|
13
|
+
Process.setrlimit(Process::RLIMIT_NOFILE, NFILES) if nfiles > NFILES
|
|
14
|
+
|
|
15
|
+
NAMESERVERS = ["192.31.80.30"]
|
|
16
|
+
|
|
17
|
+
Thread.new {
|
|
18
|
+
res = Dnsruby::Resolver.new(nameserver: NAMESERVERS, do_caching: false, query_timeout: 5)
|
|
19
|
+
loop do
|
|
20
|
+
begin
|
|
21
|
+
res.query("blahblahblah.com.edgekey.net", "CNAME")
|
|
22
|
+
rescue Dnsruby::ResolvError
|
|
23
|
+
end
|
|
24
|
+
sleep 0.2
|
|
25
|
+
end
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
loop do
|
|
29
|
+
# system("ls -l /proc/#{Process.pid}/fd/")
|
|
30
|
+
system("lsof -p #{Process.pid} | wc -l")
|
|
31
|
+
File.open("/") { |_| }
|
|
32
|
+
sleep 1
|
|
33
|
+
end
|
data/lib/dnsruby/resource/CAA.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Dnsruby
|
|
|
21
21
|
ClassValue = nil #:nodoc: all
|
|
22
22
|
TypeValue= Types::CAA #:nodoc: all
|
|
23
23
|
|
|
24
|
-
# The property tag for the record (issue|issuewild|iodef)
|
|
24
|
+
# The property tag for the record (issue|issuewild|issuemail|issuevmc|iodef|contactemail|contactphone)
|
|
25
25
|
attr_accessor :property_tag
|
|
26
26
|
# The value for the property_tag
|
|
27
27
|
attr_accessor :property_value
|
|
@@ -43,7 +43,7 @@ module Dnsruby
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def from_string(input) #:nodoc: all
|
|
46
|
-
matches = (/(\d+) (issuewild|issuemail|issue|iodef|contactemail|contactphone) "(.+)"$/i).match(input)
|
|
46
|
+
matches = (/(\d+) (issuewild|issuemail|issuevmc|issue|iodef|contactemail|contactphone) "(.+)"$/i).match(input)
|
|
47
47
|
if matches.nil?
|
|
48
48
|
raise DecodeError.new("Cannot parse record: #{input[0...1000]}")
|
|
49
49
|
end
|
data/lib/dnsruby/version.rb
CHANGED
data/test/tc_caa.rb
CHANGED
|
@@ -26,6 +26,7 @@ class TestCAA < Minitest::Test
|
|
|
26
26
|
'foo.com. IN CAA 1 issue "ca.example.net"' => [1, 'issue', 'ca.example.net'],
|
|
27
27
|
'foo.com. IN CAA 0 issuewild "ca.example.net"' => [0, 'issuewild', 'ca.example.net'],
|
|
28
28
|
'foo.com. IN CAA 0 issuemail "ca.example.net"' => [0, 'issuemail', 'ca.example.net'],
|
|
29
|
+
'foo.com. IN CAA 0 issuevmc "ca.example.net"' => [0, 'issuevmc', 'ca.example.net'],
|
|
29
30
|
'foo.com. IN CAA 0 iodef "mailto:security@example.com"' => [0, 'iodef', 'mailto:security@example.com'],
|
|
30
31
|
'foo.com. IN CAA 0 issue "ca.example.net; account=230123"' => [0, 'issue', 'ca.example.net; account=230123']
|
|
31
32
|
}.each do |text, data|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dnsruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.73.
|
|
4
|
+
version: 1.73.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Dalitz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -178,6 +178,7 @@ files:
|
|
|
178
178
|
- RELEASE_NOTES.md
|
|
179
179
|
- Rakefile
|
|
180
180
|
- SIGNED_UPDATES
|
|
181
|
+
- cache_delay.rb
|
|
181
182
|
- demo/axfr.rb
|
|
182
183
|
- demo/check_soa.rb
|
|
183
184
|
- demo/check_zone.rb
|
|
@@ -190,6 +191,7 @@ files:
|
|
|
190
191
|
- demo/to_resolve.txt
|
|
191
192
|
- demo/trace_dns.rb
|
|
192
193
|
- dnsruby.gemspec
|
|
194
|
+
- fd.ruby
|
|
193
195
|
- lib/dnsruby.rb
|
|
194
196
|
- lib/dnsruby/DNS.rb
|
|
195
197
|
- lib/dnsruby/bit_mapping.rb
|
|
@@ -366,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
366
368
|
- !ruby/object:Gem::Version
|
|
367
369
|
version: '0'
|
|
368
370
|
requirements: []
|
|
369
|
-
rubygems_version: 3.5.
|
|
371
|
+
rubygems_version: 3.5.16
|
|
370
372
|
signing_key:
|
|
371
373
|
specification_version: 4
|
|
372
374
|
summary: Ruby DNS(SEC) implementation
|