lib/apullo/fingerprints/domain.rb in apullo-0.1.1 vs lib/apullo/fingerprints/domain.rb in apullo-0.1.2
- old
+ new
@@ -50,11 +50,15 @@
end
end.compact
values.reject(&:empty?).empty? ? [] : values
end
+ def whois_client
+ @whois_client ||= Whois::Client.new(timeout: 3)
+ end
+
def whois
- @whois ||= Whois.whois(target.host)
+ @whois ||= whois_client.lookup(target.host)
rescue Timeout::Error, Whois::Error
nil
end
def registrant_contacts