Skip to content

Instantly share code, notes, and snippets.

@colszowka
colszowka / dns_check.rb
Last active October 12, 2022 10:39
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)
<!DOCTYPE html>
<html lang='en'>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<meta charset="UTF-8">
<style>
.cell{
width:50px ;
height:50px;
padding: 0px;