vectra 0.0.2 → 0.0.3

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: bebaf2ac4a12c7917a69dc288cdca7c3869593e5
4
- data.tar.gz: ad4df58d56b6a7f0f74276f40d195691e2f3537f
3
+ metadata.gz: 7050b5ad1402a964cd1a1b18304627a7e2442161
4
+ data.tar.gz: 3544fc85fedf115d85e43f14b30ee7fd6b923770
5
5
  SHA512:
6
- metadata.gz: 56d09edeae08914b221242a215d45055714148d92157296cee2facb81f80d9bccdfdfc01a4da97ff6274723719b050dbe7bd83beab05ce5cfbb35c78e8012720
7
- data.tar.gz: 0e1cb875c6538be00e85ac4abd533c289900839cdacbf4d1fccec8c69e03af5cbd80c1da2b6392711cd76e99397a4fd9267740921142ecbbb4e893c156f2233e
6
+ metadata.gz: 8f86cc1f0615836dcedc545eb461f605f390fe0e872d14e012caea1cb50b446cdbd5b8a3631718ae177f72665173014661d7db5abcc8f6162d648fd267d68317
7
+ data.tar.gz: 41222a3f6227dd84524d5003e217b3cc8b866d573cfb1b49c62a17d7772d5a9b5fa427dd1f2b4a587b27b161f73d2a44d93232bafb9496c50efcc0f2c7acb7ae
data/README.md CHANGED
@@ -10,3 +10,34 @@ Like any other gem:
10
10
  ```shell
11
11
  gem install vectra
12
12
  ```
13
+ # Usage
14
+
15
+ Basic Block Configuration:
16
+
17
+ Vectra.configure do |config|
18
+ config.endpoint = @endpoint_url # https://vectra/api/
19
+ config.username = @username
20
+ config.password = @password
21
+ end
22
+
23
+ ## Detections
24
+
25
+ Vectra::Detections.all
26
+
27
+ or by ID
28
+
29
+ Vectra::Detections.get(1)
30
+
31
+
32
+ ## Hosts
33
+
34
+ Vectra::Hosts.all
35
+
36
+ or by ID
37
+
38
+ Vectra::Hosts.get(1)
39
+
40
+
41
+ # Features
42
+
43
+ - Supports Hosts and Detections
@@ -7,6 +7,8 @@ require 'vectra/config'
7
7
  require 'vectra/api'
8
8
  require 'vectra/hosts'
9
9
  require 'vectra/detections'
10
+ require 'vectra/sensors'
11
+ require 'vectra/rules'
10
12
 
11
13
  module Vectra
12
14
 
@@ -9,7 +9,7 @@ module Vectra
9
9
 
10
10
  # Send the request
11
11
  response = HTTParty.get(
12
- "#{url}#{args}",
12
+ "#{url}#{args}?page_size=100000",
13
13
  :verify => false, # Vectra doesnt accept real certs yet
14
14
  :basic_auth => {
15
15
  :username => Vectra::Config.username,
@@ -4,7 +4,7 @@ module Vectra
4
4
  attr_reader :id
5
5
 
6
6
  def self.target
7
- "detections"
7
+ "detections?page_size=50000"
8
8
  end
9
9
 
10
10
  def self.all
@@ -4,7 +4,7 @@ module Vectra
4
4
  attr_reader :name
5
5
 
6
6
  def self.target
7
- "hosts"
7
+ "hosts?page_size=50000"
8
8
  end
9
9
 
10
10
  def self.all
@@ -0,0 +1,20 @@
1
+ module Vectra
2
+ class Rules < Api
3
+
4
+ attr_reader :id
5
+
6
+ def self.target
7
+ "rules"
8
+ end
9
+
10
+ def self.all
11
+ request
12
+ end
13
+
14
+ def self.get(id)
15
+ request("/#{id}", false)
16
+ end
17
+
18
+ end
19
+
20
+ end
@@ -0,0 +1,20 @@
1
+ module Vectra
2
+ class Sensors < Api
3
+
4
+ attr_reader :id
5
+
6
+ def self.target
7
+ "sensors"
8
+ end
9
+
10
+ def self.all
11
+ request
12
+ end
13
+
14
+ def self.get(id)
15
+ request("/#{id}", false)
16
+ end
17
+
18
+ end
19
+
20
+ end
@@ -1,3 +1,3 @@
1
1
  module Vectra
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vectra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Mackintosh
@@ -114,6 +114,8 @@ files:
114
114
  - lib/vectra/config.rb
115
115
  - lib/vectra/detections.rb
116
116
  - lib/vectra/hosts.rb
117
+ - lib/vectra/rules.rb
118
+ - lib/vectra/sensors.rb
117
119
  - lib/vectra/version.rb
118
120
  - spec/spec_helper.rb
119
121
  - spec/vectra/vectra_spec.rb