nslookupot 0.0.5 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b350d62a884591ff76da9f24fe07750ad72ad276f651a409ae68dea527e9807
4
- data.tar.gz: e4596168dc1a0ef224124897be48025baff86f93a01446ca96507050dbb9483d
3
+ metadata.gz: a70603270c739e775d3873bcdf853f18dbfb15202627dcde9c21c93d85846241
4
+ data.tar.gz: 82829d828069a267ce4d312ba18e1b65a1adb5f348dbec57bafbb4c40a2f436b
5
5
  SHA512:
6
- metadata.gz: 62b8389a2695f7455032d7141b78ab8664c3d8cc82fc2c912bf798666da179345202c81992e7c97c2a92a9da2d356d037389dc55c2a979082a6e0929eac95aba
7
- data.tar.gz: a8c46812459f07ba4942746239a73d780d3846fa43ba8752e2d7e565de402bf751442637b0880591c8ac83bbb257766ad7318eaa21b986574c958af3e9c22046
6
+ metadata.gz: 215dfe05b79bf4f5966dc3a505ec4028d4fd5776a7662e7baf145449aeb3409fe666753e95a9afafa8e6f3e1d536f8368e4915241e00081806d8604e5938ebe8
7
+ data.tar.gz: 9d9cb4a0c11de2290e03758f4033b24c643284b4dc69c841a87113d2fdf1993e49aa7283f1ee827ee3b53f413512380f30b0f4253a865e647421ece81768d3b1
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ source 'https://rubygems.org'
5
5
  gem 'caa_rr_patch'
6
6
  gem 'openssl'
7
7
  gem 'rake'
8
+ gem 'svcb_rr_patch'
8
9
 
9
10
  group :test do
10
11
  gem 'byebug'
data/README.md CHANGED
@@ -4,21 +4,21 @@
4
4
  [![CI](https://github.com/thekuwayama/nslookupot/workflows/CI/badge.svg)](https://github.com/thekuwayama/nslookupot/actions?workflow=CI)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/5df9157757f5a0bf1623/maintainability)](https://codeclimate.com/github/thekuwayama/nslookupot/maintainability)
6
6
 
7
- nslookupot is CLI that is `nslookup` over TLS (version 1.2).
7
+ nslookupot is CLI that is `nslookup` over TLS (version 1.3 or 1.2).
8
8
 
9
9
 
10
10
  ## Installation
11
11
 
12
12
  The gem is available at [rubygems.org](https://rubygems.org/gems/nslookupot). You can install with:
13
13
 
14
- ```bash
14
+ ```sh-session
15
15
  $ gem install nslookupot
16
16
  ```
17
17
 
18
18
 
19
19
  ## Usage
20
20
 
21
- ```bash
21
+ ```sh-session
22
22
  $ nslookupot --help
23
23
  Usage: nslookupot [options] name
24
24
  -s, --server VALUE the name server IP address (default 1.1.1.1)
@@ -30,7 +30,7 @@ Usage: nslookupot [options] name
30
30
 
31
31
  You can run it the following:
32
32
 
33
- ```bash
33
+ ```sh-session
34
34
  $ nslookupot example.com
35
35
  Address: 1.1.1.1#853
36
36
  --
@@ -42,7 +42,7 @@ Ttl: 2860
42
42
 
43
43
  If you need to resolve other than A type, you can run it the following:
44
44
 
45
- ```bash
45
+ ```sh-session
46
46
  $ nslookupot --type=cname www.youtube.com
47
47
  Address: 1.1.1.1#853
48
48
  --
@@ -54,7 +54,7 @@ Ttl: 1358
54
54
 
55
55
  If you need to query to `8.8.8.8`, you can run it the following:
56
56
 
57
- ```bash
57
+ ```sh-session
58
58
  $ nslookupot --server=8.8.8.8 --port=853 --hostname=dns.google www.google.com
59
59
  Address: 8.8.8.8#853
60
60
  --
@@ -66,7 +66,7 @@ Ttl: 223
66
66
 
67
67
  If you need to query to `9.9.9.9`, you can run it the following:
68
68
 
69
- ```bash
69
+ ```sh-session
70
70
  $ nslookupot --server=9.9.9.9 --port=853 --hostname=quad9.net www.quad9.net
71
71
  Address: 9.9.9.9#853
72
72
  --
data/lib/nslookupot.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'caa_rr_patch'
4
3
  require 'resolv'
4
+ require 'caa_rr_patch'
5
+ require 'svcb_rr_patch'
5
6
  require 'socket'
6
7
  require 'openssl'
7
8
  require 'optparse'
@@ -75,7 +75,12 @@ module Nslookupot
75
75
  # @return [OpenSSL::SSL::SSLSocket]
76
76
  def gen_sock
77
77
  ts = TCPSocket.new(@server, @port)
78
- ctx = OpenSSL::SSL::SSLContext.new('TLSv1_2')
78
+ ctx = OpenSSL::SSL::SSLContext.new
79
+ ctx.min_version = OpenSSL::SSL::TLS1_2_VERSION
80
+ ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION
81
+ ctx.max_version = OpenSSL::SSL::TLS1_3_VERSION \
82
+ if defined? OpenSSL::SSL::TLS1_3_VERSION
83
+ ctx.alpn_protocols = ['dot']
79
84
  sock = OpenSSL::SSL::SSLSocket.new(ts, ctx)
80
85
  sock.sync_close = true
81
86
  if @check_sni
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nslookupot
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.9'
5
5
  end
data/nslookupot.gemspec CHANGED
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'bundler'
25
25
  spec.add_dependency 'caa_rr_patch'
26
26
  spec.add_dependency 'openssl'
27
+ spec.add_dependency 'svcb_rr_patch'
27
28
  end
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.5
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - thekuwayama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-24 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: svcb_rr_patch
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: nslookup over TLS
56
70
  email:
57
71
  - thekuwayama@gmail.com
@@ -95,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  requirements: []
98
- rubygems_version: 3.1.2
112
+ rubygems_version: 3.2.22
99
113
  signing_key:
100
114
  specification_version: 4
101
115
  summary: nslookup over TLS