dnslookup 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dnslookup.rb +11 -6
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a85ade07116b6fb6569b918c3f0d5eac7f387901
|
4
|
+
data.tar.gz: bf32e5bde0dca6351ef662a3853295f1fb5f6431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7c47f90e0254cf6d36cafdc7870953a0970d6df2d1089267f393b1cade67a487ab38500c946042794b822d4acb57bc662848b221cd8805c109926b66d917f35
|
7
|
+
data.tar.gz: e06982219b97be85fee6d87cb3036e1ee3165189d3bd6c46e4ec1bdb589eb38f0e58474670ea5754981561a1c6a9d6c334528f9f70462fe02af9f5d98bdf524c
|
data/lib/dnslookup.rb
CHANGED
@@ -3,33 +3,38 @@ require 'optparse'
|
|
3
3
|
class DNSLookup
|
4
4
|
def initialize
|
5
5
|
@type = ''
|
6
|
-
@domain = ARGV.shift
|
7
6
|
|
8
7
|
parse_options
|
8
|
+
@domain = ARGV.shift
|
9
|
+
|
9
10
|
setup_query_servers
|
10
11
|
lookup_with_options
|
11
12
|
end
|
12
13
|
|
13
14
|
def parse_options
|
14
15
|
OptionParser.new do |opt|
|
15
|
-
opt.banner = "Usage
|
16
|
+
opt.banner = "Usage: dnslookup <domain name> [options]"
|
16
17
|
|
17
|
-
opt.on("-
|
18
|
+
opt.on("-m", "--mx", "Return MX records") do |v|
|
18
19
|
@type = 'mx'
|
19
20
|
end
|
20
21
|
|
21
|
-
opt.on("-a", "--
|
22
|
+
opt.on("-a", "--aname", "Return A name records") do |v|
|
22
23
|
@type = 'a'
|
23
24
|
end
|
24
25
|
|
25
|
-
opt.on("-c", "--
|
26
|
+
opt.on("-c", "--cname", "Return C name records") do |v|
|
26
27
|
@type = 'c'
|
27
28
|
end
|
28
29
|
|
29
|
-
opt.on("-
|
30
|
+
opt.on("-t", "--txt", "Return TXT records") do |v|
|
30
31
|
@type = 'txt'
|
31
32
|
end
|
32
33
|
|
34
|
+
opt.on("-i", "--internal", "Uses internal data center servers") do |v|
|
35
|
+
@internal = true
|
36
|
+
end
|
37
|
+
|
33
38
|
opt.on("-s", "--server=SERVER", "Specify specific name server to query") do |v|
|
34
39
|
@single_server = v
|
35
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnslookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor S. Keenan
|
@@ -10,8 +10,7 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2016-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: A simple gem that allows you to query
|
14
|
-
servers.
|
13
|
+
description: A simple gem that allows you to query public or specified DNS servers.
|
15
14
|
email: me@victorkeenan.com
|
16
15
|
executables:
|
17
16
|
- dnslookup
|