nslookupot 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 327221d555480cece10786485fe2dcdda611e1808b95a4cc4e350a666ac20fa9
4
- data.tar.gz: 4132dc893b13642955b4cd830d73e98fadf4779ee03fd909abbf17ab83db3dc2
3
+ metadata.gz: 81b3ca6ca5e82d6b074475a599bd9c12d1384c6097622374bf43106e564cbf70
4
+ data.tar.gz: c25e186c8a66974471f161b0dcdde359e7d35e75cd14b17dca1a3e5f34bddbad
5
5
  SHA512:
6
- metadata.gz: 1bea793a0d39ffd71be4335e6fe67ae87531720ed95761134b016c87b09271de5f0231f181827fc4e3503b208b06154f84f3a700b01ac91492aa2047526588cb
7
- data.tar.gz: c902c61d252da40c0467a32a2457ed7976617e78a7de0ac1c47ef76f493c6ae8fdb3cfa87fafad3259c5e302a2475d751385b2a4ed2e28f79a931314e3e946b3
6
+ metadata.gz: 77653af1ab71445f2bc1c2ec64d8a9875b102805257a11905e45fa5e68398c401ddd94d3b0b95b6420e969f5f3f3ce13a9e7b4937b9d121ff437685c126fa68a
7
+ data.tar.gz: f4d63aa216d6018cfa09f28073ae23e6bd83aebb76b0f78a9408fcaceddfc38659ba24fdb9eef1a5e9b52f316b988835754fb7ff00f746c898e5aaad7a3ef248
data/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  nslookupot is CLI that is `nslookup` over TLS (version 1.3 or 1.2).
8
8
 
9
+ - https://datatracker.ietf.org/doc/html/rfc7858
10
+
9
11
 
10
12
  ## Installation
11
13
 
@@ -32,11 +34,12 @@ You can run it the following:
32
34
 
33
35
  ```sh-session
34
36
  $ nslookupot example.com
37
+ Server: 1.1.1.1
35
38
  Address: 1.1.1.1#853
36
- --
39
+
37
40
  Name: example.com
38
41
  Address: 93.184.216.34
39
- Ttl: 2860
42
+ Ttl: 83289
40
43
 
41
44
  ```
42
45
 
@@ -44,11 +47,12 @@ If you need to resolve other than A type, you can run it the following:
44
47
 
45
48
  ```sh-session
46
49
  $ nslookupot --type=cname www.youtube.com
50
+ Server: 1.1.1.1
47
51
  Address: 1.1.1.1#853
48
- --
52
+
49
53
  Name: www.youtube.com
50
54
  Name: youtube-ui.l.google.com
51
- Ttl: 1358
55
+ Ttl: 86400
52
56
 
53
57
  ```
54
58
 
@@ -56,11 +60,12 @@ If you need to query to `8.8.8.8`, you can run it the following:
56
60
 
57
61
  ```sh-session
58
62
  $ nslookupot --server=8.8.8.8 --port=853 --hostname=dns.google www.google.com
63
+ Server: 8.8.8.8
59
64
  Address: 8.8.8.8#853
60
- --
65
+
61
66
  Name: www.google.com
62
- Address: 172.217.24.132
63
- Ttl: 223
67
+ Address: 142.250.196.132
68
+ Ttl: 175
64
69
 
65
70
  ```
66
71
 
@@ -68,11 +73,12 @@ If you need to query to `9.9.9.9`, you can run it the following:
68
73
 
69
74
  ```sh-session
70
75
  $ nslookupot --server=9.9.9.9 --port=853 --hostname=quad9.net www.quad9.net
76
+ Server: 9.9.9.9
71
77
  Address: 9.9.9.9#853
72
- --
78
+
73
79
  Name: www.quad9.net
74
80
  Address: 216.21.3.77
75
- Ttl: 1200
81
+ Ttl: 100
76
82
 
77
83
  ```
78
84
 
@@ -116,7 +116,8 @@ module Nslookupot
116
116
  result.each do |rr|
117
117
  puts 'Name:'.ljust(16) + name
118
118
  rr.instance_variables.each do |var|
119
- k = "#{var[1..].capitalize}:".ljust(16)
119
+ k = var.to_s.delete('@').split('_').map(&:capitalize).join
120
+ k = "#{k}:".ljust(16)
120
121
  v = rr.instance_variable_get(var).to_s
121
122
  puts k + v
122
123
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nslookupot
4
- VERSION = '0.0.10'
4
+ VERSION = '0.0.11'
5
5
  end
data/spec/cli_spec.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative 'spec_helper'
4
4
 
5
+ # rubocop: disable Metrics/BlockLength
5
6
  RSpec.describe Nslookupot::CLI do
6
7
  context 'Resource Record (RR) TYPEs' do
7
8
  let(:cli) do
@@ -21,6 +22,8 @@ RSpec.describe Nslookupot::CLI do
21
22
  expect(cli.s2typeclass('TXT')).to eq Resolv::DNS::Resource::IN::TXT
22
23
  expect(cli.s2typeclass('WKS')).to eq Resolv::DNS::Resource::IN::WKS
23
24
  expect(cli.s2typeclass('CAA')).to eq Resolv::DNS::Resource::IN::CAA
25
+ expect(cli.s2typeclass('SVCB')).to eq Resolv::DNS::Resource::IN::SVCB
26
+ expect(cli.s2typeclass('HTTPS')).to eq Resolv::DNS::Resource::IN::HTTPS
24
27
  end
25
28
 
26
29
  it 'could raise NameError' do
@@ -30,3 +33,4 @@ RSpec.describe Nslookupot::CLI do
30
33
  end
31
34
  end
32
35
  end
36
+ # rubocop: enable Metrics/BlockLength.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nslookupot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - thekuwayama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-06 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler