passivedns-client 2.0.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: d29ccf361ef159d087a669bcb1c079cdcc9cd9d1
4
- data.tar.gz: b04ddd8e934977225087be6782540cf00b8a3e13
3
+ metadata.gz: 87b8057605ef62a693b4460fac1e72fd8c8a0afb
4
+ data.tar.gz: 9adef70cf9929f665e75a781f5e3216a9a3207c9
5
5
  SHA512:
6
- metadata.gz: f45ae94c974ebedcb3a2b3d05da9f1ce69698f34f4b275a31137508ef680381116d35525836345a6b8c1a72a4d0359d0261a939b96d3c73f243f8a007f2b0ef6
7
- data.tar.gz: aa2f36c8c9ded9632d07af3fbb4362212b6e461c0d63e60802404995ca2175f744134950470dac3802e30a4a61fab6bb7d7d57540c54e8fabe7416be505cd852
6
+ metadata.gz: 43d6004ae73822197e0db5e4cfced825462820d3b626c75574cbddaea2ab3c49ba301067e3c58113972cc25008f4b7967076571c6fd1ab72fef09b5faa781c96
7
+ data.tar.gz: 8ba404ddc64987dae536adf248a43ac6a30c9b658c71256d5cc27aa02c2e26243b22706676f80d5e733ddd06cc92cc4990b8b8ed215da3b88d7ed001114cb3be
data/README.md CHANGED
@@ -42,7 +42,7 @@ From version 2.0.0 on, all configuration keys for passive DNS providers are in o
42
42
 
43
43
  ## Getting Access
44
44
  * 360.cn : http://www.passivedns.cn
45
- * BFK.de : No registration required, but please, please ready their usage policy at http://bfk.de
45
+ * BFK.de : No registration required, but please, please ready their usage policy at http://www.bfk.de/bfk_dnslogger.html
46
46
  * CERT-EE : No registration required
47
47
  * DNSDB (Farsight Security) : https://api.dnsdb.info/
48
48
  * Mnemonic : mss .at. mnemonic.no
data/bin/pdnstool CHANGED
@@ -48,13 +48,7 @@ def printresults(state,format,sep="\t")
48
48
  end
49
49
  end
50
50
 
51
- def usage
52
- letter_map = {}
53
- PassiveDNS.constants.each do |const|
54
- if PassiveDNS.const_get(const).is_a?(Class) and PassiveDNS.const_get(const).superclass == PassiveDNS::PassiveDB
55
- letter_map[PassiveDNS.const_get(const).option_letter] = [PassiveDNS.const_get(const).name, PassiveDNS.const_get(const).config_section_name]
56
- end
57
- end
51
+ def usage(letter_map)
58
52
  databases = letter_map.keys.sort.join("")
59
53
 
60
54
  puts "Usage: #{$0} [-d [#{databases}]] [-g|-v|-m|-c|-x|-y|-j|-t] [-os <sep>] [-f <file>] [-r#|-w#|-v] [-l <count>] <ip|domain|cidr>"
@@ -103,6 +97,13 @@ opts = GetoptLong.new(
103
97
  [ '--limit', '-l', GetoptLong::REQUIRED_ARGUMENT ]
104
98
  )
105
99
 
100
+ letter_map = {}
101
+ PassiveDNS.constants.each do |const|
102
+ if PassiveDNS.const_get(const).is_a?(Class) and PassiveDNS.const_get(const).superclass == PassiveDNS::PassiveDB
103
+ letter_map[PassiveDNS.const_get(const).option_letter] = [PassiveDNS.const_get(const).name, PassiveDNS.const_get(const).config_section_name]
104
+ end
105
+ end
106
+
106
107
  # sets the default search methods
107
108
  pdnsdbs = []
108
109
  format = "text"
@@ -117,7 +118,7 @@ limit = nil
117
118
  opts.each do |opt, arg|
118
119
  case opt
119
120
  when '--help'
120
- usage
121
+ usage(letter_map)
121
122
  when '--debug'
122
123
  debug = true
123
124
  when '--database'
@@ -125,9 +126,10 @@ opts.each do |opt, arg|
125
126
  if c == ','
126
127
  next
127
128
  elsif letter_map[c]
128
- pdnsdbs = letter_map[c][1]
129
+ pdnsdbs << letter_map[c][1]
129
130
  else
130
- raise "Unknown passive DNS database identifier: #{c}"
131
+ $stderr.puts "ERROR: Unknown passive DNS database identifier: #{c}."
132
+ usage(letter_map)
131
133
  end
132
134
  end
133
135
  when '--gdf'
@@ -162,7 +164,7 @@ opts.each do |opt, arg|
162
164
  when '--limit'
163
165
  limit = arg.to_i
164
166
  else
165
- usage
167
+ usage(letter_map)
166
168
  end
167
169
  end
168
170
 
@@ -1,5 +1,5 @@
1
1
  module PassiveDNS
2
2
  class Client
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passivedns-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - chrislee35
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-08 00:00:00.000000000 Z
11
+ date: 2014-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json