passivedns-client 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -4
- data/README.md +32 -0
- data/lib/passivedns/client/dnsdb.rb +5 -5
- data/lib/passivedns/client/version.rb +1 -1
- data/lib/passivedns/client/virustotal.rb +1 -1
- metadata +84 -107
- metadata.gz.sig +2 -2
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 06d7ff1c185b1d52a22829c78ac3f393527f4d61
|
4
|
+
data.tar.gz: b6fb23b393f3d87948da754ce6c4a69476fb280f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ade09d0cbf82ea14e6ea216b228e9b1434d5cac2cfc3ab54145ca7be77142880f0fedc220e77839422f9e38976752fbdf6ffdf68fd3ecfde61792ea91d8bc2cd
|
7
|
+
data.tar.gz: 08d846c8d67746c2864b627346641079c8daba8efe151334ff284b5bc7d2922deac58628d294104571f32481e67759903d13cdc8e1f916b050625c4f8bd9b94c
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,4 +1 @@
|
|
1
|
-
�N
|
2
|
-
��I�ė��yH�a,
|
3
|
-
�h�m�uw�K��
|
4
|
-
fx�4E,Am�y
|
1
|
+
��mѯm��]�y��!���N�I��̡U�媫=1��:���1:H�L�s��g�����0g�'$�Za�/dX�e�Dϳ�Y*�k���;���q�`��J|�����Usu4L:�?U�'!*j%@?�{Q[��H#c#u��߱�h��ܚ�d�@!�nv�=K�`Ȩ0�'����А���-"Ê�R�t�]M�i�m��2g�L���澠�rz�ݲ���{���xޢ<I4��P�B�K��"R������
|
data/README.md
CHANGED
@@ -23,6 +23,38 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
$ gem install passivedns-client
|
25
25
|
|
26
|
+
## Configuration
|
27
|
+
|
28
|
+
### DNSParse
|
29
|
+
|
30
|
+
The pdnstool looks for a configuration file for DNSParse to be located at $HOME/.dnsparse by default. It requires three items of information, one per line: the base URL, a username, and a password. E.g.,
|
31
|
+
|
32
|
+
https://dnsparse.wherever/query.php?submit=Search&format=json&querytext=
|
33
|
+
myusername
|
34
|
+
mypassword
|
35
|
+
|
36
|
+
### DNSDB (Farsight Security)
|
37
|
+
|
38
|
+
The DNSDB configuration file is located at $HOME/.dnsdb-query.conf by default. The format for its configuration file only requires one line in the following format:
|
39
|
+
|
40
|
+
APIKEY="0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
41
|
+
|
42
|
+
To request an API Key, please read https://api.dnsdb.info/.
|
43
|
+
|
44
|
+
### CERTEE
|
45
|
+
|
46
|
+
CERT-EE does not require any configuration.
|
47
|
+
BFK.de
|
48
|
+
|
49
|
+
BFK.de does not require any configuration. However, please read and abide by their usage policy at BFK.de. Currently, it just says not to perform automated queries.
|
50
|
+
|
51
|
+
### VirusTotal
|
52
|
+
|
53
|
+
VirusTotal's (https://www.virustotal.com) passive DNS database requires an apikey in $HOME/.virustotal. It is a 64 character hexstring on a single line.
|
54
|
+
|
55
|
+
01234567890abcdef01234567890abcdef01234567890abcdef01234567890abcdef
|
56
|
+
|
57
|
+
|
26
58
|
## Usage
|
27
59
|
|
28
60
|
require 'passivedns-client'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# DESCRIPTION: this is a module for pdns.rb, primarily used by pdnstool.rb, to query the Farsight Security passive DNS database
|
2
|
-
# details on the API are at https://dnsdb.
|
3
|
-
# to request an API key, please email dnsdb
|
2
|
+
# details on the API are at https://api.dnsdb.info/
|
3
|
+
# to request an API key, please email dnsdb-api at farsightsecurity dot com.
|
4
4
|
require 'net/http'
|
5
5
|
require 'net/https'
|
6
6
|
|
@@ -9,7 +9,7 @@ module PassiveDNS
|
|
9
9
|
attr_accessor :debug
|
10
10
|
@@base="https://api.dnsdb.info/lookup"
|
11
11
|
|
12
|
-
def initialize(config="#{ENV['HOME']}/.
|
12
|
+
def initialize(config="#{ENV['HOME']}/.dnsdb-query.conf")
|
13
13
|
@debug = false
|
14
14
|
if File.exist?(config)
|
15
15
|
@key = File.open(config).readline.chomp
|
@@ -18,10 +18,10 @@ module PassiveDNS
|
|
18
18
|
elsif @key =~ /^APIKEY=\"([0-9a-f]{64})\"/
|
19
19
|
@key = $1
|
20
20
|
else
|
21
|
-
raise "Format of configuration file (default: #{ENV['HOME']}/.
|
21
|
+
raise "Format of configuration file (default: #{ENV['HOME']}/.dnsdb-query.conf) is:\nAPIKEY=\"<key>\"\nE.g.,\nAPIKEY=\"d41d8cd98f00b204e9800998ecf8427ed41d8cd98f00b204e9800998ecf8427e\"\n"
|
22
22
|
end
|
23
23
|
else
|
24
|
-
raise "Configuration file for DNSDB is required for intialization\nFormat of configuration file (default: #{ENV['HOME']}/.
|
24
|
+
raise "Configuration file for DNSDB is required for intialization\nFormat of configuration file (default: #{ENV['HOME']}/.dnsdb-query.conf) is:\nAPIKEY=\"<key>\"\nE.g.,\nAPIKEY=\"d41d8cd98f00b204e9800998ecf8427ed41d8cd98f00b204e9800998ecf8427e\"\n"
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -11,7 +11,7 @@ module PassiveDNS
|
|
11
11
|
@apikey = File.open(config).read.split(/\n/)[0]
|
12
12
|
$stderr.puts "DEBUG: VirusTotal#initialize(#{@apikey})" if @debug
|
13
13
|
else
|
14
|
-
raise "Configuration file for VirusTotal is required for intialization\nFormat of configuration file (default: #{ENV['HOME']}/.
|
14
|
+
raise "Configuration file for VirusTotal is required for intialization\nFormat of configuration file (default: #{ENV['HOME']}/.virustotal) is the 64 hex character apikey on one line."
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
metadata
CHANGED
@@ -1,19 +1,13 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: passivedns-client
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 1.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.1
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- chrislee35
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
|
-
cert_chain:
|
10
|
+
cert_chain:
|
17
11
|
- |
|
18
12
|
-----BEGIN CERTIFICATE-----
|
19
13
|
MIIDYjCCAkqgAwIBAgIBADANBgkqhkiG9w0BAQUFADBXMREwDwYDVQQDDAhydWJ5
|
@@ -36,96 +30,88 @@ cert_chain:
|
|
36
30
|
jLXMQu2ZgISYwXNjNbGVHehut82U7U9oiHoWcrOGazaRUmGO9TXP+aJLH0gw2dcK
|
37
31
|
AfMglXPi
|
38
32
|
-----END CERTIFICATE-----
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
date: 2013-09-21 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
43
36
|
name: json
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
hash: 1
|
50
|
-
segments:
|
51
|
-
- 1
|
52
|
-
- 4
|
53
|
-
- 3
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
54
41
|
version: 1.4.3
|
55
|
-
prerelease: false
|
56
42
|
type: :runtime
|
57
|
-
|
58
|
-
|
43
|
+
prerelease: false
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.4.3
|
49
|
+
- !ruby/object:Gem::Dependency
|
59
50
|
name: sqlite3
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
hash: 29
|
66
|
-
segments:
|
67
|
-
- 1
|
68
|
-
- 3
|
69
|
-
- 3
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - '>='
|
54
|
+
- !ruby/object:Gem::Version
|
70
55
|
version: 1.3.3
|
71
|
-
prerelease: false
|
72
56
|
type: :runtime
|
73
|
-
|
74
|
-
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 1.3.3
|
63
|
+
- !ruby/object:Gem::Dependency
|
75
64
|
name: structformatter
|
76
|
-
|
77
|
-
|
78
|
-
requirements:
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
79
67
|
- - ~>
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
hash: 29
|
82
|
-
segments:
|
83
|
-
- 0
|
84
|
-
- 0
|
85
|
-
- 1
|
68
|
+
- !ruby/object:Gem::Version
|
86
69
|
version: 0.0.1
|
87
|
-
prerelease: false
|
88
70
|
type: :runtime
|
89
|
-
|
90
|
-
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.0.1
|
77
|
+
- !ruby/object:Gem::Dependency
|
91
78
|
name: bundler
|
92
|
-
|
93
|
-
|
94
|
-
requirements:
|
79
|
+
requirement: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
95
81
|
- - ~>
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
|
98
|
-
segments:
|
99
|
-
- 1
|
100
|
-
- 3
|
101
|
-
version: "1.3"
|
102
|
-
prerelease: false
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.3'
|
103
84
|
type: :development
|
104
|
-
requirement: *id004
|
105
|
-
- !ruby/object:Gem::Dependency
|
106
|
-
name: rake
|
107
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
|
-
requirements:
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
hash: 3
|
113
|
-
segments:
|
114
|
-
- 0
|
115
|
-
version: "0"
|
116
85
|
prerelease: false
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '1.3'
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: rake
|
93
|
+
requirement: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
117
98
|
type: :development
|
118
|
-
|
119
|
-
|
120
|
-
|
99
|
+
prerelease: false
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
description: This provides interfaces to various passive DNS databases to do the query
|
106
|
+
and to normalize the responses. The query tool also allows for recursive queries,
|
107
|
+
using an SQLite3 database to keep state.
|
108
|
+
email:
|
121
109
|
- rubygems@chrislee.dhs.org
|
122
|
-
executables:
|
110
|
+
executables:
|
123
111
|
- pdnstool
|
124
112
|
extensions: []
|
125
|
-
|
126
113
|
extra_rdoc_files: []
|
127
|
-
|
128
|
-
files:
|
114
|
+
files:
|
129
115
|
- .gitignore
|
130
116
|
- Gemfile
|
131
117
|
- LICENSE.txt
|
@@ -144,38 +130,29 @@ files:
|
|
144
130
|
- test/helper.rb
|
145
131
|
- test/test_passivedns-client.rb
|
146
132
|
homepage: https://github.com/chrislee35/passivedns-client
|
147
|
-
licenses:
|
133
|
+
licenses:
|
148
134
|
- MIT
|
135
|
+
metadata: {}
|
149
136
|
post_install_message:
|
150
137
|
rdoc_options: []
|
151
|
-
|
152
|
-
require_paths:
|
138
|
+
require_paths:
|
153
139
|
- lib
|
154
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
none: false
|
165
|
-
requirements:
|
166
|
-
- - ">="
|
167
|
-
- !ruby/object:Gem::Version
|
168
|
-
hash: 3
|
169
|
-
segments:
|
170
|
-
- 0
|
171
|
-
version: "0"
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - '>='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
172
150
|
requirements: []
|
173
|
-
|
174
151
|
rubyforge_project:
|
175
|
-
rubygems_version:
|
152
|
+
rubygems_version: 2.0.3
|
176
153
|
signing_key:
|
177
|
-
specification_version:
|
154
|
+
specification_version: 4
|
178
155
|
summary: Query passive DNS databases
|
179
|
-
test_files:
|
156
|
+
test_files:
|
180
157
|
- test/helper.rb
|
181
158
|
- test/test_passivedns-client.rb
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
��$Y��]B�Z�y�d������Z��Uy�H(�D������d4肩���j��߄l�s�:�L"�Bq���`D�������۰��
|
2
|
+
�𧞇�T_���~k��`�pxc���'��ZjP~c�!E }վMS�A���H&�m�F���h�=ig�j�X���xd����-0_Ƣ;a_�?Z��pX�t��2�u�j�@l2u�x�d�(�(@R����1�Bܳ�81B��C����M���8� �S��
|