Skip to content

Instantly share code, notes, and snippets.

View tpal94's full-sized avatar

Tushar Pal tpal94

  • Protonshub Technologies
  • Indore
  • X @tpal94
View GitHub Profile
@tpal94
tpal94 / dns_check.rb
Created March 31, 2018 04:33 — forked from colszowka/dns_check.rb
Ruby DNS Check
require 'resolv'
class DnsCheck
attr_reader :host
def initialize(host)
@host = host
end
def a
@a ||= Resolv::DNS.new.getresources(host, Resolv::DNS::Resource::IN::A)