mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-06 08:06:53 +08:00
fix trailing '.' whois <-> dig dichotomy
- whois records don't have trailing '.'; NS records do. Add trailing '.'
This commit is contained in:
@@ -22,12 +22,14 @@ check_domain(domain)
|
|||||||
puts "[PASS] #{domain} basic check ('DOMAIN' variable set & not empty)"
|
puts "[PASS] #{domain} basic check ('DOMAIN' variable set & not empty)"
|
||||||
|
|
||||||
whois_nameservers = get_whois_nameservers(domain)
|
whois_nameservers = get_whois_nameservers(domain)
|
||||||
#whois_nameservers = [ 'ns-aws.nono.com', 'ns-he.nono.com' ] # testing
|
#whois_nameservers = [ 'ns-aws.nono.io', 'ns-he.nono.io', 'ns-gce.nono.io' ] # testing
|
||||||
|
# whois records don't have trail '.'; NS records do; add trailing '.'
|
||||||
|
whois_nameservers.map { |ns| ns << '.' }
|
||||||
puts "[PASS] #{domain} has whois entry with nameservers #{whois_nameservers.join(", ")}"
|
puts "[PASS] #{domain} has whois entry with nameservers #{whois_nameservers.join(", ")}"
|
||||||
|
|
||||||
whois_nameservers.each do |whois_nameserver|
|
whois_nameservers.each do |whois_nameserver|
|
||||||
dig = `dig +short ns sslip.io @#{whois_nameserver}`
|
dig = `dig +short ns sslip.io @#{whois_nameserver}`
|
||||||
dig_nameservers = dig.split(/\n+/)
|
dig_nameservers = dig.split(/\n+/)
|
||||||
if ( whois_nameservers.sort == dig_nameservers.sort )
|
if ( whois_nameservers.sort == dig_nameservers.sort )
|
||||||
puts "[PASS] #{whois_nameserver}'s NS records match whois"
|
puts "[PASS] #{whois_nameserver}'s NS records match whois"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user