passivetotal 1.0.3 → 1.0.4

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: d3c95b2a176f2d2169468d5588f6b966ab8138e1
4
- data.tar.gz: a40c315a92542733ab1e181ac875fb85f2a03893
3
+ metadata.gz: f7e5a27c48b80aeafce0cbd714afbb55ecb690aa
4
+ data.tar.gz: 4e02e94929533e782d731bb7c42231d53e8ae944
5
5
  SHA512:
6
- metadata.gz: 76a3fd0c35b524a726cc57f3cb0f50feb852b1bf7bac01a02f52cccd4475063145fa1ee9d5554046abbd96eab075234545ba5f19baf346c6a30341cefb2a67af
7
- data.tar.gz: 4058e27c7a5ffec725fc5d496983e34ceae7d143ac46250d4fe0f704cb161766f903fe4b625d85ea4bb91386aa0b3a372f7ece8cd6f8c233431bc6782fc6bd1a
6
+ metadata.gz: 2e414bfed888274d5e88763038c95179d1b5cd8b45e27bf577fddd2d62e6374c79e05b8d9b525d2a5c5691e1307e327a24cceb43279ae9b17f701d715f81f39e
7
+ data.tar.gz: 2cd27108fc078b78f497065b6b1797a1e41be94400d125aab67e2063deb22cafd081c436d47eceeee1d89d3bd76b3346d180ab6c3cde731b372ce09abbfef8e5
@@ -119,6 +119,22 @@ module PassiveTotal # :nodoc:
119
119
  # metadata is an alias for enrichment
120
120
  alias_method :metadata, :enrichment
121
121
 
122
+ # Enrichment bulk : Enrich each of the given queries with metadata
123
+ # query: An array of domains or IP addresses to query
124
+ def bulk_enrichment(query)
125
+ if query.class != Array
126
+ query = [query]
127
+ end
128
+ query.map do |q|
129
+ is_valid_with_error(__method__, [:ipv4, :domain], q)
130
+ if domain?(q)
131
+ q = normalize_domain(q)
132
+ end
133
+ q
134
+ end
135
+ get_with_data('enrichment/bulk', { 'query' => query })
136
+ end
137
+
122
138
  # osint: Get opensource intelligence data
123
139
  # query: A domain or IP address to query
124
140
  def osint(query)
@@ -129,6 +145,22 @@ module PassiveTotal # :nodoc:
129
145
  get('enrichment/osint', {'query' => query})
130
146
  end
131
147
 
148
+ # osint bulk : Enrich each of the given queries with metadata
149
+ # query: An array of domains or IP addresses to query
150
+ def bulk_osint(query)
151
+ if query.class != Array
152
+ query = [query]
153
+ end
154
+ query.map do |q|
155
+ is_valid_with_error(__method__, [:ipv4, :domain], q)
156
+ if domain?(q)
157
+ q = normalize_domain(q)
158
+ end
159
+ q
160
+ end
161
+ get_with_data('enrichment/bulk/osint', { 'query' => query })
162
+ end
163
+
132
164
  # subdomains: Get subdomains using a wildcard query
133
165
  # query: A domain with wildcard, e.g., *.passivetotal.org
134
166
  def subdomains(query)
@@ -356,6 +388,23 @@ module PassiveTotal # :nodoc:
356
388
  end
357
389
  get('enrichment/malware', {'query' => query})
358
390
  end
391
+
392
+ # malware bulk: get sample information based from domains
393
+ # query: An array of domains or IP addresses to query
394
+ def bulk_malware(query)
395
+ if query.class != Array
396
+ query = [query]
397
+ end
398
+ query.map do |q|
399
+ is_valid_with_error(__method__, [:ipv4, :domain], q)
400
+ if domain?(q)
401
+ q = normalize_domain(q)
402
+ end
403
+ q
404
+ end
405
+ get_with_data('enrichment/bulk/malware', { 'query' => query })
406
+ end
407
+
359
408
 
360
409
  private
361
410
 
@@ -1,3 +1,3 @@
1
1
  module PassiveTotal
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passivetotal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - chrislee35
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-21 00:00:00.000000000 Z
11
+ date: 2016-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json