dronebl.rb 0.0.7 → 0.0.8

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/dronebl-query +8 -10
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16aacfdd77793ba2bae1402a73575a2db7912a7e
4
- data.tar.gz: 527db5ba7211b2749e9cd2ae3f67f21e84cd1d8f
3
+ metadata.gz: 1d66127bc3d43209adaf898f73ba66da16401bf1
4
+ data.tar.gz: d8291d4f11a19a2ab61fe4220d855ecf23c7eb54
5
5
  SHA512:
6
- metadata.gz: e2b93b28351acfd7cf7a852e91391c5181bba903bc3e999d53283d0988b44a0a7bd2bd82c9e362d6a46c62b9dc20ef14ac1874f77801162657ec47502fc73fa3
7
- data.tar.gz: 7d75a555e29fb494abac771e65cd1c47156289a39d9111eb498592b4d3da4c9a81b7a401100e13b4ac6af6aede924e755809d0ea3c3c56b063defbb95aca02f3
6
+ metadata.gz: 10202104b870aac783b9fa61336bbd8e009e0cb50097aec27061471c799d7f30b5991f76e04115d74c1231d0fe99eb3e6333ee2c297181a285d0a305d7812b19
7
+ data.tar.gz: ef67201d804afa8365f4eb1a3110c1b9138f9faac118d9beb202d6c8858dfec4c35fc743028b6b0d2507d2cebc1cd80aa6ed1cb781a6fcf7e2ad22789a24e4b6
data/bin/dronebl-query CHANGED
@@ -109,18 +109,16 @@ end
109
109
 
110
110
  opts.ips.uniq!
111
111
 
112
- prevalid, ipv6 = opts.ips.partition { |ip| (ip.match(Resolv::IPv6::Regex).nil?) }
113
- valid, invalid = prevalid.partition { |ip| !(ip.match(Resolv::IPv4::Regex).nil?) }
114
- invalid += ipv6
112
+ query, ipv6 = opts.ips.partition { |ip| (ip.match(Resolv::IPv6::Regex).nil?) }
115
113
  if @dry_run
116
- puts DroneBL::gen_lookup_query valid, opts.get_archived
117
- puts "#{valid.count} IPs will be looked up."
114
+ puts DroneBL::gen_lookup_query query, opts.get_archived
115
+ puts "#{query.count} IPs will be looked up."
118
116
  else
119
- response = DroneBL::lookup(valid, opts.get_archived)
117
+ response = DroneBL::lookup(query, opts.get_archived)
120
118
  print_table response, opts.long_types
121
- puts "#{valid.count} IPs looked up. #{response.map { |r| r['ip'] }.uniq.length} unique IPs found in response."
119
+ puts "#{query.count} IPs looked up. #{response.map { |r| r['ip'] }.uniq.length} unique IPs found in response."
122
120
  end
123
- unless invalid.empty?
124
- puts "IPs not valid for lookup: "
125
- invalid.each { |ip| puts ip }
121
+ unless ipv6.empty?
122
+ puts "IPs not query for lookup: "
123
+ ipv6.each { |ip| puts ip }
126
124
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dronebl.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rylee Fowler