dns-sniper 0.0.1.pre6 → 0.0.1.pre7
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/Gemfile.lock +6 -7
- data/README.md +14 -22
- data/config.yml.example +9 -0
- data/dns-sniper.gemspec +2 -2
- data/lib/dns-sniper/hostnames.rb +2 -2
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdb713f65960730a1ac99906c65aeb79b30b69514eedab948ee20eb27bf30920
|
4
|
+
data.tar.gz: 28d04385a9759e9bada850e6c4dde26d7f3d983ddedd9d5782d31c6001cab19d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c02d1bb299780f04041d8899aeb72b7457ec8954184c95a0bae61731c1b36763f44055b41d4e8115c42bf0ccfdb68b407db3aef5ff71a3dc0e01d8dde0bcee99
|
7
|
+
data.tar.gz: fd3f08b34762d39e3610ad23810736a667e83f7b77459d8508e625f67007b0fa7adcd028091c65c4f05e28f39eacc6d805313e6733c9d8592f4657b5ade50e2b
|
data/Gemfile.lock
CHANGED
@@ -1,26 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sniper (0.0.1)
|
4
|
+
dns-sniper (0.0.1.pre6)
|
5
|
+
down (~> 5.1)
|
6
|
+
hosts_file (~> 1.0)
|
5
7
|
|
6
8
|
GEM
|
7
9
|
remote: https://rubygems.org/
|
8
10
|
specs:
|
9
11
|
addressable (2.7.0)
|
10
12
|
public_suffix (>= 2.0.2, < 5.0)
|
11
|
-
down (5.
|
13
|
+
down (5.2.2)
|
12
14
|
addressable (~> 2.5)
|
13
15
|
hosts_file (1.0.3)
|
14
|
-
public_suffix (4.0.
|
16
|
+
public_suffix (4.0.6)
|
15
17
|
|
16
18
|
PLATFORMS
|
17
19
|
ruby
|
18
20
|
|
19
21
|
DEPENDENCIES
|
20
|
-
|
21
|
-
down (~> 5.1)
|
22
|
-
hosts_file (~> 1.0)
|
23
|
-
sniper!
|
22
|
+
dns-sniper!
|
24
23
|
|
25
24
|
BUNDLED WITH
|
26
25
|
2.1.2
|
data/README.md
CHANGED
@@ -40,26 +40,19 @@ require 'dns-sniper'
|
|
40
40
|
|
41
41
|
hostnames = DNSSniper::Hostnames.new
|
42
42
|
|
43
|
-
#
|
44
|
-
hostnames.
|
45
|
-
hostnames.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
hostnames.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
# Manually remove domain name
|
57
|
-
hostnames.remove('favoritewebsite.com')
|
58
|
-
hostnames.remove(['favoritewebsite.com', 'otherfavoritewebsite.com'])
|
59
|
-
|
60
|
-
# Convert to configuration file
|
61
|
-
hostnames.to_format('dnsmasq')
|
62
|
-
hostnames.to_format('unbound')
|
43
|
+
# Manually add blacklisted or whitelisted domains
|
44
|
+
hostnames.blacklist += 'ads.yahoo.com'
|
45
|
+
hostnames.whitelist += 'favoritewebsite.com'
|
46
|
+
|
47
|
+
# Use an Importer to process external lists
|
48
|
+
hostnames.blacklist += DNSSniper::DomainsImporter.new('https://raw.githubusercontent.com/brodyhoskins/dns-blocklists/master/tracking.list').hostnames
|
49
|
+
hostnames.blacklist += DNSSniper::HostsImporter.new('https://pgl.yoyo.org/as/serverlist.php?hostformat=hosts;showintro=0;mimetype=plaintext').hostnames
|
50
|
+
|
51
|
+
# Blocklist is accessible as an Array
|
52
|
+
hostnames.blocklist
|
53
|
+
|
54
|
+
# Use an Exporter to convert to other formats
|
55
|
+
UnboundExporter.new(hostnames.blocklist).data
|
63
56
|
```
|
64
57
|
|
65
58
|
### From CLI
|
@@ -71,7 +64,6 @@ Using the CLI version makes it easy to update configuration formats automaticall
|
|
71
64
|
```bash
|
72
65
|
#!/usr/bin/env bash
|
73
66
|
|
74
|
-
/path/to/dns-sniper
|
75
|
-
|
67
|
+
/path/to/dns-sniper --conf ~/.config/dns-sniper/dns-sniper.yml --output unbound > /etc/unbound/unbound.conf.d/blocklist.conf
|
76
68
|
service unbound reload
|
77
69
|
```
|
data/config.yml.example
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
:sources:
|
2
|
+
:allow:
|
3
|
+
- :importer: :domains
|
4
|
+
:uri: https://example.com/whitelisted.domains.list
|
5
|
+
:reject:
|
6
|
+
- :importer: :domains
|
7
|
+
:uri: https://raw.githubusercontent.com/brodyhoskins/dns-blocklists/master/tracking.list
|
8
|
+
- :importer: :hosts
|
9
|
+
:uri: https://pgl.yoyo.org/as/serverlist.php?hostformat=hosts;showintro=0;mimetype=plaintext
|
data/dns-sniper.gemspec
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'dns-sniper'
|
5
5
|
spec.license = 'MIT'
|
6
|
-
spec.version = '0.0.1.
|
7
|
-
spec.date = '
|
6
|
+
spec.version = '0.0.1.pre7'
|
7
|
+
spec.date = '2021-07-26'
|
8
8
|
|
9
9
|
spec.authors = ['Brody Hoskins']
|
10
10
|
spec.email = ['brody@brody.digital']
|
data/lib/dns-sniper/hostnames.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dns-sniper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.pre7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brody Hoskins
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: down
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- README.md
|
55
55
|
- Rakefile
|
56
56
|
- bin/dns-sniper
|
57
|
+
- config.yml.example
|
57
58
|
- dns-sniper.gemspec
|
58
59
|
- lib/dns-sniper.rb
|
59
60
|
- lib/dns-sniper/exporter.rb
|
@@ -76,7 +77,7 @@ licenses:
|
|
76
77
|
metadata:
|
77
78
|
homepage_uri: https://github.com/brodyhoskins/dns-sniper
|
78
79
|
source_code_uri: https://github.com/brodyhoskins/dns-sniper
|
79
|
-
post_install_message:
|
80
|
+
post_install_message:
|
80
81
|
rdoc_options: []
|
81
82
|
require_paths:
|
82
83
|
- lib
|
@@ -91,8 +92,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
92
|
- !ruby/object:Gem::Version
|
92
93
|
version: 1.3.1
|
93
94
|
requirements: []
|
94
|
-
rubygems_version: 3.
|
95
|
-
signing_key:
|
95
|
+
rubygems_version: 3.2.15
|
96
|
+
signing_key:
|
96
97
|
specification_version: 4
|
97
98
|
summary: Combine DNS blacklists into desired configuration format
|
98
99
|
test_files: []
|