dnstools 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/dnstools-1.0.3.gem +0 -0
- data/lib/dns_tools.rb +2 -2
- data/lib/dns_tools/{serial_check.rb → ns_check.rb} +7 -4
- metadata +5 -4
data/dnstools-1.0.3.gem
ADDED
Binary file
|
data/lib/dns_tools.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module DNSTools
|
2
2
|
class Commands
|
3
3
|
|
4
|
-
desc "
|
5
|
-
def
|
6
|
-
root_resolver = Resolv::DNS.new(:nameserver => ['8.8.8.8'])
|
4
|
+
desc "nscheck example.com", "Checks the NS records for a domain and ensures they all return the same data"
|
5
|
+
def nscheck(domain)
|
6
|
+
root_resolver = Resolv::DNS.new(:nameserver => ['8.8.8.8', '141.1.1.1', '8.8.4.4'])
|
7
7
|
|
8
8
|
nameservers = root_resolver.getresources(domain, Resolv::DNS::Resource::IN::NS)
|
9
9
|
serials = []
|
@@ -15,11 +15,14 @@ module DNSTools
|
|
15
15
|
|
16
16
|
soa = ns_resolver.getresource(domain, Resolv::DNS::Resource::IN::SOA)
|
17
17
|
if soa
|
18
|
-
|
18
|
+
ip = root_resolver.getresource(ns.name.to_s, Resolv::DNS::Resource::IN::ANY)
|
19
|
+
print ip.address.to_s.ljust(25)
|
20
|
+
print soa.serial
|
19
21
|
serials << soa.serial
|
20
22
|
else
|
21
23
|
puts "No SOA record found"
|
22
24
|
end
|
25
|
+
puts
|
23
26
|
$stdout.flush
|
24
27
|
end
|
25
28
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnstools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-11-15 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &70352182662860 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 0.16.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70352182662860
|
25
25
|
description:
|
26
26
|
email: adam@atechmedia.com
|
27
27
|
executables:
|
@@ -31,8 +31,9 @@ extra_rdoc_files: []
|
|
31
31
|
files:
|
32
32
|
- bin/dnstools
|
33
33
|
- dnstools-1.0.2.gem
|
34
|
+
- dnstools-1.0.3.gem
|
34
35
|
- dnstools.gemspec
|
35
|
-
- lib/dns_tools/
|
36
|
+
- lib/dns_tools/ns_check.rb
|
36
37
|
- lib/dns_tools.rb
|
37
38
|
homepage: http://atechmedia.com
|
38
39
|
licenses: []
|