passivedns-client 1.3.1 → 1.3.2

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
  SHA1:
3
- metadata.gz: 49cc9d7810af4882b1baca23cd5066c42064cc04
4
- data.tar.gz: ab776bf92b0aa16d43ad33745dd9bf1a0ab16bea
3
+ metadata.gz: cde5271625d34d5936db557dd2d91d7a4eff23bd
4
+ data.tar.gz: b119c8deccbc64b2b174cdb58af80e399e420e33
5
5
  SHA512:
6
- metadata.gz: 9d600182b9e748b3bc809afdf0605aa679119395dce243d8f5616744289bab90a8ca58132d10d61580fa0300a2b64a0ef0ae9a2b2de856d5261f3fe27c9f1b3c
7
- data.tar.gz: 4be5b593b42516174bb70c53da866f99c714a9d666695f5f92e0a85788944a0de34800da39fc93283446b39ca3db6892bb3476259174fb6288e1d31e7e331a8e
6
+ metadata.gz: 7558c0115c300fbb8f6fead3ae4035dacbd9262d273599c541c1e8ed82aa29f0db1b072fc9f3256c9bc469ef87d3446f8d02d2360b84e4c9a2133aacc5c9c6a4
7
+ data.tar.gz: db8efada307bb6d5df8a8eacf6138a8e60b08b5cc85bf7db80e564e406b87bb6fc7c34f3aca743546ef11ff066bff5f8eefeb2f1ab984a479493ee7ccc5467aa
@@ -40,6 +40,10 @@ To obtain an API Key, go to http://www.tcpiputils.com/premium-access and purchas
40
40
  data.each do |rec|
41
41
  recs << PDNSResult.new("tcpiputils", delta, question, rec["dns"], "MX", nil, nil, rec["updatedate"], nil)
42
42
  end
43
+ when "domains"
44
+ data.each do |rec|
45
+ recs << PDNSResult.new("tcpiputils", delta, rec, question, "A", nil, nil, nil, nil)
46
+ end
43
47
  end
44
48
  end
45
49
  recs
@@ -47,7 +51,8 @@ To obtain an API Key, go to http://www.tcpiputils.com/premium-access and purchas
47
51
 
48
52
  def lookup(label, limit=nil)
49
53
  $stderr.puts "DEBUG: TCPIPUtils.lookup(#{label})" if @debug
50
- url = "https://www.utlsapi.com/api.php?version=1.0&apikey=#{@apikey}&type=domainipdnshistory&q=#{label}"
54
+ type = (label.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)) ? "domainneighbors" : "domainipdnshistory"
55
+ url = "https://www.utlsapi.com/api.php?version=1.0&apikey=#{@apikey}&type=#{type}&q=#{label}"
51
56
  recs = []
52
57
  Timeout::timeout(240) {
53
58
  url = URI.parse url
@@ -1,5 +1,5 @@
1
1
  module PassiveDNS
2
2
  class Client
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
@@ -47,6 +47,12 @@ class TestPassiveDnsQuery < Test::Unit::TestCase
47
47
  assert_not_nil(rows.to_json)
48
48
  assert_not_nil(rows.to_yaml)
49
49
  assert_equal(3, rows.length)
50
+ rows = PassiveDNS::BFK.new.lookup("8.8.8.8")
51
+ assert_not_nil(rows)
52
+ assert_not_nil(rows.to_s)
53
+ assert_not_nil(rows.to_xml)
54
+ assert_not_nil(rows.to_json)
55
+ assert_not_nil(rows.to_yaml)
50
56
  end
51
57
 
52
58
  def test_CERTEE
@@ -62,6 +68,12 @@ class TestPassiveDnsQuery < Test::Unit::TestCase
62
68
  assert_not_nil(rows.to_json)
63
69
  assert_not_nil(rows.to_yaml)
64
70
  assert_equal(3, rows.length)
71
+ rows = PassiveDNS::CERTEE.new.lookup("8.8.8.8")
72
+ assert_not_nil(rows)
73
+ assert_not_nil(rows.to_s)
74
+ assert_not_nil(rows.to_xml)
75
+ assert_not_nil(rows.to_json)
76
+ assert_not_nil(rows.to_yaml)
65
77
  end
66
78
 
67
79
  def test_DNSDB
@@ -76,6 +88,12 @@ class TestPassiveDnsQuery < Test::Unit::TestCase
76
88
  assert_not_nil(rows.to_json)
77
89
  assert_not_nil(rows.to_yaml)
78
90
  assert_equal(3, rows.length) # this will fail since DNSDB has an off by one error
91
+ rows = PassiveDNS::DNSDB.new.lookup("8.8.8.8")
92
+ assert_not_nil(rows)
93
+ assert_not_nil(rows.to_s)
94
+ assert_not_nil(rows.to_xml)
95
+ assert_not_nil(rows.to_json)
96
+ assert_not_nil(rows.to_yaml)
79
97
  end
80
98
 
81
99
  def test_VirusTotal
@@ -90,6 +108,12 @@ class TestPassiveDnsQuery < Test::Unit::TestCase
90
108
  assert_not_nil(rows.to_json)
91
109
  assert_not_nil(rows.to_yaml)
92
110
  assert_equal(3, rows.length)
111
+ rows = PassiveDNS::VirusTotal.new.lookup("8.8.8.8")
112
+ assert_not_nil(rows)
113
+ assert_not_nil(rows.to_s)
114
+ assert_not_nil(rows.to_xml)
115
+ assert_not_nil(rows.to_json)
116
+ assert_not_nil(rows.to_yaml)
93
117
  end
94
118
 
95
119
  def test_TCPIPUtils
@@ -110,5 +134,11 @@ class TestPassiveDnsQuery < Test::Unit::TestCase
110
134
  assert_not_nil(rows.to_json)
111
135
  assert_not_nil(rows.to_yaml)
112
136
  assert_equal(3, rows.length)
137
+ rows = PassiveDNS::TCPIPUtils.new.lookup("8.8.8.8")
138
+ assert_not_nil(rows)
139
+ assert_not_nil(rows.to_s)
140
+ assert_not_nil(rows.to_xml)
141
+ assert_not_nil(rows.to_json)
142
+ assert_not_nil(rows.to_yaml)
113
143
  end
114
144
  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: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - chrislee35
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-22 00:00:00.000000000 Z
11
+ date: 2014-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json